Introduction: Flight Simulator Switch Panel for Xbox/PC

For the casual flight simmer, a peripheral device that sits somewhere between arcade and realism. Hopefully this will inspire someone to make something cool!

How it works:

I built this device to work with Microsoft Flight Simulator on the Xbox series S, although I suspect it should work for PC as well.

The main idea here is to use a USB compatible Arduino (or other microcontroller), to emulate a standard old keyboard and thus send instruction to the game via key commands. We can accomplish this using the Arduino Keyboard library. **You MUST use a USB compatible board for this.

We then build a box with a bunch of switches and buttons, write code to listen for the buttons and map them to specific key commands.

For this device I used one USB compatible Arduino Pro Micro as the main board, and 2 additional Arduino Nano boards essentially as I/O expanders. This simply allows for more available pins, but makes the project a bit more complicated.

** Assumes experience with Arduinos and Intermediate coding skill. **

Supplies

  • Arduino/Microcontroller(s) - One of your controllers must be usb compatible in order to make use of the Arduino Keyboard Library. If you are using extra arduinos as slaves to increase the number of available pins, they do not have to USB compatible. You can find a list of compatible boards here: https://www.arduino.cc/reference/en/libraries/keyboard/.
  • Enclosure
  • Soldering iron, wires, perf board
  • Switches and buttons as per your design

Step 1: Choose Desired Functions

Decide roughly what flight sim controls you would like the device to have. I used a spreadsheet to gather information while going through the cockpits of some of my favorite planes in MSFS. This will help you with designing the layout. Ultimately any button/switch on the device can be mapped to any button/switch in the game, but it helps to have some idea of where everything should be. I play the sim fairly casually but still wanted a lot of buttons and switches on mine!

Step 2: Layout and Circuit Design

Layout:

Once you've figured out which controls you want, it's time to design the layout of all your buttons and switches. This is a pretty easy matter of 2D drawing. I use and Ipad for all drawings to keep things neat and easily changeable.

Circuit Design:

This is the tricky part. I wanted be sure that this was going to work, but sure as heck wasn't going to breadboard the whole thing with 40 switches and buttons. So I tested individual components until I was confident the whole idea was sound.

First I wired a single switch to the USB compatible master Arduino. I mapped that switch to a keypress event in the Arduino code using the keyboard library. Then I mapped the keypress event to the strobe light switch in MSFS and voila! it works.

If you are using Slave Arduinos for extra pins, it would be a good idea to test sending data between the arduinos. I used the SoftwareSerial Library for communication. This sets up virtual serial communication and keeps the data exchange between the Arduinos seperate from communication with the Xbox. Once you have the controllers communicating you are clear to use the remaining pins for buttons and switches!

About this Circuit:

In this circuit we set up data lines to be used with the SoftwareSerial Arduino library. This will allow our Arduinos to communicate with each other. For all buttons and switches we will make use of the internal pullup resistors onboard each Arduino, so that the only resistors needed for the project will be for the LED's. Otherwise It's a pretty simple design, essentially just connecting buttons and switches to the pins on the Arduino boards. The software will handle everything else.

Step 3: Wire Up the Face Panel

Now it's time to start building the project. The first step is to drill the necessary holes in the face panel and wire up all your switches, buttons, LEDs etc. I found it helpful to zip tie the wires together based on where they were going to be soldered.

Step 4: Begin Building the Circuit Board

I used a small perf board and laid my three controllers in a row with plenty of room to solder. It would be a good idea to connect the data lines here and test as well. (I messed this up and had to redo it after I had soldered everything together already)

Step 5: Solder It All Together and Test

Put the whole thing together, and test all of your connections. You may realize that some pins won't work the way you thought, and you may have to change some things around as you go. This is okay, we're just building hobby electronics here.

Step 6: The Code

The code for all three controllers can be found here:

https://github.com/j-bagdonas/flight-sim-switch-panel

Slave 2 speaks to Slave 1, and Slave 1 sends both its own data and Slave 2's data to the master controller, which sends Keyboard commands to the xbox

Each controller debounces its own set of controls and maps them to an integer code system, which is resolved to an ASCII integer code by the master controller.

Slave 2 also implements an fn system for all of its buttons. This essentially assigns three possible commands to each button, based on which fn button is selected.

Step 7: Map Your Controls in the Game and Go Flying!

Enjoy your new flight sim switch panel! In hindsight I would have left more room for labeling the controls, but otherwise it works like a charm and has allowed me full control of all the aircraft's systems without fussing around and taking my hands off the stick.