Updates:
2014-03-31 Transistor value changed to make the 5-way selector steps linear.
Background
Im professional pilot and are drilled to allways think more stebs forward and allso to let the tecnologi help us humans from doing stupid things. We are almost always self-blame for accidents and mistakes made, both in the commercial aviation world, but I think this is true allso in our "Arducopter world". So it is only to realize and let our well prepered procedures and the incredible tecnologi of 2014 help us... :-)
Here is how I get 6 mode selection with use of 5-way selector from SparkFun https://www.sparkfun.com/products/10541 and safety switch on my Graupner MC-20.
General operation
For safety, I want a safety switch in OFF (down) position is programmed to STABILIZE (STAB) mode, independent of the 5-way selector position. When safety switch is set to ON (up), the 5-way selector work with the other 5 modes.
Safety switch
The safety switch must set STAB mode in close operation. This is because if the wiring to the switch is broken, than the 5-way selector modes will still be valid. You can not switch to STAB, but that is not critical. I can still land and DISARM (from ver3.1) in for example ALT and LOITER mode. In opposite case, the broken wire would lead to STAB mode. If this happend for example when you are in maximum descend with the throttle stick in minimum, the copter would fall out of the air unntil you recover the situation with rising the throttle stick. Maybe the copter would not recover at all due to high descend rate and prop-wash-turbulence.
5-way selector
The 5-way selector must (for safety) be programmed with ALT mode in one of the extremeties. This because if I get trouble with compass or GPS during flight, I want to quickly go out of compass/GPS dependent modes (and this happend relatively often when flying next to tall buildings and iron constructions). I relay quite much on the barometric altimeter, soI accept to only haver altimeter depending modes on the 5-way selector. But... all can go wrong, så the safety switch will allways go directly to STAB mode independent of the 5-way selector position. Another safety reason of the STAB mode "behind" the safety switch is that I will not have be able to set .
Standard flight procedure
In my standard procedure (I allways using checklist) I do the takeoff and landing in STAB mode. In approx 10m height, I toggle the safety switch to ON after takeoff (OFF before landing) and therefor goes to altimeter dependent modes (modes in 5-way selector) during "cruise". This is safety when flying far away because I never inadvertently switch to STAB and have the throttle stick in minimum at the same time. In this case the mulitcopter will fall out of the air and maybe never be able to start the motors or cancle the high rate of descent due to prop-wash-turbulence.
Building the 5-way selector
First I solder 6 resistors from the 5-way selector pinouts to two points; the one is for the transmitter positive and the other the transmitter negative (gnd). No matter what to pos and what to neg; to swap those will lead to reverse the operation.
The resistors are soldered to the 5-way selector in this order (no matter if starting from left or right) (value in ohms): 4700, 1500, 820, not connected (or together with the next pin), analog signal, 820, 1500, 4700.
The 2 middle pinouts (they are connected together inside the 5-way selector) give us the analog signal that goes to the transmitter analog input.
Connection to TX
Here I've used a free input on my controller called "Uv1" in the TX software. This is a 5pin connector (the 3 pin in the middle seem to be connected together and I dont know why???). Connect GND to left pin, analog signal to the middle pin and + to the right pin. I've using female headers found here https://www.sparkfun.com/products/115. If you turn the connector 180 degrees, the 5-way selector will operate in reversed direction. You can also do this in the software menu Servo Adjust.
TX setup
MIX-only to let the input signal goes via the mixer only and not directly to the TX output
Setup two Free Mixers; Mixer C9 for safety switch (Switch on the left of upper LCD display. Set to down/OFF on the picture) down/OFF and Mixer C10 for safety switch up/ON.
Set C9 mix so that both extremeties of the 5-way selector gives Output of -100%.
Set C10 mix so that minimum and maximum extremeties of the 5-way selector gives Output of -80% and +100%.
Settings above is to start with and must be adjusted to give values well inside PWM values on picture below (center values of 1165, 1295, 1425, 1555, 1685, and 1815 microseconds). Se http://copter.ardupilot.com/wiki/flight-modes/ (and here http://copter.ardupilot.com/wiki/common-six-modes/) for more info.
IMPORTIENT: Remember allways to test the setup well before first flight. I haven't done flights with this setup yet, but will update the post if I see something that should be changed.
Have a nice flight!