Electronics

Toggles, rotary switches, potentiometers, quadrature encoders, etc are all interfaced via a handful of microcontrollers – one Teensy++ 2.0 (with I2C port expanders) and several Pololu A-Star 32U4 Micros. All run custom code and present themselves to the PC as standard USB HID devices – keyboards or game controllers.

Initially I just had the Teensy++ 2.0, but realized routing cables from all over the rig back to it was a big mess. I still use it, but every additional panel, or group of panels that I add has one of the A-Star 32U4‘s locally. That way I only have to run USB to each new panel’s A-Star and the large number of wires from the A-Star to the switches is localized. Add a few USB hubs and its more elegant.


Why those MCUs?

I picked those two boards because they both have native USB on their MCUs. That way I can run USB HID libraries that emulate a standard USB keyboard or a game controller. The Teensy has that native as part of the Teensyduino software. On the Pololu A-Star 32U4 Micros, I use an awesome library from Matthew Heironimus. Thanks!

My code then turns every switch action either into a game controller button press, or a pulse, or a keypress depending on what sort of switch I’m working with.

For example, for most toggles I send a game controller button press on closing, then another button press (on another button number) on opening. That makes it really easy for most simulators to map the switch up and switch down positions. My “simulator mode” panel customizes some of those responses based on which simulator package (X-plane, MS Flight Sim, IL2, etc.) I’m running. This makes it easy to accommodate any simulator software nuances. For the most part though, the mapping is the same.

There are many other approaches, tools, and plug-ins, etc., but most of those tie you to one simulator package. My goal was to be simulator agnostic. This isn’t a perfect setup, but I like how it’s worked out.


Main Electronics Panel

This panel does actually come off. Just held on with magnets. The screw heads are fake – 3D printed replicas on this panel only. I couldn’t help myself.

This is where the Teensy++ 2.0 board is. Also has two Microchip MCP23017 I2C port expanders to provide more digital GPIOs. This board handles ~75% of the left console’s I/O.

Wall wart on the left zip-tied vertically is 12V for the LED backlighting. Perf board below the Teensy’s board is 12V distribution for all that lighting.


Left Console A-Star MCU

The was a later addition and handles the analog inputs for the Spoiler and the two Mixtures. It also reads in the left and right Magneto rotary switches.


Right Console A-Star MCU

This A-star MCU handles all the panels behind the pilot’s right elbow, including Sim Controls, Fuel Selector, Pitot Heat, Fuel Boost Pumps, and Fuel Cutoff.


Another A-Star MCU

It’s not visible in the photo below, but there is another A-Star MCU under the HDG/ALT/VOR/ADF panel. This MCU is dedicated to this panel and reads the encoder and drives the 4 digit 15 segment display.

You may also notice some diagonal lines on the panel cover. Once I had a 3D printer, I did some of the panels with it instead of the CNC since it was faster and easier. Especially panels like this one that had no backlighting and could just be printed solid without worrying about engraved text.


Uno Solo

There’s also an Arduino Uno (the only actual true Arduino in this whole thing) in the Right Console custom radio panel. It controls the off the shelf Saitek Radio Panel by replacing its rotary switches with GPIOs and outputs from a 74HC138 3-8 decoder. A more complete explanation and additional photos are at Right Console – Radios.