Using an adjustable 12 position switch as a GA starter - MobiFlight/MobiFlight-Connector GitHub Wiki

If you like flying general aviation airplanes you might like to have a magneto-/starter switch. Here is a short tutorial on how to do this with MobiFlight.

The hardware

There are 12 position rotary knobs with the name RS26. They are delivered with a small ring which can be used to limit the rotary to e.g. 5 positions which is needed for a starter switch: off, right mag, left mag, both mags, start.

Various platforms may offer these switches: AliExpress, Ebay, Amazon and many other. I selected a 1 pole 12 variant.

Take of the nut and the small ring with a little bent marker. Turn the rotary full counter clockwise. Place it that the little marker will be put into the hole numbered with a 5. Attach the nut to prevent the limiter from hopping out of its position. Now the rotary will only have 5 positions.

TestBoard-StarterSwitch-Rotary

The wiring

In the middle of the switches there is a pin labeled A, this is the common ground pin for all other pins. The terminals are numbered from 1 to 12. For the data pins, connect the terminals 1 to 5 to arduino ports. In the sample the odd Arduino pins 45 to 53 where chosen.

TestBoard-StarterSwitch_Steckplatine

The module setup

Create a Button for each of the connected pins and upload the configuration to your Arduino.

TestBoard-StarterSwitch-ModuleSettings

It should look like this:

TestBoard-StarterSwitch-Rotary-Setup

The input configuration

Create one configuration line for each of the buttons. With my wiring, when looking from top onto the switch, the leftmost position is Button5 (magnetos off) and the rightmost position is Button1 (start).

For each of the buttons open the configuration. Assing the magneto/starter events to the On Press page of every button.

TestBoard-StarterSwitch-ButtonSettings-2

Possible issues

Typically the magneto positions off, right, left and both are easy to implement. You may encounter issues for the start position. Especially aircraft models with sophisticated realism options (like the WBSim C172, A2A PA24 Comanche, Flysimware Cessna 414, ...) may need special events for the starter. The default K-Event (like shown in the above screenshot) might disengage the starter before the engine fires. In this case you might try assigning 1 (>K:SET_STARTER1_HELD) for the On Press and 0 (K:SET_STARTER1_HELD) for the On Release page. But it might be that the aircraft needs further signals to be set.

Enjoy

Start the simulator and enjoy having a physical switch for your magnetos and starter.