3D Robotics

ArduCopter 2.3 released

Jason is travelling this week, so I'll take the helm for the next software release post. 

UPDATE: the motor remapping thing was confusing everyone, so we took that out and returned to the regular motor mapping. That means that APM 2 users with Hexas and Octos should wait for the next version. APM 1 users should be fine with any frame.  

NOTE: Hexa and Octo users: there have been motor mapping changes that may affect you. Please don't upgrade until we can update the documentation to reflect the changes. This should happen by the end of the day today (Feb 1).

ArduCopter 2.3 is now available in the Mission Planner.  This is the next revision of the ArduCopter 2.2B6 code, which is perhaps the most tested code we've ever released (1288 comments in the thread!)  and certainly in my experience the best code, too. 

The default PIDs are optimized for a 3DR/Jdrones quad with 850 motors and 10" props. If you're using more powerful motors/props, start by turning down Rate Roll P (default is 0.14, so start by turning it down to 0.1. In general tune PIDs in 25% steps).

Now that we've got solid code out there, we can turn to collecting suggested gains for standard frames, and a better guide to how to tune PIDs for your unique setups. 

Here are Jason's note on the latest changes (mostly from 2.2B6)

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.

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.

Note the Mission Planner does not yet highlight these D terms on the main tuning page (it will soon), but you can find them and modify them on in the Parameters list.

Autolanding should now work well (see video above) and the Tri servo issue is now resolved. 

The code should now compile with Arduino 1.0 (thank, Randy!), but remember that you need to use the "relaxpatch" version of Arduino in our downloads section

[Update: we've reverted the below. See update at the top of the post]

Important for Octo users:

We've changed some of the motor orders for some more exotic airframes. We'll be updating the docs on the Wiki in a day or two to reflect this. Pat Hickey explains:

As before, the hexa plus APM2 motor setup has changed from the ordering [1, 2, 3, 4, 5, 6] to [ 5, 6, 1, 2, 3, 4 ].

The Octa V layout for APM2 is:
6            4
  2        5
    8    1
      3 7
Motors 1 through 4 spin clockwise, and 5 through 8 spin counterclockwise.
Support for roll/tilt camera control on APM 2 should be coming in the next version. Traditional Heli will also be updating to this latest code as well once we track down a memory issue. 
As always, you can see a complete list of changes in the changelogs.

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

Join diydrones

Email me when people reply –


  • 3D Robotics

    Great to see all the good tuning work going on in this thread! We need to start fleshing out the Config file repository in the manual for all the common frames. Once you've got good settings for your frame, please save the Config file and post it in this thread so we can review it and put it in the wiki. 

  • Developer

    ArduCopter V2.3 - Auto Approach (AeroSim):

    I believe that autolanding with big quad (hexa/octo) or heli is quite risky, the wrong approach, some wind and you may make an omelette.
    video shows a functional alternative, the auto approach.

    When engage RTL your quad go to home, once reached very slowly begins to descend, when it reaches the preset height switches to Loiter automatically and wait your tx input... in the video at that point I do a manual safety landing... in my demo I entered "2 meters" of altitude for approach.
    You can even integrate doing so that once reached the altitude of approach the quad autoland after a preset time (if you tx is dead).

    What do you think?

    Bests... Marco

  • ArduCopter V2.3 - Stressing the Loiter with high Stab/Rate PID ( in a Freezing gusty field :D)

    Brrrr!  No video today as my hands went blue and it started to snow before I got the chance.

    However I did manage three batteries :)

    This outing was to see if my fiddling with high stab/rate PID has improved or ruined the ability to loiter.

    I was hoping to try and tune too but got snowed off. Therefore all my loiter and nav params were at the defaults throughout, I will go straight to tuning next outing – and set the camera up straight away ;)

    It was freezing! I left the quad outside for 30mins before I set off to make sure it was ready for the biting cold. Winds were light but gusty, from 5 to 15km/h, measured with a cheapo anometer.

    I did the tests the wrong way round really PID tuned first, then defaults later. So I’ll give you my results in reverse order.


    Normal stock tuning (defaults, other than rate and stab p’s slightly reduced for my frame).

    Stab mode – very smooth indeed as expected. It got pushed about a bit when the wind got up but was very predictable during recovery and held its position very well with little deviation once I’d got it nose down into the wind. It also flew about well too, I can’t wait the get the camera attached! BTW - good props are so much more powerful than flexible cheapos, and slice through things much less readily!

    Alt_hold - baro only – and I forgot to put the foam back on – oops! Anyway it was still not too bad at all, total vertical variation of less than 2 meters, smooth at all times, no rising, no falling. I am going to let my 7 year old have a go on this the next time it’s warm and calm J, buddybox at the ready of course.

    Loiter – remember not tuned at all, just defaults. One loiter just wandered off slowly, I think this was related to the fact that my level wasn’t set perfectly, but had a quick fiddle in the van – relevelled and it was greatly improved. When there was light wind the copter would stay within a 4m box, moving gently about without any real problems. There was no circling, no overshoot, no increase in variation from the centre. Just what I consider to be a very good but un-tuned loiter, I’m certain I can tune this to be great. The reactions to wind were quite slow, but again very predictable, first big gust knocked the quad out of the 4m box, but it very delicately dropped one leg and headed slow back into the box, where it remained till I landed a few minutes later. VERY NICE! And this is untuned.


    PID tuned values (I left everything as high as I can get it without oscillation – the same as last night’s indoor video (rate_D 0.012, rate_P 0.28 (\O/) with rate_I 1.00 and stab_P at 7.5.

    Stab_mode – Straight away I realised that my indoor testing of parameters to the limits of sensible was going to give some interesting results in the wind. The great news is that I think, in many ways it’s an improvement. My rate_P was too high, that was obvious, but at 0.28 I’m not surprised. Did that stop me – hell no!

    So trying to ignore the ability to viciously change direction with a tiny bit of stick input I plowed on. As I’d suspected and hoped the turned params reacted much faster to pretty much everything. When the wind blew it, rather than drifting away it would tip into the wind and fight back more than stock tuning, it looked a bit more like it was trying to loiter! It was a bit wobbly – too much rate_P, but flew VERY positively. I guess the 0.023 rate_P for me that i tried in the garden would be spot on. As it stands you’d need a good roll/tilt mount for the camera to do good AP as the movements were ‘direct’ to say the least. I’m sure slightly milder tuning would improve this.

    Alt_hold – same as above, very good despite winds and an exposed baro, with foam and sonar and fiddling I can see this will be great.

    Loiter - again very similar description to above – just supplement following words:

    “wandered” turns into “refused outright to wander – fought hard at all costs to track back to position after a gust”,

    “gentle” turns into “hardcore, determined and locked in” –still a bit wobbly with my ‘silly’ settings

    “quite slow” turns into “Holy S*&T!” – but hey that’s what you get with EXTREME settings!

    In wind the box-size was smaller, about 2m this time.  And the quad had a permanent lean into the wind with gently pulsing throttle holding it were it was, it got a couple of surprises with bigger gusts, but would only stray just outside of the box,  tipping up and angrily fighting its way back, quickly!

    I think somewhere between these params lies, what will be for my purposes, perfection!

    So next time I go out I’m going to down tune the PIDT1 a touch and really try to tune loiter, with both default PID’s and the super-charged ones. I just need one of those Tx handwarmer things. I only managed to do 3 batteries today by warming my hands on the two spent ones in my pockets!

    Today I will be building a ‘hat’ for my ardu and some snow skids. I have the pipe lagging already and have worked out that just one length with let the copter float on water too :)

    One peculiarity I have noticed whilst swapping params from defaults to PID tuned and back again is the change in what the APM perceives as level. If I in-flight tune the level using tuned PID’s its bang on, then if I swap to defaults the copter want to always lean slightly back and to the right. If i swap params back to PID tuned, it returns to perfectly level. This happens in reverse too, if i auto level in defaults there is a lean forward and left when I swap to PID tuned params. Not really that big an issue but it’s weird and did affect my testing somewhat as I wasn’t able to get a perfect level in the field for the default params. The difference seems to be about 5 trim clicks on both directions on my Futaba T7C tx.

    Happy tinkering :)

  • Hi,

         i have changed #define AUTO_THROTTLE_HOLD from 1 to 0 compiled and download.

    But TRIM_THROTTLE is still changing after each flight.

    Cant get Altitude hold to work. Switch to altitude hold and copter start to climb slowly without control.

    When I connnect again I find a TRIM_THROTTLE parameter higher than hover point....

    Any suggestions?

  • Developer

    ArduCopter V2.3 - Stressing the Loiter with high Stab/Rate PID (AeroSim):

    Hi all! I made this video to show you how the software reacts to keep the quad in Loiter, just see the right stick on the "stick monitor" at the bottom of the screen (Mode 2).
    wobbles you see are normal
    , to
    do this I have exasperated some parameters so that you can see in the "stick monitor" what are the corrections that are given to keep the quad position, of course you see the bounces are due to very high parameters, amplifying the effect is very able to identify what the software does.
    Do not look at the windsock, in playback is always in the same position (AeroSim bug) even if you change the wind.
    This video shows how the Stab/Rate parameters affect with Loiter, then we can expect a good result just thinking of finding a fair value "Loiter / Nav P", but also to have well set on the quad all the section Stab/Rate P/I/D... certainly, these greatly influence the accuracy of Loiter.

    One thing I
    noticed is that corrections of the software are given in a rather not proportional, fairly dry, sounds bad (imho).
    In theory to give a correct command should give for example such a "+10" of correction (stop the wrong drift) followed soon after by a "+5" command maintained for a while (drift to center) and the "0", this would help to quickly stop the quad and give it a softer shift, I hope that Jason has implemented in this way.
    I start the video with Loiter in "zero wind", at 00:24 i switch to "strong wind" (when you see the quad that gets up), and at 1:02 again "zero wind" (the quad loses altitude).
    .. always remains no more than 1.5 meters in radius, good result and no circle, considering the whereas variations of wind snapshots are not easy to manage for the quad (yes, the simulator can be done, in reality I do not think, LOL).
    Another important note, as I always say, Loiter on the simulator is more precise with a lot of wind.
    Consider also that the gps of the sim is absolutely perfect, as our beloved Mediatek sometime makes some sxxt...

    Bests, Marco

  • Hi all, I'm quiet new to the arducopter and even the whole R/C stuff (got my 3DR Quad Kit last Friday).

    Just learned the lesson only to change one thing at a time. 

    Since the last changes I got two problems:

    1. When I arm the quad and pull up the throttle sometimes one motor won't start. Thottle back to off, then rising the throttle again, another motor is stuck just asking a little, but most of the times all start quiet well. Its quiet random.

    2. After takeoff the quad is smoking for a second or so, after that everything is just fine. Flys very stable also alt-hold and loiter, even RTL.

    Things I changed at once:

    1. Removed Bulle-Plug due to having problems with cold solder joints 2 times, and soldered wires directly.

    2. Updated Firmware to 2.3

    3. Loaded Thomas PID Params for the 3DR Quad, which seem really great (thanks), once I'm flying.

    As I read in this comment thread, problems with the shaking after takeoff result from the firmware and can be fixed (will try that now as soon i figured out the uploading through arduino software - Is there any tut on that?)

    I also redid the ESC calibration, without any improvement.

    I don't think its a problem of a ESC/Motor connection as the problem occurs on random Motor.

    Has anyone any hint on this?

    Every help is appreciated. Thanks in advance.

  • @ Duran DeV: Looking good on the vid on page 23! Do you mind sharing the settings you were using for that video? Thx!

  • And here's my param file


    On a separate note, there is something seriously wrong with logging. My copter is producing something like 40 log enteries, all are empty except for 2-3(luckily the ones that actually had the GPS data) and that's after I started the day today by a reset/erase.

    ScarabEuro(Nav tuning).param

  • Yet another day and another set of nav/loiter/rtl tests. Today we only had a light breeze so I guess things were much better. I started off by droping the NAV_I term to zero(read on the wiki that it may cause oscillations and that it's better to tune the P values while this one is zero). Got some improvement over the apparent swaying effect I was getting yesterday and today before dropping the term.Then I started lowering the NAV_P (first to 2 from 2.3) term, I believe I got less swaying, but again the same driting(seems to hold well for a couple of minutes then startes to drift). Lowered the NAV_P even more(to 1.6) didn't notice any improvement. Then I lowered the LOITER_P, and as stated by someone earlier in this thread, didn't notice any difference. Again and like yesterday, RTL seems to work quite well(at least when RTLing from a close distance), autolanding actually worked much better than yesterday. I'm attaching a couple of videos of RTL as well as my final param file and logs for the RTL and LOITER attemps.

    Can someone please suggest where to go next from there? Is what I'm seeing basically as good as it gets?






    VID 00003-20120204-0839.3GP

    VID 00002-20120204-0833.3GP

  • I am planning to use this code to build a x8 coaxial quad.  Has anyone been successful with this config?

This reply was deleted.


Shivchand Jaysaval liked Shivchand Jaysaval's profile
Aug 25