5 Position Spring-Return Key Switch

This key switch simulates the 5 positions on a standard Cessna 172 ignition switch (off, right magneto, left magneto, both, and start) and provides a spring return from the start position.

The switch is assembled from a 3d printed mount, a filing cabinet lock, and a 5 position rotary switch.

Parts List

Cabinet lock 1 (Amazon) Drawer & Cabinet Lock, 1-1/8 in
Spring 1 (Amazon) Extension Spring, 7/32” x 1”
Spring mounting screws 2 (Amazon) Round head screw, #6-32 1/4"
5 position rotary switch 1 (Amazon) Panel Mount 2P5T Rotary Switch
Hex head set screw 1 (Amazon) Hex Head Set Screw

Note The Amazon and Ebay links above are affiliate links and help me pretend that my hobbies are self-sustaining.


The components of the key switch are mounted into a 3d printed mount that allows a cabinet lock to be attached to a rotary switch and the cabinet lock arm to engage a spring when moved into the start position.

File: key_switch.stl (Thingiverse)

The rotary encoder is mounted into the small hole and the cabinet lock is pressed through the panel and into the large hole.

Some modifications must be made to the cabinet lock to allow the shaft of the rotary encoder to be securely attached:

  1. Drill out the screw hole in the cabinet lock body to allow the shaft of the rotary encoder to be inserted snugly into the body of the lock. A washer or two may be needed to ensure the bar on the cabinet lock is securely fitted over the square mount on the cabinet lock body.
  2. Drill a hole in the side of the cabinet lock body and tap it to allow a hex set screw to be secured against the rotary encoder shaft. A hole must also be made in the cabinet lock barrel to allow access to the set screw
  3. Remove the rotational stop from the cabinet lock barrel. This design uses the stops of the rotary switch instead.

The key switch when assembled and mounted into the panel:

For wiring details, see http://www.simvim.com/asx_wire.html. I used parallel 2k resistors as I did not have any 1k resistors in my parts bin.