Quadcopter Build

You can check gyro via usb or gui... yeah you can Definitely reset clear eeprom and upload new code again.. I just wanted to know why this is happening first.
 
Had my maiden flight this morning!!

Success!

Copter was very stable. I spent some time going through the various flight modes. Alt hold is by far the most easy to fly. I put her in "Stabilize" mode and WOW the power! She can take off straight up super fast!!

I'm going to take it out to an open field this afternoon. MY backyard is a bit cramped for this thing.

I have a low voltage alarm on it, and I need to set it higher :) I have it set to 3.0v per cell (if one cell goes below 3.0, it beeps). So, it started beeping, and I brought it around for a landing. Maybe 5 seconds after it started beeping, BAM, the rotors stopped and the thing crashed to the ground. Luckily, I was only a few feet above ground at the time, so I suffered no damage.

What should the low voltage cutoff be?? 3.1v? 3.2??
 
ok. i guess i found the culprit. i had the copter wobble around in mid air after swapping the battery. i reflashed multiwii, but maybe flashed a wrong version. they all look the same basically. maybe. i don't know.
but while checking multiwiiconf for i2c error (there where none) i noticed that "cylce time" jumped from somewhere around 2300-2700 to something >10000 every 2-3 seconds. i don't know what caused that. but i can reproduce it by flashing "2.3 b7" firmware. replacing this by 2.3 rel version removed the cycle time jumping to extreme values. but still the copter is not that stable in air as i wish it could be. of course there are many factors like pid settings and wind. there is some light wind at the moment so this makes it hard to compare. but still i see the copter twitching. it looks like it is not sure what to do :)
 
izeman
Is the 2.3b7 firmware already preconfigured when you open it up in arduino?

Cycle time should not go past 3000..
So I am starting to think it must be that firmware.. something that's configured in it to cause this..

I remember that 2.3b7 firmware I have. I had to go through it and undefine things..
Was a bit annoying, I opened up the 2.3 offical version beside it and went through them as the same time...
Maybe you could post the code here your using?
 
Deanwvu

I have my buzzer set to 3.5 so If I am far away I have enough time to bring her back and land it..
You should optimise this for the type of flights your doing..

When you start doing FPV, your going to go really far away and Hi up.. ( chance of losing control transmission for a second is likely) depends on the area..
( just remember to have failsafe working before you do FPV, don't want that baby flying away on you)
test it by arming it.. give little throttle not enough to take of.. and then turn off transmitter..
wait for it... you should be able to see it go into fail safe after the given time set in the config.h.. and the props will spin @ fail safe speed.
 
nechaus said:
izeman
Is the 2.3b7 firmware already preconfigured when you open it up in arduino?
that's a major problem. finding out what to remove and what to change to your demands, as many of the parameters (especially those that are new from b7) are still unknown to me and i'm not sure if they could cause issues.

Cycle time should not go past 3000..
ok. thanks for confirmation. that's how it is with 2.3 rel.

Maybe you could post the code here your using?
sure. maybe you have the time to look through it. one should be able to identify the config part that causes high cpu load (i guess this is what cylce time is equivalent to)

View attachment config.h
 
im having trouble reading it easily.. all the text is kinda everywhere


but I did notice this


//#define I2C_SPEED 100000L //100kHz normal mode, this value must be used for a genuine WMP
#define I2C_SPEED 400000L //400kHz fast mode, it works only with some WMP clones

You want this

#define I2C_SPEED 100000L //100kHz normal mode, this value must be used for a genuine WMP
//#define I2C_SPEED 400000L //400kHz fast mode, it works only with some WMP clones


Best way to do this is to open up two sketches side by side.. pita..
and go through each one.. they are virtually the same but it will make it easier for you because the 2.3rel has all the default where the 2.3b7 is some guys saved config...


are these your defined settings?


/* This is the speed of the serial interfaces */
#define SERIAL0_COM_SPEED 115200 // BT
#define SERIAL1_COM_SPEED 115200
#define SERIAL2_COM_SPEED 57600 // GPS
#define SERIAL3_COM_SPEED 9600 // Telemetry FRSKY




also this
/******** Gyro filters ********************/
/**************************************************************************************/

/********************* Lowpass filter for some gyros ****************************/
/* ITG3200 & ITG3205 Low pass filter setting. In case you cannot eliminate all vibrations to the Gyro, you can try
to decrease the LPF frequency, only one step per try. As soon as twitching gone, stick with that setting.
It will not help on feedback wobbles, so change only when copter is randomly twiching and all dampening and
balancing options ran out. Uncomment only one option!
IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.*/
//#define ITG3200_LPF_256HZ // This is the default setting, no need to uncomment, just for reference
//#define ITG3200_LPF_188HZ
//#define ITG3200_LPF_98HZ
//#define ITG3200_LPF_42HZ
//#define ITG3200_LPF_20HZ
//#define ITG3200_LPF_10HZ // Use this only in extreme cases, rather change motors and/or props

/* MPU6050 Low pass filter setting. In case you cannot eliminate all vibrations to the Gyro, you can try
to decrease the LPF frequency, only one step per try. As soon as twitching gone, stick with that setting.
It will not help on feedback wobbles, so change only when copter is randomly twiching and all dampening and
balancing options ran out. Uncomment only one option!
IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.*/
//#define MPU6050_LPF_256HZ // This is the default setting, no need to uncomment, just for reference
//#define MPU6050_LPF_188HZ
//#define MPU6050_LPF_98HZ
//#define MPU6050_LPF_42HZ
//#define MPU6050_LPF_20HZ
//#define MPU6050_LPF_10HZ
//#define MPU6050_LPF_5HZ // Use this only in extreme cases, rather change motors and/or props

set your desired lpf..



I personally enable this
/* introduce a deadband around the stick center
Must be greater than zero, comment if you dont want a deadband on roll, pitch and yaw */
#define DEADBAND 6
 
nechaus said:
im having trouble reading it easily.. all the text is kinda everywhere
i'm sorry. i didn't check that. i just attached the file as is. maybe the forum converted that somehow. shall i resend it?

Code:
#define I2C_SPEED 100000L     //100kHz normal mode, this value must be used for a genuine WMP
  //#define I2C_SPEED 400000L   //400kHz fast mode, it works only with some WMP clones
this is what i have set in all other firmwares as well. but i will change it back to lower speed if you recommend that.

Code:
/* This is the speed of the serial interfaces */
  #define SERIAL0_COM_SPEED 115200  // BT
  #define SERIAL1_COM_SPEED 115200  
  #define SERIAL2_COM_SPEED 57600   // GPS
  #define SERIAL3_COM_SPEED 9600    // Telemetry FRSKY
this is what comes pre-defined. but should be no issue. as GPS works fine with 57k and telemetry need 9k afaik. i hope this doesn't cause problems?

Code:
  //#define ITG3200_LPF_256HZ     // This is the default setting, no need to uncomment, just for reference
  //#define ITG3200_LPF_188HZ
  //#define ITG3200_LPF_98HZ
  //#define ITG3200_LPF_42HZ
  //#define ITG3200_LPF_20HZ
  //#define ITG3200_LPF_10HZ      // Use this only in extreme cases, rather change motors and/or props
i have this set unchanged. this is the same in all my firmwares. what value do you recommend? i guess it should make the copter more stable but also a bit laggy if i overdue it. correct?

Code:
  /* MPU6050 Low pass filter setting. 
  IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.*/
  //#define MPU6050_LPF_256HZ     // This is the default setting, no need to uncomment, just for reference
  //#define MPU6050_LPF_188HZ
  .....
i ain't have a MPU6050. so does that setting matter?

I personally enable this
/* introduce a deadband around the stick center
Must be greater than zero, comment if you dont want a deadband on roll, pitch and yaw */
#define DEADBAND 6
i will try that. this should be a good idea, as i have the copter YAW all the time a bit when using the throttle. i thought i had to trim that but found out that it's me moving the throttle stick no 100% straight. ;)

on the other hand: did you find the reason that could have caused the copter's high cpu load? i added the config.h as zip file. i hope this leaves the format unchanged. btw: i do config.h adaption as you said: two big screen, two windows open and then go through it line by line. i don't know why those multiwii forks don't add a clean config.h. it's a real pita. i'd also like to see a QUAD only config.h - so i will know which parameters to completely ignore. eg. this stuff. it says "heli & airplane". do i need it???

Code:
  /***********************      Common for Heli & Airplane         ***********************/

    /* Governor: attempts to maintain rpm through pitch and voltage changes
     * predictive approach: observe input signals and voltage and guess appropriate corrections.
     * (the throttle curve must leave room for the governor, so 0-50-75-80-80 is ok, 0-50-95-100-100 is _not_ ok.
     * Can be toggled via aux switch.
     */
    //#define GOVERNOR_P 7     // (*) proportional factor. Higher value -> higher throttle increase. Must be >=1; 0 = turn off
    //#define GOVERNOR_D 4     // (*) decay timing. Higher value -> takes longer to return throttle to normal. Must be >=1;

    //#define VOLTAGEDROP_COMPENSATION // voltage impact correction

  /***********************          Heli                           ***********************/
    /* Channel to control CollectivePitch */
    #define COLLECTIVE_PITCH      THROTTLE

    /* Limit the range of Collective Pitch. 100% is Full Range each way and position for Zero Pitch */
    #define COLLECTIVE_RANGE { 80, 0, 80 }// {Min%, ZeroPitch offset from 1500, Max%}.
    #define YAWMOTOR                 0       // If a motor is used as YAW Set to 1 else set to 0.

    /* Servo mixing for heli 120
                         {Coll,Nick,Roll} */
    #define SERVO_NICK   { +10, -10,  0 }
    #define SERVO_LEFT   { +10, +5, +10 } 
    #define SERVO_RIGHT  { +10, +5, -10 } 

    /* Limit Maximum controll for Roll & Nick  in 0-100% */
    #define CONTROL_RANGE   { 100, 100 }      //  { ROLL,PITCH }

    /* use servo code to drive the throttle output. You want this for analog servo driving the throttle on IC engines.
       if inactive, throttle output will be treated as a motor output, so it can drive an ESC */
    //#define HELI_USE_SERVO_FOR_THROTTLE
 

Attachments

  • config.zip
    19.7 KB · Views: 24
I think it was the I2C speed... I am not 100 % sure tho..

But thinking back, I believe I had your exact same issue before..
100% sure it is something that just needs to be changed in the code..


never used that section myself (Common for Heli & Airplane)
 
i tested with low i2c speed, but it didn't help. cpu load is still too high.
but i set #define ITG3200_LPF_42HZ and #define DEADBAND 6. made flying much better. wobble is more or less gone, and i still react fast enough for me. i had the copter flying in our small garden for some minutes really stable and then i became fearless ;) or i touched the throttle a bit too much and off it went. you must know that we live in a quite crowded place. average property is 400-500m2 and houses are really close to each other. the copter was almost out of sight because a strong wind catched it. it got higher and higher and my puls rate passed the 200 mark already. i took a DEEP breath and remembered all those youtube how-to videos and tried to calm down. and i got it back save. OMG. i never want to experience that EVER in my life. i saw myself sitting in jail because my copter killed someone ... the chance of killing someone of course is below 1% as it's quite cold and almost dark outside so everyone is inside. but still ...
i'm quite happy how it flies right now and i ordered 16 pairs of propellers and 2 spare motors just in case :)
flying gets better with every minute flight time.
 
far out haha, my heart rate was up reading it...

So did you manage to bring it back.. what happened?
If you have seen my videos.. I think we live in similar size properties..
 
I still haven't learned how to calm down. Good job on that save. I've had a few too many flights go bad. One I couldn't tell if the quad was responding anymore, panicked a bit and tried to get it back quickly. Ended up going the opposite direction and I lost sight down a hill. Same thoughts as you - did I just hit some innocent bystander? Spent a few hours looking for it in the weeds. Luckily got it back with a few broken props and arms. Just this weekend same thing happened. I was trying out the sj4000 which was mounted horribly and the quad was front heavy. Of course it was close to my house and it didn't seem to want to go back any longer. Thought the battery was too low. Panicked and tried to turn it so that it would come straight back to me away from the houses. Ended up going the opposite direction over some cars and landing in the area of a busy street. Luckily it only hit into my neighbors vinyl fencing. That might cost me. I've yet to find out. It busted up a few slats. If I would have calmed down, I would have been able to avoid that headache. Now I'm waiting on arms, and should probably get another motor - one shaft is now out of true.

I know you guys are into Arduino, but any thoughts on this new KK version? Seems like a ripoff of the HK board with some extra features. BTW- that programming talk just scares me away from trying those boards!
SKU162172_1.jpg
$25 from banggood.com
 
have you guys been using rtl ?
some times those hairy situations RTL is good.. providing its tuned and works.. it will work like a treat when you freak out.. I think hitting RTL is better than killing the power or trying to figure out how to get it back sometimes.. Saved my ass big time when i flew past the radio tower.. could of really ended badly.

Yeah the kk2 boards are good. very similar sensors and cpu, but.. i reckon the NAZE32 is way better than the kk2.. you do have to solder the pin headers on but its got a 32 bit processor and has gotten some really awesome feedback to be honest.. and its cheap!!!


In the next few weeks I am going to buy a APM fc... one with the navlink and gps power cables ect..
Almost was going to get a naza controller the other day from a friend but I thought id give it a miss for now..
 
yes definitely RTH/RTL and POSITION HOLD is the very next thing to look into. this will be a life safer. only thing to fear then are solar storms and empty batteries. but other then that it should give you this time to breath and calm down to bring the copter back home safely. even if RTH is not 100% failsafe (it can still hit some obstacles in it's way it the copter is not high enough) and gps is far from precise, it will be much better then just letting the copter crash somewhere out of sight and out of reach.
it's amazing how strong the wind can be and just kick your copter around. if a strong breeze catches the copter it can come out of sight quite easily. switching on POSITION HOLD will be a live safer.
is there anything special to take care off? i found that document from eosbandi: http://dl.btc.pl/kamami_wa/hk_29798_9.pdf
 
yeah its not 100% safe but rtl is a good last option..
its best to plan your flights and set the gps home altitude so it will avoid any tress ect.. like 20 meters or so is good in my street..

This is how I approach tuning gps with multiwii..
Set magnetic declination, I press the auto button in the multiwii ezy gui app..
First thing, test out mag in heads free mode.. you should be able to put altitude hold on, try heads free and make sure it works..
If for some reason you have difficulties using headsfree mode.. you may need to move flight controller away from all power cables, twist up all ( +-S ) wires from the esc..
(Example when you hit the throttle if it YAWS, mag is getting interference from power cables due to more power running through, you will only see this when headsfree mode is on i think)

Now mag is working as it should


Set a switch to have Mag-gps hold- altitude hold- level mode
Test Gps hold mode in a big area on a calm day when there is not much wind.
If GPS hold works, Set Mag-Gps home-altitude hold-level to a desired switch.
Fly quad away and hit gps home..
 
I found with this multiwii pro, it did take some time playing around with the pid settings for gps..
Probably the longest part was to try and tune it..

It will take a couple of battery packs..
Oh and do not update pid settings while it is flying.. I did this and it crashed badly... basically flipped into the roof of my house lol whoops...
Best to land it first.
 
i always land it and then set new PID values. BT is not that strong anyway, and it's safer. i use BT4.0 and this excellent app for iOS: https://itunes.apple.com/us/app/multiwii-gui/id891948965?mt=8 - and it's FREE!! i'm on contact with the author of this software and he is constantly improving it - even though it already does everything it needs to do.
can't wait for work to finish and go home and test GPS stuff.
today my RS232-TTL level shifter arrived, so i can start implementing telemetry stuff as well - display battery's voltage, amps (with a small current sensor), speed and other stuff on my remote, and get a warning when copter's voltage drops under a defined value. nice :)
 
sounds good man, I need to get onto telementry stuff soon
I am still tinkering around with different combinations of frames and that..

I have been printing this one
[youtube]YPZBCOjxVVI[/youtube]


So far onto the second leg, Each leg is taking about 3 and a half hours to print at average speed and quality... ages..
weighs in @ 44 grams, so the frame will be ridiculously light weight..
 
again the motors wont fit lol, But I am going to attach the motors to the aluminium mount, x2 of those holes will bolt onto the frame and the other two will have spaces..
If this fails i will just design my own t6 copter

Im thinking this configuration is less efficient than the regular hex, but the weight will be reduced alot not only with the frame but some of the wiring as well..
going to be good...
 
Tried RTH and GPS hold yesterday. But without success. Went to a big open field and bashed around a bit. Much better feeling then flying between houses. ;) After 15 min I overdid it and crashed had into the ground. One arm broke. No problem as I have a full frame as spare.
Installing the level shifter didn't work either. I didn't receive any data on me remote but the max3232 got extremely hot. I must investigate into that.
 
i now found out what the problem with the high cpu load was. whenever i activated "softserial" the cpu was overloaded and the copter was unable to fly. deactivating it solved the issue.
i now loaded mw2.3_frsky_b7 to my fc and tested GPS HOLD and it works quite nice. any ideas what to do to make it REALLY stable? drifting is ok i guess, but i don't like it wobble.

[youtube]O8n6ndY8nuY[/youtube]
 
Back
Top