Arducopter 2.2 beta

I just pushed Arducopter 2.2 to the Mission planner. This version went through extensive testing by a brave group of flyers and with both HIL and SIL testing.

See this link for more:

If you run into any problems please let me know here. If you find a reproducible bug, please add it to the issues list.

tuning tips:

If you run into Loiter issues, try adjusting LOITER_P. It's 2.0 right now which may or may not be to aggressive for your copter. Nav is no longer used in Loiter control, which should make tuning easier.

If you run into a circling issue, try lowering LOITER_I to 0 and see if it goes away. If not, check your compass declination. A negative error will produce CCW rotations, a positive error CW.

If you have issues with alt hold, try lowering your THROTTLE_P, it may be too high for higher thrust copters.

If you have wobbles and can't seem to get rid of them, there is a new term called STAB_D, which is a derivative term used to tune out the wobbles. You can increase it until they stop, but just like driving a cadillac, you loose some performance and handling. In the CLI "tune 16" in setup will let you control this in flight, and "tune" in test menu will let you see the value printed out interactively before flight. See the wiki for more detail.

Many testers gave me a thumbs up on the code, so if you have an issues please post the flash log from the copter. The tLog isn't that much help to me for debugging as it doesn't capture the needed values at high enough rates.

(Remember, if you'd rather pull the code from the repository and load it with Arduino, you must use the "relaxpatch" version of Arduino in our downloads section.)


Update 2.2b2

I believe I found the simple mode error. It was a bug that was working OK until Tridge fixed it so it was declared properly. Then the bug became active. I made the Simple mode function internal variables static and this should fix it hopefully.

I updated alt hold to not use dampener for now until we get more testing. Some folks saw a latency induced oscillation which was pumped up by the D term.

I added the automatic throttle cruise or hold value as a compile time option for testers. This basically looks at your throttle and climb rate while in stabilize or acro and determines your optimal hover value. This means you can enter any autopilot mode and not have to worry about your throttle position. It should make alt hold more reliable if it works. This is off by default until we get good field tests back.

Update pushed to GIT.

Update 2.2b3

Just some refinements. I added JLN's throttle curve mod for landing. Hopefully that's correctly implemented. 

Made the landing delay from RTL user settable

removed the ADC gyro filter, I was doing a lot of testing and determined it wasn't worth it.

Enabled the auto-throttle control by default. Please test in the sim

Altitude no longer resets when flying in Loiter mode

Pitch and roll dampening is smoother now. try values up to .08 for very dampened flight.

Mavlink can now trigger auto-land

I'll push a hex when I hear some good news from HIL testers.

Update 2.2b4

Flew today and saw the WP speed governor wasn't quite working right. It was going down to 0 rather than the minimum.
Made internal switch to CM for distance calcs. This should not make any change to gains or MP.
Modified a few default gains for jDrones frame based on AP test flights of this code in some heavy wind on my roof.
Fixed an issue with the landing code not kicking in right away.
Decreased the slowdown near WPs
Added a limit to the amount the pitch compensation can effect the throttle if the throttle input is really high or maximum


Update 2.2b6

This is a rollup of all the code that's been flying around for the last week as well as a few bug fixes. I'll be posting it saturday night after reviewing all of my logs.
A dampening term called STAB_D has been refined. A D term for all of the Rate based control loops has been added based on Igor's work. Landing for Baro and Sonar has been refined based on JLN's work. A slightly new approach to Loiter and Navigation is being used to try and linearize the pitch and roll for rate control. It tends to use lower gains, yet has a more assertive response in the air.
I have one small loiter control issue to sort out tonight based on my logs, then I'll post to GIT.
Here is the auto-landing code in action. 

OK, 2.2b6 is on GIT. The Mission planner is going to be out of sync until the release code. until then you can use the APM_Config.h or the parameters list in the Mission planner. 

STAB_D : This is the gyro accretion dampener. This can remove small wobbles during sharp changes in angle commands. Making this too high can have a negative effect in performance and add a memory effect that can cause temporary loss in control. The in flight tuning is ranged so you are just below that effect.

If you haven't noticed before the control loops are in two stages. The first is a PI stage that converts some sort of position or angle error into a desired rate. These generally do not need to be tuned. They are more of a user preference on how fast you want the copter to perform a motion. 

The second stage is the actual PID loop that needs to be tuned for the copter. This converts the desired rate into a motor command of some sort. I added a D term based on Igor's recommendation to the PI's for each rate controller. These should show up soon in the mission planner for the release. I cannot give you a concrete answer for how to tune the D terms, because they each depend on their function such as alt hold or loiter, etc.

Still, the absolute most important term is always the Rate_P term for each loop. Start tuning here.

The default PIDs are in the what flies great for a stock jDrones/3DR Quad with the purple motors in X mode.







You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Indoor test v2.2b6 - stock params - stock ardu frame 850 kv 10*45sf

    Only adjustment was lowering STAB_***_p to from 4.5 to 4.0 and RATE_***_P from .14 to 0.13, was better for my setup for 'hands free' indoors.. oh how i love that phrase 'handsfree, indoors' mmmmm.

    I've got a DJI flame wheel arriving this week, I'm going to encase my apm in foam and give this some real thrashing!

    Good test, but i sort of got the point after he jumped on it :)


    There's a small bug in b6 tunning using ch6. If you set ch6 to 1 or 4 (STABILIZE P or RATE P), both options are only adjusting RATE P. Look at Arducopter.pde  line 1921 and you will find this :

    case CH6_STABILIZE_KP:   

     g.rc_6.set_range(0,8000);   // 0 to 8    

    g.pid_rate_roll.kP(tuning_value);    --> replace by : g.pi_stabilize_roll.kP(tuning_value);

    g.pid_rate_pitch.kP(tuning_value);   --> replace by : g.pi_stabilize_pitch.kP(tuning_value);



    I've submited the issue, but fot the moment, if you are making real flight tests and in air tunning, first correct this and re upload.

  • 2.2.b6 fligh test

    This is the video supporting my last report in pag 94



  • On Tomorrow , I will test b6 and come report for our.

  • Evening,


    I opened up my mail this morning and couldn't believe my eyes. More than a 100 reply's on the 2.2b thread. There had to be a brakethrough .... But no, there seemed to be a problem. A quad came down! Condoleances go out to Marco. Hail to the brave I would say for testing the newest releases.

    After this incident you could do two things, support the AC dev team or buy a dji wookong.

    As I allready an owner of two APM1 boards I decided to stay and hope the dev team gained someting from Marco's loss.  


    Now for some flying reports.

    First off I got myself a new sonar and everything seems to workfine. Quad doesn't rise anymore and log is quite flat concerning sonar height. So thats a besic feature that works again.

    I've loaded the 2.2ß2XP2_PIDT1 version on my xaircaft X650 frame with 2814 tigermotors at 710KV and using 13x4,5 EPP props. Theres lot of thrust but it seemes that the quad doesn't stay in one place in stable. It wonders around and sometime it nodges a bit. (no bullet connectors) I also hear a lot of clicking sounds coming from the motors. I use Plush 25A ESC's.

    Nevertheless, AH is quit good even when doing some strong maneuvers it stays at the correct height.

    In Loiter a noticed a big improvement. The quad would stay in a diameter of a metre and worked to keep it in place. Nevertheless it was a windless condition.

    In some previous posts it was noted that during take off the quad would woblle a bit. I didn't notice this.

    Can someone point me to the "Igor tuning explination"???

    And with the new B6 version, do we have to do the Igor tuning procedure???  


  • 2.2b6 - default params, stabilise mode - very nice flight, needs tuning for my quad slightly.

    I've started to try to tune b6, Igors method.  I notice that rate_***_D values are all ZERO by default.

    I change all stab_***_P/I to ZERO

    I change all rate_***_P/I to ZERO

    Hold quad in hand, about 40% throttle

    I then apply small amounts of rate_***_D. At low levels (0.002 ish) the quad does not oscillate. Any higher - 0.01 for example - the quad oscillates, but the weird thing is it stops after 5 seconds - just like the initial wobbling problem with PIDT1. 

    I will try to tune it up leaving D at zero for now. And I'll try to tune with D, ignoring the wobble. But if we want to use the D term as a matter of course does the previous fix for initial wobble still apply? Thanks 

  • 2.2b6 looks to be very exciting after reading the positive feedback from Igor and Jean-Louis' mods that have been incorporated.

    Another thing that Jason doesn't mention is that it would seem that the code has been updated so that it now compiles with Arduino 1.0! Progress!! Hourah!

    1.0 seems to compile slightly smaller than 0022. With 0022 I get:

    Binary sketch size: 126044 (of a 126976 byte maximum)

    With 1.0 I get:

    Binary sketch size: 125878 (of a 126976 byte maximum)

    (those sizes are based on a 1280 (logging is forced to disabled), tricopter frame with all other options default).

  • 2.2.b6 Tests: HIL and real life

    I´m just tested the new fw 2.2.b6 from GIT. In summary all went right in both HIL and real life.

    Some details:

    Used ALL defaults in my small custom quad (650gr) same than other tests. Windy day (15knt).

    - First, I´ve HIL tested all modes and went fine. Although this is not conclusive, it´s a good start.

    - Landing is greatly improved and works fine in both HIL and real. Desdending speed is adecuate and final "disarming" is really well implemented (it´s almost inmediate, just after touching the ground).

    - Loiter is good for the wind we had today (I´ll post some video later). I can´t conclude more since I need to check it with no wind.

    - Stability is very good. Although the hard wind didn´t let me a fine check on that. I´ve done agresive maneoubres without a single glitch. I need to check with no wind to compare with previous PIDT1, that IMHO, is the best I´ve seen till now. (But, Ive used defaults PID so, sure that this can be improved a lot).

    When in loiter, if you move the stick, sometimes it looks to pass to "stabilize" (although still indicating loiter) flying away the set point. Most of the times it works well and make a Loiter reset at stick release. Need to test more this small issue (maybe it was the hard wind)

    In summary, a good fw, having all the features working well, considering  I´ve used default PIDs in a very different custom quad from refference stock one.

    Thanks a lot, Jason for that. Dificult moments now with a lot of critics all along, but I do support the offitial development line. 


  • congratulations for the great work of the Development Team

  • First test of b6 went VERY WELL!!

    Decided to first try the default params.

    Put the helmet on, did all my usual tests moving the quad then the sticks about, all feels very together, not perfectly tuned, but I only had ten minutes to play so i thought i'd give it a go in the back yard. 

    It seems very very good! I've not got it locked in at all, - done no tuning yet - I still have rate_d at zero etc, so I will give the igor tuning method a go when i get back later, but for the first time for me anyway it was perfectly flyable 'out of the box'. I'll update RUIs spreadsheet with my perfect params later when i get back.

This reply was deleted.


DIY Robocars via Twitter
RT @donkey_car: Human-scale Donkey Car! Hope this makes it to a @diyrobocars race
Jun 25
DIY Robocars via Twitter
Jun 25
DIY Robocars via Twitter
Jun 16
DIY Robocars via Twitter
RT @GrantEMoe: I won my first @diyrobocars @donkey_car virtual race! Many thanks to @chr1sa @EllerbachMaxime @tawnkramer and everyone who m…
Jun 13
DIY Robocars via Twitter
RT @gclue_akira: JetRacerで自動走行したコースを、InstantNeRFで再構築。データセットは別々に収集 #jetracer #instantNeRT
Jun 13
DIY Robocars via Twitter
RT @SmallpixelCar: SPC 3.0 Now the motor also works. This car is doable. I just need to design a deck to mount my compute and sensors. http…
Jun 13
DIY Robocars via Twitter
RT @SmallpixelCar: My new car SPC 3.0.
Jun 7
DIY Robocars via Twitter
RT @SmallpixelCar: High speed at @diyrobocars thanks @EdwardM26321707 for sharing the video
Jun 7
DIY Robocars via Twitter
RT @SmallpixelCar: Today at @RAMS_RC_Club for @diyrobocars. Used @emlid RTK GPS and @adafruit @BoschGlobal IMU. Lap time 28s…
May 28
DIY Robocars via Twitter
May 15
DIY Robocars via Twitter
May 14
DIY Robocars via Twitter
May 13
DIY Robocars via Twitter
RT @f1tenth: Say hi to our newest #F1TENTH creation for @ieee_ras_icra next week in Philly. It’s going to be huge! 😎 🔥 @AutowareFdn @PennEn…
May 13
DIY Robocars via Twitter
May 11
DIY Robocars via Twitter
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Noticed my car zigzagged in last run. It turned out to be the grass stuck in the wheel and made the odometry less accura…
May 8