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: 15418

Comment by Luke on May 30, 2011 at 12:11pm
Naji, you say the PWM is stable, but if you check, what is the value? Is the AUTO PWM around 1815, or is it down closer to 1750 or something?

Also, check to be sure you don't have any trim or subtrim on your aileron channel, that could cause the cycling you see as well.
Comment by Stephen Palmer on October 4, 2011 at 7:30am

I have a JR 11X transmitter.

Has anyone set multimode on this radio before.

Would the JR9303 setup be similar??

 

 


Developer
Comment by Doug Weibel on October 4, 2011 at 7:59am

I don't have a 11x, but had a 9303 and have a DX8.  The setup is similar on all of these.  Basically you are just mixing a 2 position switch and a 3 position switch to hit the 6 target pwm values.

 

If you get set up to see the pwm values using either the cli test or the radio setup screen in APMPlanner it should not take long to find the correct mix for your radio.

Comment by glenn nafin on March 14, 2012 at 9:26pm

wow, this setup work great... thanks....

Comment by Bob base on April 16, 2013 at 2:42pm
Followed your set up when i go to calibrate the program recognises my switches an sticks and there rang appears to be close to what you show
When i go onto the mode page the modes only recognise the gear switch 0 and 1 which green highlight mode 1&6 the modes will not recognise the flap switch at all
I als notice that you have flight modes on your radio enabled do i need to set up a flight mode i am a newbie at this radio setup
Comment by Terry McKinley on October 6, 2013 at 12:25pm

This works on a DSX 9 thanks

Comment by Larry Olson on February 20, 2014 at 2:03pm

How do you read the 6 PWM values using Mission Planner? Thanks

Comment by Henry Lee on June 12, 2014 at 9:30pm

Hello, I have been follwing this discussion pretty closely but for the life of me, I just cannot seem to get the apm 2.6 to work. I just bought myself a pre-loved ironman 650 quad with apm 2.6 setup. I have been 'severely lost in the woods' since getting this lovely craft 10 days ago. I have been flying helis for abt a decade but the programming of the apm will blow fbl gyro out of the water anytime. as mentioned, I just can't seem to get the 6 flights mode required for the apm. For the wiring of the apm, i m using ar8000 gear ch is plugged to port 5 of apm, aux2 is to port 6 and aux 3 is plugged into port 7. port 8 is empty as of now. I am using a dsx9, I have not been able to mix the programming to get the radio to move 6 positions in the radio calibration screen of mission planner. Just wondering if I coul seek yr advice as regards to what I am doing wrong or omitting something? I have not slept properly since the purchase of this quad and THE wife is seriously pissed with me for spending all this time in front of the computer instead of spending time with our baby boy.

 

Comment by Toby Lankford on September 1, 2014 at 3:12pm

I banged my head with this for three days.  I finally have it working for 6 flight modes.  I followed the instructions exactly except instead of channel 8 I had to switch flight mode channel to channel 6.  In channel 5 it would use the gear but the flap switch did nothing just giving me two flight modes.  On channel 8 was just a slider and same issue if I made 8 the gear switch.  So I had to finally just switch to channel 6 and that made everything work perfectly.  To be fair it would have only been thirty minutes and not three days if this information was readily available.  This is pretty much the only flight mode programming you can find for APM or pixhawk for the JR.  I am grateful for this but I hope that someone can update the front end so that it is more complete.  Thank you for all of your contributions.

Comment by eddie birdsong on February 22, 2015 at 6:45am
How did you go from 8 to 6?? Please explain this cause I'm going crazy here.. been trying to get this for 2 weeks now. I did everything he said and can only get 2 flight modes. Please help. Thanks

Comment

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

Join DIY Drones

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service