3689584028?profile=original

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

3689584063?profile=original

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.

3689584105?profile=original

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.

3689584051?profile=original

TX setup

Control input setup3689584131?profile=original

MIX-only to let the input signal goes via the mixer only and not directly to the TX output

3689584175?profile=original

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.

3689584208?profile=original

Set C9 mix so that both extremeties  of the 5-way selector gives Output of -100%.

3689584191?profile=original

Set C10 mix so that minimum and maximum extremeties of the 5-way selector gives Output of -80% and +100%. 

3689584085?profile=original

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.

MP_SetupFlightMode.png

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!

 

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Cool, thats a sweet Tx!

    I did something just like that along with the safety override switch. The only differences are the rotary knob and LED indicators. https://www.youtube.com/watch?v=UJ8pkLg8Fcc

  • Using a rotary switch would be a very clean implementation.  However, it has one inherent negative impact: You can't just thumb/finger switch it.  With the toggle switch, you can swipe at the switch with a single finger without taking your hands off the sticks.  With a knob, you basically need to take a hand off a stick and turn the knob.

    In my 9xr, I use the 3-pos toggle for flight modes, and the 2-pos toggle next to it change the mix giving me six modes.

    Up-A: Stab

    Up-B: Circle

    Mid-A: Alt Hold

    Mid-B: Drift

    Down-A: Loiter

    Down-B: Loiter Super Simple

    The two top switches on the left side I use for the 7 & 8 toggles.  7 is Auto Mode and 8 is RTL.  The 8/RTL switch is the huge throttle cute switch so that is my "oh crap" switch.

  • Hi Magnus, This is a really excellent concept.

    Do you have this working with APM?

    To my understanding should work as 5 mode switch, but from your title you indicate second switch for safety toggle.

    How does that work?

    The APM's current 6 mode select relies on being able to mix a three position switch with a two position toggle in your transmitter.

    Even if it is only 5 modes I think this is worthy of a wiki write up if it can be described for various transmitters.

    Actually I can see if you simply attach an additional appropriate resistor in line with the added single toggle to the same analog transmitter input as the 5 way switch is  in that would produce the 6th PWM value.

    It also seems that a 6 position rotary switch could work well for this.

    Best Regards,

    Gary

This reply was deleted.