Quadcopter flips on take off

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
User avatar
jerbs
Posts: 10
Joined: Mon Dec 31, 2012 7:09 am

Quadcopter flips on take off

Post by jerbs »

CONFIG
Quad X
Motors: KEDA KA20-50S (29g 1088 Kv, 6A (8A Peak))
ESCs: Turnigy Plush 12A
FC: Arduino UNO
IMU: 10DOF (GY_80 Lib) (http://www.ebay.com/itm/10DOF-axis-IMU- ... 3f1dbf9057)
Frame: HK Talon
Props: 8x4.5R and 8x4.5

I have the IMU soldered to a protoshield that sets on top of the arduino. Yes I know the Arduino mini pro is a better choice, but I already have quite a few Arduino UNOs laying around the house from previous robots I have built. I am fairly new to multirotors so I apologize if I am missing something obvious.
In the multwii code I have uncommented the #define GY_80, I have calibrated my ESCs twice now, and last night I reset all of the ESCs back to default settings. No matter what I do the quad flips over immediately when trying to lift off. Using the GUI I see that it recognizes all of my sensors and the readings look good, at least I don't have any I2C errors. I have left all PID settings at default. With the motors armed my Gyro stays between -1 and 1.
Can someone please throw some suggestions at me? I'm getting really frustrated with this. I appreciate any help.

Also, should I comment out all of the stuff I'm not using in the config.h file? For example the Tricopter #define YAW_DIRECTION 1?


Thanks

User avatar
Gartenflieger
Posts: 65
Joined: Sat Oct 01, 2011 10:07 pm
Location: Dortmund, Germany

Re: Quadcopter flips on take off

Post by Gartenflieger »

Hi jerbs,

immediate flipping is usually due to wrong sensor orientation and/or wrong motor connection and/or wrong motor direction of rotation. You might want to do a quick check holding the quad in your hand. Arm, spin up a little and if any of those bugs is present, the quad will try to turn around instead of trying to stabilze itself.
No need to comment out things like the one you mentioned.

Edit: I think the sensor bob is not among the common ones. Maybe the orientation is not yet corretly implemented.

Christoph

User avatar
jerbs
Posts: 10
Joined: Mon Dec 31, 2012 7:09 am

Re: Quadcopter flips on take off

Post by jerbs »

Gartenflieger wrote:Hi jerbs,

immediate flipping is usually due to wrong sensor orientation and/or wrong motor connection and/or wrong motor direction of rotation. You might want to do a quick check holding the quad in your hand. Arm, spin up a little and if any of those bugs is present, the quad will try to turn around instead of trying to stabilze itself.
No need to comment out things like the one you mentioned.

Edit: I think the sensor bob is not among the common ones. Maybe the orientation is not yet corretly implemented.

Christoph



Christopher,

Thanks for the reply. I do agree on the prop rotation/motor direction being the cause of flipping, that has always been the cause anytime in the past when I have had this happen, but unfortunately it is not this time. I have checked that every time I attempt to fly it. Are you saying the problem might be within the GY_80 libs?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Quadcopter flips on take off

Post by PatrikE »

GY 80 seems to be supported by MWii.
My suspicion is that you swapped motorPins.

Check the QuadX connection digram for the engines.
Image
It's an error iw'e made several times... :oops:

If thats correct check in the Gui to see if image om the Quad move correct.
Heading and tilting should be same.

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Quadcopter flips on take off

Post by Gimbal »

to set pid easy, i hang my quad on a rod (secure it with zip tie) to tune roll and pitch, look at YouTube "quad pid tuning" this will also help you to sort out different probs

User avatar
jerbs
Posts: 10
Joined: Mon Dec 31, 2012 7:09 am

Re: Quadcopter flips on take off

Post by jerbs »

PatrikE wrote:GY 80 seems to be supported by MWii.
My suspicion is that you swapped motorPins.

Check the QuadX connection digram for the engines.
Image
It's an error iw'e made several times... :oops:

If thats correct check in the Gui to see if image om the Quad move correct.
Heading and tilting should be same.


Hey PatrikE and Gimbal, I truly appreciate the quick responses. I have double checked the motors and props and everything is good there unfortunately. In the past if I had this problem on any other quad, it seems like it was always either motor configuration errors, or ESC calibration. I wish it was the case this time too, but unfortunately it is not. :(

As far as the GUI goes to be honest I'm not sure if I am getting the correct values or not. I took some pictures and screenshots hoping you might spot my fault:

Here is a picture of the quad connected to my PC running the GUI. It was in this position when I took the screenshot of the GUI as well.
https://docs.google.com/open?id=0B--U5I ... V93ZjVsaDg
Top View
https://docs.google.com/open?id=0B--U5I ... 0R1ZFFxUms

Top View with arduino housing open
https://docs.google.com/open?id=0B--U5I ... FZQOUd1NXc

GUI
https://docs.google.com/open?id=0B--U5I ... WpUWndDbzg

10DOF IMU
https://docs.google.com/open?id=0B--U5I ... 0NzaWhwTXc
https://docs.google.com/open?id=0B--U5I ... 2gzVmpUQU0

@Gimbal I have seen what you are talking about and looks like a very cool and effective method, I'll try that as soon as I can find somewhere to tie it to. Thanks for the suggestion.

I can't tell you how much I appreciate your help with this, thank you very much.

User avatar
Gartenflieger
Posts: 65
Joined: Sat Oct 01, 2011 10:07 pm
Location: Dortmund, Germany

Re: Quadcopter flips on take off

Post by Gartenflieger »

jerbs wrote:Are you saying the problem might be within the GY_80 libs?


Maybe, sometimes the sensor bobs are implemented based on visual inspection of the direction of placement of the individual sensors on the board. And for my own first selfmade bobs I found that error prone. So you should go through the precedure of checking the sensor orientation as given in http://www.multiwii.com/faq#How_should_be_the_sensor_axis_directions

User avatar
jerbs
Posts: 10
Joined: Mon Dec 31, 2012 7:09 am

Re: Quadcopter flips on take off

Post by jerbs »

Thanks Gartenfieger, I believe that is going to be my problem, I followed Gimbal's advice and I believe the quad thinks it is upside down, the rear right motor turns a lot faster than the rest of them and if I hold it and let it do what it wants - it will try to turn it self upside down and seems to stabilize.

User avatar
jerbs
Posts: 10
Joined: Mon Dec 31, 2012 7:09 am

Re: Quadcopter flips on take off

Post by jerbs »

How should be the sensor axis directions
TILT the MULTI to the RIGHT (left side up):

MAG_ROLL, ACC_ROLL and GYRO_ROLL goes up
MAG_Z and ACC_Z goes down
TILT the MULTI forward (tail up):

MAG_PITCH, ACC_PITCH and GYRO_PITCH goes up
MAG_Z and ACC_Z goes down
Rotating the copter clockwise (YAW):

GYRO_YAW goes up
The copter stays level:

MAG_Z is positive ; ACC_Z is positive



It looks like my numbers are going negative when they should be going positive. How do I adjust this in software?

Thanks

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Quadcopter flips on take off

Post by Gimbal »

GY_80 you said, guess you have to make som trail and error in def.h:

#if defined(GY_80)
#define L3G4200D
#define ADXL345
#define HMC5883
#define BMP085
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -X; accADC[PITCH] = -Y; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = -Z;}
#undef INTERNAL_I2C_PULLUPS
#define ADXL345_ADDRESS 0x53
#endif

try to alter X,Y,Z and -

User avatar
jerbs
Posts: 10
Joined: Mon Dec 31, 2012 7:09 am

Re: Quadcopter flips on take off

Post by jerbs »

Why does config.h have the individual sensor orientation when it is defined in the if statement in the def.h file?
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = Y; accADC[PITCH] = -X; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -Y; gyroADC[PITCH] = X; gyroADC[YAW] = Z;}
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}


Which overrides which if it is uncommented?

thanks

User avatar
jerbs
Posts: 10
Joined: Mon Dec 31, 2012 7:09 am

Re: Quadcopter flips on take off

Post by jerbs »

Gimbal wrote:GY_80 you said, guess you have to make som trail and error in def.h:

#if defined(GY_80)
#define L3G4200D
#define ADXL345
#define HMC5883
#define BMP085
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -X; accADC[PITCH] = -Y; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = -Z;}
#undef INTERNAL_I2C_PULLUPS
#define ADXL345_ADDRESS 0x53
#endif

try to alter X,Y,Z and -


Check out this video I made, I only moved the throttle stick, and never moved it to full throttle, yet it seemed as if the back left motor was at full throttle the entire time
http://www.youtube.com/watch?v=_00Tt1P0 ... e=youtu.be

User avatar
mgros
Posts: 90
Joined: Thu Jan 20, 2011 12:32 am

Re: Quadcopter flips on take off

Post by mgros »

It seems a bad calibrated or oriented accelerometer.

Gimbal
Posts: 146
Joined: Tue Jul 24, 2012 7:14 pm
Location: Sweden

Re: Quadcopter flips on take off

Post by Gimbal »

Ok first did you calibrate the esc:

/********************************************************************/
/**** ESCs calibration ****/
/********************************************************************/

/* to calibrate all ESCs connected to MWii at the same time (useful to avoid unplugging/re-plugging each ESC)
Warning: this creates a special version of MultiWii Code
You cannot fly with this special version. It is only to be used for calibrating ESCs
Read How To at http://code.google.com/p/multiwii/wiki/ESCsCalibration */
#define ESC_CALIB_LOW MINCOMMAND
#define ESC_CALIB_HIGH 2000
//#define ESC_CALIB_CANNOT_FLY // uncomment to activate<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< yes this one jerbs

double check all connections, only throttle and quad should only go up if you have reverse sensor setting it will react in the wrong direction and enhance reactions

a video off the GUI would be nice

User avatar
jerbs
Posts: 10
Joined: Mon Dec 31, 2012 7:09 am

Re: Quadcopter flips on take off

Post by jerbs »

Gimbal wrote:Ok first did you calibrate the esc:

/********************************************************************/
/**** ESCs calibration ****/
/********************************************************************/

/* to calibrate all ESCs connected to MWii at the same time (useful to avoid unplugging/re-plugging each ESC)
Warning: this creates a special version of MultiWii Code
You cannot fly with this special version. It is only to be used for calibrating ESCs
Read How To at http://code.google.com/p/multiwii/wiki/ESCsCalibration */
#define ESC_CALIB_LOW MINCOMMAND
#define ESC_CALIB_HIGH 2000
//#define ESC_CALIB_CANNOT_FLY // uncomment to activate<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< yes this one jerbs

double check all connections, only throttle and quad should only go up if you have reverse sensor setting it will react in the wrong direction and enhance reactions

a video off the GUI would be nice


Yes I have calibrated the ESCs multiple times, I will make a video of the GUI today. Thanks for the replies.

User avatar
Gartenflieger
Posts: 65
Joined: Sat Oct 01, 2011 10:07 pm
Location: Dortmund, Germany

Re: Quadcopter flips on take off

Post by Gartenflieger »

jerbs wrote:
It looks like my numbers are going negative when they should be going positive. How do I adjust this in software?

Thanks


For each of the sensors:
- First, make sure the right axis are used in the mix: when rolling the copter left and right, only the ROLL line goes up and down in the GUI. If the PITCH line mevs instead, exchange X and Y in the mix line for that sensor.
- Second, get the signs right according to the instructions. Do so by changing the sign in front of the X or Y in the respective mix line.

Then do the ACC and MAG calibrations.

I don't remember which #define is dominant, to make sure change it in the def.h.

User avatar
jerbs
Posts: 10
Joined: Mon Dec 31, 2012 7:09 am

Re: Quadcopter flips on take off

Post by jerbs »

Wow... I must say that I am extremely disappointed in myself. Yesterday I decided to bite the bullet and buy a NAZA-M FC. I have had a NAZA before, but sold it on eBay because I wanted to build my own board because I have always been a bit of a DYI kinda guy. So I buy the $400 NAZA w/GPS and install it in replace of my multiwii I created, and what do ya know.... It does the EXACT same thing!! Geesh I feel like a complete idiot. This whole time the problem has been with either my ESCs or motors, yet I continued to doubt my FC build. I know I have calibrated the ESCs 100 times and I even have a Turnigy programming card and went over those settings many times. I know a lot of people swear by Turnigy products, but I think I will go to the Hobby-Lobby.com store, which is about 15 minutes from my house, and purchase 4 new eRc ESCs and be done with it. I have used their ESCs in the past and really liked them. Of course after I get a little flying time in, curiosity will get the better of me and I will try my multiwii board again just to see how it good it is in the air with properly working ESCs. I will post my settings once I get it tweaked and flying good. I appreciate everyone's advice and the time you guys contribute to the community.
Thanks

Post Reply