I know there are instructions for setting up a DX7 and a DX8 to get 6 modes out of channel 5, but the DX7s is a bit different from each of those other transmitters.  Here are screen shots of the 3 sets of changes you need to make to use the 2-way Gear and 3-way Flap switches to send 6 different modes down channel 5.

3689462056?profile=original

3689462038?profile=original

3689462077?profile=original

I hope those are legible, My screen is pretty scratched, and of course for the millionth time I wish the display was backlit.   

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Folks:  I have made yet another tutorial, but one that I hope will be more generally useful.  My challenge was getting the 3DR X8 working with a 6-button switch, but hopefully these instructions will help.  I found the trick was having Mission Planner running while doing these adjustments so you could monitor the PWM values.  I mapped the FLAP switch to the GEAR channel, used the GEAR switch as AX1, and adjusted it so FLAP cycled through modes 2, 4, and 6 initially, then used a Mixing to use the GEAR switch to subtract values so it would adjust it to modes 1, 3, and 5 when it was in the 0 position:

    https://docs.google.com/document/d/1ttMgzVP7TFbCMU98VWiYPnMKLOf4kp4...

    Let me know if you have any mods to this, but it worked for me.  

    X8 Setup
    Programming 6-way switches for Flight Modes on X8 with Spektrum DX7S to match the “Flight Modes” instructions that come with the 3DR-X8. Jonathan A.…
  • Hi ya'll,

    I've been reading all your posts and learned a bunch but still not able to figure out how to program my DX7s to work with my Arduflyer 2.5   .

    If anyone has already made one file that I can load to my DX7s , it would be so much appreciated.  If there is already one on the blog, I am not able to find it.. ;(

    Thanks in advance.

  • Here is a way to obtain the 6 flight modes on the Dx7s, using the gear channel & the Mix switches only.

    -In the Sw Select menu (hold down roller while powering on), set "Flap:Gear" (your 3-position switch)

    -now power on and go to Mixing menu

    -set the following in "Mix 1" and "Mix 2" settings

    3692940343?profile=original3692940489?profile=original

    I am a heli-guy so I am used to the "throttle hold" as an easily accessible large switch for emergencies so I use the the Mix stick on the right bottom by habit.

    So as to keep all of the flight mode switches on the same side, I have physically moved the 3-position flap switch to the Rudder D/R position on the transmitter (easy cutting and soldering inside the case).  This allows me to not  give up altitude control when changing modes (left hand stays on stick) or going to a fail safe mode in an emergency.

    I have the 6 flight modes set up so when the mix switch is up it will always be in Stabilize mode, irregardless of the 3-position switch.  Then I have programmed the other 3 flight modes to whatever I prefer - always knowing that I just have to flick the mix switch and it will always go to back to fail safe Stabilize.

    3692940518?profile=original

    Hope this helps people.  Be safe.

  • Just got 12 modes onto one channel!  I will use it for camera tilt, using three switches.

    I used the flaps switch, plus F-mode and Elev D/R, with 2 mixes.  Here is the monitor with the 12 positions marked.  I was not as methodical as Bruce - I just chucked some values in, then set the sub trim to zero the position.

    Here are pics - note the backlighting! :)3692924878?profile=original

    3692924992?profile=original3692925020?profile=original3692924890?profile=original3692925055?profile=original

  • Thanks for that Bruce.  I was also soooo irritated by the DX7s not having backlighting, and one afternoon I had it open and stuck some in.  Its not hard at all - here is a post about it: http://fpvlab.com/forums/showthread.php?24422-DX7s-simple-DIY-backl...

  • Let’s look at the math of how to encode 6 values on two switches, one of which is a two-position switch (for example, GEAR on a DX7s) and one of which is a three-position switch (for example, FLAP on a DX7s). We can think of this as a problem of encoding a ternary (base 3) number, where the FLAP switch takes on values 0, 1, or 2, and the GEAR switch takes on values 0 or 3. Add the two together, and you get 0, 1, or 2 by moving the FLAP switch with the GEAR switch in the “0” position, and 3, 4, or 5 by moving the FLAP switch with the GEAR switch in the “1” position.

    Now, the DX7s with a compatible receiver, for example the AR6115e or the AR8000, puts out a pulse width of about 1900 microseconds (us) with a two-position switch in the “0” position, and a pulse width of about 1100 us with the two-position switch in the “1” position. If you have a three-position, switch, the pulse widths are 1900 us for position “0”, 1500 us for position “1”, and 1100 us for position “2”.

    This seems backwards to me, because I like smaller numbers to correspond to shorter pulse widths. The first thing I do is reverse the switches, so position “0” corresponds to 1100 us, position “1” for a three-position switch (e.g., the FLAP switch) corresponds to 1500 us, and position “1” for a two-position switch or “2” for a three-position switch corresponds to 1900 us. For the remainder of this discussion, you can assume I’ve reversed the GEAR and FLAP switch channels.

    Now the goal for the Flight Mode setup for the Ardupilot is as follows:

    Flight Mode 1: 0 - 1230 us
    Flight Mode 2: 1231 - 1360 us : middle = 1296 us
    Flight Mode 3: 1361 - 1490 us : middle = 1426 us
    Flight Mode 4: 1491 - 1620 us : middle = 1556 us
    Flight Mode 5: 1621 - 1749 us : middle = 1686 us
    Flight Mode 6: 1750 + us

    We can see from the table above that the range of pulse widths for any mode between mode 2 and mode 5 is 130 us wide.

    The next question that occurred to me is how does the servo Travel function in a DX7s work?

    It seems that the answer is based on a range of values for any given channel of -150% to +150% of 400 us around a center point of 1500 us. For example, if I want a range of 1300 us to 1700 us (i.e., 1500 us -/+ 200 us) on a specified channel, I’d set the TRAVEL range to 50% on the low side and 50% on the high side.

    Now let’s think about how we might use the Mix function with the three-position FLAP switch in combination with the GEAR switch to choose among six flight modes. Let’s try to set things up so that the FLAP switch adds -130 us, 0 us, or +130 us to the pulse width selected by the GEAR switch.

    If we look at the pulse width ranges for Flight Modes 2 and 5 in the table above, we see that the centers of those ranges are 1295 us and 1685 us. Thus, with the FLAP switch in position “1”, so the mix is adding 0 us, we want the GEAR switch to select either 1295 us or 1685 us.

    Thus, the GEAR switch needs to have a reduced pulse width range on both sides of the midpoint, 1500 us. In GEAR switch position “0”, we want 1295 us, and in position “1”, we want 1685 us. We can calculate the percentage of the TRAVEL range for those two positions as follows: (1500-1295)/400 = 51%, and (1685-1500)/400 = 47%.

    (Why isn’t it symmetrical? Well, 1900 us – 1100 us = 800 us, and 800 us divided by 6 is 133.333… us, not 130 us. Whoever selected the Flight Mode pulse width ranges for the Ardupilot rounded down from 133.333… to 130 us, and started at the shortest pulse width, 1100 us, adding 130 us for each step. So the higher the Flight Mode number, the farther the inter-Flight-Mode pulse width boundary is from where it should have been if one just chose the numbers based on the arithmetic. These boundaries are hard-coded in a series of “if” statements in the “control_modes.pde” file in the ArduPlane source code:

    static uint8_t readSwitch(void){
    uint16_t pulsewidth = hal.rcin->read(g.flight_mode_channel - 1);
    if (pulsewidth <= 910 || pulsewidth >= 2090) return 255; // This is an error condition
    if (pulsewidth > 1230 && pulsewidth <= 1360) return 1;
    if (pulsewidth > 1360 && pulsewidth <= 1490) return 2;
    if (pulsewidth > 1490 && pulsewidth <= 1620) return 3;
    if (pulsewidth > 1620 && pulsewidth <= 1749) return 4; // Software Manual
    if (pulsewidth >= 1750) return 5; // Hardware Manual
    return 0;
    }

    When I set the servo Travel range on my DX7s for the GEAR channel (channel 5) to 51% and 47%, I get pulse widths very close to 1295 us and 1685 us. So far, things make sense to me.

    Now, how to add -130 us or 0 us or +130 us to the pulse width selected by the GEAR switch? Here things make a bit less sense until you do some experimentation and have an epiphany.

    For an experiment, I set the GEAR switch Travel values to 50% and 50%. That translates to 1500 us - 50% * 400 us = 1300 us in the “0” GEAR switch position, and 1500 us + 50% * 400 us = 1700 us in the “1” position.

    Then I programmed a mix (in my case, Mix 3, because I’d used Mix 1 and Mix 2 for other functions for manual flight mode) as “AX1 -> GER” (translation: AUX1 to GEAR). I set both Mix 3 Rate values to 50%. Then I wiggled the GEAR and FLAP switches and watched what happened. The following table shows the switch settings and resulting pulse widths:

    GEAR FLAP Pulse Width
    0 0 1200 us
    0 1 1300 us
    0 2 1400 us
    1 0 1600 us
    1 1 1700 us
    1 2 1800 us

    Then I tried setting the second Mix 3 Rate setting (the lower number on the DX7s display) to 100%. The results were as follows:

    GEAR FLAP Pulse Width
    0 0 1200 us
    0 1 1300 us
    0 2 1500 us
    1 0 1600 us
    1 1 1700 us
    1 2 1900 us

    So, now I can form a hypothesis about how the DX7s mixer function works, at least for the GEAR and FLAP (AUX1) switches:

    The GEAR switch is the primary switch controlling the pulse width, and the FLAP switch is the secondary switch.

    When one sets travel values on the GEAR switch, the Travel value (a percentage) is multiplied by -400 us (upper travel setting on the DX7s display) or +400 us (lower travel setting on the DX7s display) and the result is added to 1500 us to determine the output pulse width for GEAR switch settings “0” and “1” respectively.

    When one sets mix rate values for AX1->GER mixing, the mixer rate value (a percentage) is multiplied by -200 us (upper mixer rate setting on the DX7s display) or +200 us (lower mixer rate setting on the DX7s display) and the result of this multiplication is added to the pulse width selected by the GEAR switch to determine the output pulse width for the selected GEAR switch and FLAP switch settings. When the FLAP switch is in position “0”, the upper mix rate setting is multiplied by -200 us and added to the pulse width selected by the GEAR switch. When the FLAP switch is in position “1”, nothing is added nor subtracted from the pulse width selected by the GEAR switch.

    When the FLAP switch is in position “1”, the upper rate setting is multiplied by +200 us and added to the pulse width selected by the GEAR switch.

    So in order to get the FLAP switch to add -130 us, 0 us, or +130 us to the pulse width selected by the GEAR switch, it would seem that I need to set the mixer rate settings to 130/200 = 0.65 = 65%, nominally.

    And what do you know--that works pretty well! I ended up having to tweak the mixer rate settings a little bit to get within a few microseconds of the Arduplane software’s desired pulse widths. You may have to do the same.

    So to sum up, my step-by-step configuration technique is as follows:

    1. Connect Channel 5 out of the receiver to Channel 8 on the Ardupilot board.
    2. On the DX7s, reverse the GEAR and FLAP channels.
    3. On the DX7s, set the GEAR Travel settings to 51% (upper number) and 47% (lower number).
    4. On the DX7s, program a mix (I used Mix 3) for AX1->GER (AUX1 = FLAP switch to GEAR), and set the rate settings to 65% (upper number) and 65% (lower number) with Offset = 0%, Trim = Inh, and Sw = On.
    5. Monitor the pulse width of Channel 5 of the receiver or the Flight Mode input of the Ardupilot using the Mission Planner or using an Arduino board running the Digital_In_7_uS_Timer sketch or another suitable sketch. Set the FLAP switch to position “1” (center position). Tweak the Travel settings on the DX7s Gear channel to achieve pulse widths of approx. 1295 and 1685 us.
    6. Set the FLAP switch to position “0”. Tweak the upper mixer rate setting on the DX7s mixer display to achieve pulse widths of approx. 1165 (GEAR = “0”) and 1555 us (GEAR = “1”).
    7. Set the FLAP switch to position “1”. Tweak the lower mixer rate setting on the DX7s mixer display to achieve pulse widths of approx. 1425 (GEAR = “0”) and 1815 us (GEAR = “1”).

    Be willing to tolerate minor errors (+/- 10-15 us) in the nominal pulse widths listed in steps 5-7 above.

  • That's what I use Aux2 for as well. Unfortunately, I'm just not sure since Aux1 is used for mixing to get 6 flight modes. It might only be possible with the dx8 since it has an extra channel. You might experiment by replacing AX1 in the mixing menu with something else but the Dx7s only has so many channels available. No way around that.
  • AUX 2 is used for manual tilt. Leaving me nothing for even the shutter.
  • I'm really not sure about that.  I just built my setup off of the initial posting in this thread, which used AUX1.  AUX2 should be free for you to assign as you like.  You should be able to re-assign the switches as you see fit in the SW select area of the menu but I'm just not sure about completely freeing up AUX1 because this setup essentially only leaves AUX2 open for your extras. 

  • Is it possible to have this setup and still be able to use the AUX1 channel? My gear Channel (5) is setting the flight modes great but I would still like to be able to use the AUX1 channel for switching another accessory. When You look at the live "Radio Calibration" I see the AUX1 channel PWMs changing. Can I mix in a way that I can still have the AUX1 channel available?

This reply was deleted.