Developer

APM now supports Differential Ailerons


3689421013?profile=original
Sometimes APM development goes fast, and sometimes it goes like molasses in winter. After being asked repeatedly (over many months - sorry) I have finally gotten support for multiple aileron channels in place. You can use this if you want to set your airframe up with differential ailerons or if you have separate servos on your ailerons and they don't move opposite directions for a given input.

 

The big delay with this change was coordinating the way we would use channels 5-8 for a variety of purposes.  Functionality is coming for flaps, camera mounts and more.

 

Here are the things to know about using the new dual aileron functionality:

  1. I have tested this on the bench, but have not flight tested it.  I do not expect any problem, but as always with new functionality exercise some caution.
  2. The functionality is in the current version of the code in the repo (trunk).
  3. You can set up the second aileron on either channel 5 or 6.  Remember that it does not matter which channel it is on your receiver.  Just take that receiver output and hook it up to 5 or 6.
  4. For that channel (5 or 6) you will need to set a new parameter.  For channel 5 it is rc_5_funct.  You can set this as a parameter through a GCS like APM Planner, or you can set it using a #define in your config file.  If you set it in your config file use #define RC_5_FUNCT RC_5_FUNCT_AILERON.  If you set it through the GCS set rc_5_funct to a value of 1.
  5. If you want to use differential aileron travel program your radio so that it works as you desire in manual mode.
  6. You will need to redo your radio calibration.   I do not know if APM Planner properly supports calibration of channels 5 and 6, but I will drop Mike O an email about it and I'm sure if it does not now, it will very soon.  The CLI procedure does work fine.
  7. You cannot set the reversing for the 2nd aileron channel with the dip switches (as there is not one available for this).  So, it is highly recommended that you disable the dip switches and set up your reversing using the parameters.  Remember that if you are working with the raw parameter values reversing is 1 or -1.

 

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Doug, do you have any news on flaperons ? i can´t set this function properly under FBW or Auto modes
    THANKS

  • please could you explain me how new fuctions works? because Im trying to shoot my camera through DO SET SERVO action but I can´t!

    I Set: "Do set servo" Function , servo nº5, PWM: 1698 (to shoot camera) and 1390 (to shoot it off).

    But I can´t get it work!

    what value must i set in : RC5_FUNCT, RC5_MAX, RC5_MIN, RC5_REV, RC5_TRIM  ???????

  • There are no problems Doug, I understand that you don't want to debug what will move in another class. I will check my version to be sure that I have the lastest release.

    Anyway, I wanted to look how this project work, to have a view of the whole set of classes, etc...

     

    I will continue my settings through the parameters. Thx for your fast answers !

  • Developer

    JPH - I hate to defer you, but we have just changed the way that channels 5-8 are handled.  I dont' really want to debug what we just moved away from....   A new team member (Amilcar) has just changed our RC channel library to extend a child class for the "auxilliary" channels.  It will make integration of camera mounts, etc. much cleaner.  I believe his changes are checked in to the repository, but probably are not yet in the latest Planner download code.  The setup will change slightly, and has not been documented yet.

     

    I will try to double check that the channel reversing is working properly with the new code and get some documentation in place this week.

     

    The switch-enable stuff is working, but only applies to channels 1-3.  If you are using stuff on higher channels I recommend disabling switch_enable and doing all of your reversing through the parameters to avoid confusion.

  • This is it, Doug, but I already tried to change the value through the QGroundControl (I am under Linux / Ubuntu), but after lot of different tries (transmit, write to rom, reset the APM in different orders) I doesn't work.

    Another interesting thing, I can change the RC5_FUNCT value, and after a "simple" transmit button click, the behaviour of the channel 5 is affected, so the attribution of this parameter, as the setting of the MIN MAX TRIM value of all the channels work well via the MAVlink protocol.

    So I took a look in the APM code, and I saw in the function "static void update_servo_switches()", in the "control_modes.pde" file at the line 47 a comment who say that when the SWITCH_ENABLE option is set to 0, it means that the EEPROM control of all channel reversal is enabled. But I don't know if this feature is implemented yet ?

    When the SWITCH_ENABLE parameter is set to 1, the dip switch reversing work well, but only for the channel 1 with the ROLL switch.

    Thank you for your help, and you do an amazing job with this wonderful ArduPilot Mega !

    I will continue to look in the source to resolve my setting problem.

  • Developer

    JPH - If I understand your question correctly, you need to set the reversing parameter (through the GCS) for the second aileron channel.  The value is either 1 or -1.  If your travel is backwards under FBW, set it to the other value.

  • Hi everybody, does anyone have already used the differential aileron, an calibrated an airplane with it ?

    I am looking to implement the support of the EEPROM channel reversal but I don't know where the sign is attributed to the outputs servos ?

    My problem is that I have the two ailerons witch moves together downward or upward when I move the aileron stick in FBW mode.

     

    Thanks.

  • Alright. I'm not yet in the need for this but I thought it best to give a 'heads up' just in case - and indeed it looks like it's something that could be problematic unless considered early enough to avoid merging issues, since the channels are in short supply.

  • Developer

    @Helldesk - This looks like something that is pretty reasonable/doable.  However, right now it seems like we are hitting some issues with merging the approach that the camera mount team has taken with the approach I have been using for flaps/ailerons w.r.t. the "auxiliary" channels (5-8).  If you would PM me in 2 weeks to look at this again I may be able to knock it out quickly at that time.

  • On this page there are instructions on how to do the split elevon mixing for a Spektrum radio. Scroll down until you see "four servo elevon mixing for the Hercules".

This reply was deleted.