How to Program 6 Flight Modes for ArdupilotMega - JR 9303 Example

In the APM wiki, on the page about connecting your RC equipment, there is the following comment:
If you want to have six modes, you'll probably have to configure your RC transmitter to do this. That's usually accomplished by mixing a two position switch and a three position switch on your transmitter.

However, no example is given as to how this mix might work. In the comments to this blog post Setting Flight Mode with Hitec Aurora 9 there is a method given by Juan Enrique that I did in fact get to work with my JR 9303, however, it only gives you 5 flight modes, and not 6.

For those that want the full taco, and have a Tx with both a 3-position switch and a 2-position switch, try the following mix. I've only tested this on my JR9303 but really it should be easy to translate to any other Tx.

1) Choose your two switches. For this example I am choosing:
- Flap switch = 3 Position switch (also called my Flight Mode switch on the 9303)
- Gear switch = 2 Position

2) Modify the end-point (or travel adjust) on your 3 Position switch. Instead of travelling +100/-100, you need to change it to +65/-65. On the JR radio, if you are also using the Flap switch, this will actually show as Up 65/ Down 65, but it's the same thing.

Don't mess with the end-point (or travel adjust) of your Gear switch, leave it at +100/-100.

3) Now create your mix. On the 9303 there are two types of mixes: programmable mix 1 & 2 are multi-point, 3-6 are "standard" mixes. While you could probably get the multi-points to work, don't bother, just pick one of the standard mixes. I chose mix #3.

You are going to mix your 2-Position Switch (Gear) -> 3-Position Switch (Flap). In some terminologies, the equivalent statement is that your Master Channel will be the 2-Position Switch, and your Slave Channel will be the 3-Position Switch.

Really the screenshots below will explain much better than I can in writing. Basically:

- When your 2-Position Switch is "On" (position 1), set the mix to the 3-Position switch at -17 for the 3-Position switch in the "down" position, and 0 for 3-Position Switch in the "up" position.

- When the 2-Position Switch is "Off" (position 0), set the mix to the 3-Position switch at -33 for the 3-Position switch in the "up" position, and 0 for the 3-Position Switch in the "down" position.

4) Confirm that you get the correct PWM measurements. Do this by using the convenient test mode on the APM (v2 only), accessible via the CLI. See this page for how to access the CLI: APM CLI. Once connected to your APM, type "test" then hit Enter. Next type "pwm" then hit Enter. Make sure your radio is on. You will see rows streaming by with the PWM outs for all 8 channels. If you have the standard setup your flight modes will be on channel 8. Confirm that by moving your 3-Position and 2-Position switches you get all 6 of the following PWM values, or close to it:

1815
1685
1555
1425
1295
1165

These are the ideal values, but if you are slightly off that's ok. For reference, here is what the APM is looking for:

Flight Mode #
  --  Min. PWM  --  Ideal PWM  --  Max. PWM

#5  --  1750  --  1815  --  >1815

#4  --  1620  --  1685  --  1749

#3  --  1490  --  1555  --  1619

#2  --  1360  --  1425  --  1489

#1  --  1230  --  1295  --  1359

#0  --  <1165  --  1165  --  1229

 

You can assign any flight mode to any number with one exception: Flight Mode 5 (PWM >1750) is ALWAYS manual. This can't be changed (unless you want to modify APM code yourself). The reason for this is the fail-safe.

To assign the desired flightmode to each of these numbers (except of course #5), you again use the CLI in the Setup Menu -> "modes" command.

Question: Since Flight Mode 5 is always Manual, what happens if you don't like the direction your Tx switches end up at? You can try two things:
- Use channel reversing on your 3-Position switch.
- For your 2-Position switch, you'll notice that reversing the channel on your Tx will have no effect on the PWM output. If you want to reverse your 2-Position switch, you have to modify the mix. Instead -17 and -33, change these mix values to +17 and +33, and swap their locations (from 3-Position switch "up" to "down" and vice versa). Again, see the photos below for clarification.

Question: What if my PWM values aren't exactly what you get? In this case, try adjusting the mix values. Note that if you increase one, you will probably need to decrease the other (so if you up the 17, you might find you'll need to lower the 33). The end-points also make a difference and if you want you can adjust those, but I think the +65/-65 is what you really want.

Hope this helps someone... It drove me nuts for hours.


Luke



Travel adjust / end-point adjust (different names for the same thing). Set your 3-Position switch to +65/-65 (here I am using the flap switch)



Mix your 2-Position switch (Gear in this case) to your 3-Position switch (Flap in this case) and have the mix be controlled by the 2-Position switch (Gear)



Alternate mix if you want to reverse the direction of your 2-Position switch (Gear in this case). To reverse the direction of your 3-Position switch, just use the channel reversing function in your Tx.


Example output of the "pwm" test program from the APM command-line-interface. Channel 8 is showing flight mode #5 (manual).



Views: 15369

Comment by Bertrand Duchiron on April 18, 2011 at 4:18am

Om my Futaba 8FG, I use the sub menu 'Function' in the 'Linkage menu'

 

I assign the switches SA (3 positions) for the CTRL and SB (3 positions) for the TRIM with a rate of 50% and NORMAL Mode, So I have 6 different switches position to assign to the APM flight mode.

 


3D Robotics
Comment by Chris Anderson on April 18, 2011 at 7:22am
Excellent! I've added a link to this in the wiki.
Comment by Dorulet on April 19, 2011 at 12:04am
Works on my Futaba 7C 2.4GHz as well!!!
Comment by Luke on April 19, 2011 at 12:19am
Bertrand and Dorulet, thanks for posting. These comments might help others with radios similar to yours. It would be nice to accumulate a decent compilation so anyone could get this to work without pulling their hair out.
Comment by Martin Poller on April 19, 2011 at 12:34am
I've now got 6 modes set up on my Futaba 9C. Thanks to a very nice gentleman called Larry, from the USA, who took lots of time to explain how to do it in great detail. It's all posted in the Wattflyer forum, in the RC radio,Transmitters, Receivers section.
Comment by Luke on April 19, 2011 at 12:40am
For those interested, here is a link to the thread Martin mentions: Futaba 9C Switch Mixing.

Martin, it looks like you ended up using five mixes? That's quite a few, but if you have them to spare, I suppose it doesn't matter. If Dorulet got the other method to work on his 7C, I wonder if you couldn't also get the single-mix method to work on your 9C? Not that you need it now... just curious.
Comment by Kevin Bouchard on April 21, 2011 at 11:53am
Ok, so this thread helped me a lot while setting up my Spektrum DX7 to do this, so I signed up to share.
I'll refer to the page numbers from this pdf: http://www.spektrumrc.com/ProdInfo/Files/DX7_Manual.pdf
(as counted by the acrobat reader software, not the numbers printed at the bottom of the actual pages)

The functionality you're looking for is [PROG.MIX#], where # is a number from 1 to six. This is described on page 32 of the manual. I suggest using the number 5 or 6 mixes, that way the 3-point switch's trim carries over. You can use the gear switch as your 2-point switch to conserve your trimmable 2-point switch for another use if needed.

The following 3 steps are the equivalent of the same number steps from Luke Middleton's original post.

1) First make sure that the [INPUT SELECT] (page 22) is set to AUX: 2P SW, and FLAP: SYSTEM, with FLAP TRIM: ACT. This will ensure the right switches activate the right channels, and that the 3-point switch's trim is active to facilitate later tuning.

2) Go to  [FLAP SYS.]. This function is explained on page 30. It uses the same up/down convention as described by Luke. Just go ahead and set both values at 65. Keep MID at 0. Don't touch the ELEV column.

3) Then, following Luke's instructions, your [PROG.MIX#] screen should look like this (using GEAR as the 2-point switch):

[PROG.MIX#]
    GEAR->FLAP    ON
        RATE:  - 17%
                    - 33%
        SW:ON
        OFFSET:     0

You'll have to do some testing to adjust all values correctly, but you can use the Servo Monitor (page 34) to see if you did the right thing. When you flip the gear switch, both FLAP and GEAR should move. You can also see if the flap trim works.

Finally, the Reverse Channel function is explained on page 27 if you think you need it.

Hope this helps! I didn't test it on an actual Arducopter but it should give you a good idea of what to do.
Comment by Todd on May 1, 2011 at 5:00pm
Dorulet, could you list all of your setting for the 7C?  According to Futaba this is not possible.  Any help would be greatly appreciated.
Comment by michel pet on May 15, 2011 at 9:31am
i need a mx22 setup or explane  me hou to do it.
Comment by Naji Karim on May 29, 2011 at 8:24pm
I have a 9303 and followed the noted instructions. When I am trying to set  "MODES" with the the Gear-Aux2 switches in the defualt position- I get Pos-4: Auto but if I wait the modes start cycling for the Pos-4. I am NOT moving the Aileron so I am not sure what's going on. When I check the PWM the output value is pretty stable.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service