came out with a 6-way mode switch.
the solution that will make your life easier. REALLY.
First to credits - Max Levine has firstly shown this method here, using 'off the shelf' resistor values, which might work, but keep on reading to find out why exact values are important.
i came out with a small rotary switch, that fits EXACTLY the space in Turnigy 9X.
it is intended for replacing the PIT TRIM knob. top left of your radio.
i calculated and found out the exact values that will give nearest PWM values to these needed by the APM to stay reliable in the middle of the position range, which means no accidental mode switching.
HOW TO GET IT ?
You can get it now - with low cost WORLDWIDE SHIPPING
please check out the 6 position mode switch for ardupilot on ebay
No more mixing and setting for 2\3 way switches of your radio !!!
No more hard-to-remember switch combinations !!
Some theory and explanation:
there are 6 slots for 6 positions.
the PWM value is detected and according to it - the position(and flight modes) are set.
these are the position SWITCHING POINT values: 1230, 1360, 1490, 1620, 1760
which means, we have to target the MIDDLE of the switching points to stay on a certain mode, with the safest margin from the switching point value.
except for the first and last positions (0&5) where we can be even safer, choosing the very first and very last value of range.
you end getting this as IDEAL pwm values for modes:
1085 (or lowest your radio will allow)
1295
1425
1555
1690
1920 (or highest your radio will allow)
Now the catch
mathematically it's easy to calculate the needed resistors, because these are steady steps, and could use the same value resistors.
BUT IN PRACTICE my testing have shown that the resistance scale is not totally linear with the pwm values.
the reason is quite simple - the radio seem to use some resistor on the incoming +5v rail to the voltage divider (the pot trim) - to limit the current going to the ADC reading chip when the pot is set to full 5v side.
thus the center of the pot (or other resistor) won't give the center of the ADC reading needed.
at least that is what i found with the Turnigy 9x which is very popular. i believe other radios are behaving similar.
This is the reason that probably different radio gear will need different resistors values,
and for the same reason I RECOMMEND THE PRODUCT FOR THE TURNIGY 9X RADIO which is the one i used to find the values. I found the best values to use are (from the GND side to 5v side) 3k9,1k3,1k3,1k3,2k2. all 1% tolerance. can't guarantee it will work at exact values with other gear.
What I've done:
since reliability can't be achieved using 'pre-calculated' values resistors,
i have done careful testings for the exact resistor values that gave the nearest possible to the ideal PWM values above.
Why get it ready made ?
- the price is really similar to ordering the parts individually with shipping costs
- I use high precision 1% resistors which are harder to find - which lead to better accuracy on the values.
- I use a switch that FITS the radio for sure. no guessing...
- it's easier, faster, and doesn't require lot of work to install.
- all switches are tested to be working and for correct PWM values
Comments
Gents, firstly great work ARHEXA on the write-up... longing for the LED Feedback part, I decided to figure it out and do a write up...
http://www.diydrones.com/profiles/blogs/6-position-mode-selection-f...
Enjoy.
LTMNO
OK, you guys could use my channel adding/hacking technology. I have hacked tx's for a while now. If it is pos or neg shift PPM, I can read the PPM and outpit modified PPM by inserting an Arduino mini. Look for the wires that go to the trainer sw. It all runs from ISR's and hardware timers & works very well. I saw in/out on my 2 ch scope and its perfect as far as I can see.
I read the input PPM, ch 1-4 is pushed thru and the rest are synthed all using the same 16 bit timer. PM me if you want the code. You need a scope to see whats going on.
Right i agree, but it's nice to be able to get 6 modes on one easy switch...
hacking ? the situation is always reverse-able - you can switch back to the pot trim...
hardware-wise, the rotary position switch is the most convenient to use... but it sure is a question of personal preference...
This is cool, but is it worth the trouble of hacking your transmitter to have a 6 position knob versus just mixing the 2 position and 3 position switches already there?
I find that I use 3 modes (manual, FBW-A, and Auto) 95+% of the time for my flying, so I program my radio to get those with the 3 position switch (leaving the mixed 2 position switch in its "standard" position) and find it very convenient to use. I think it is fairly easy to tell what position a 3 position switch is in by feel (without looking) while I could not do that with a knob, and I still have 6 modes available if I need them. Programming the correct mix on the T9X is a hassle to figure out from scratch, but there are posts here explaining how to do it.