Microsoft Flight Simulator 2020 - Custom Flight Panel Controller
Custom control panel for Microsoft Flight Simulator 2020 using SPAD.neXt as interface between game and Arduino microcontroller. Designed with A320 in mind. Panel is meant to be mounted to the side of Logitech G Flight Simulator Panel bracket.
Supports:
-
17 pushbutton with LED (LED is controlled by state of control in the game). [fuel pumps 1-6, cross-feed pump, APU-master, APU-start, APU-bleed air, APU-gen, external power, auto-brake level control (low + med + max), x2 TBD (spare)]
-
5 toggle switches [anti-skid, ground spoiler arm, engine 1 + 2 master starters, reverse throttle toggle]
-
2 selector switches [engine mode switch (crank/normal/ignition), parking break]
-
6 potentiometers (5 rotary + 1 slide) [lights: PFD/ND/FD, ECAM, flood, panel, x1 TBD (spare); speed brake (slide pot)]
-
1 foot pedal switch [brake pedals]
Control board utilizes x3 MCP23017 I2C I/O expander ICs to provide control over 48 distinct inputs/outputs with just 2 Arduino pins. For LED outputs, each MCP23017 I/O pin is connected to an LED with a series resistor. For button inputs, each button is connected directly to an MCP23017 I/O pin, with an internal pull-up resistor enabled via software. All buttons are daisy-chained to ground on one side, and therefore no additional components are necessary for handling button inputs. Note that the pushbutton LEDs are controlled independently of the pushbutton meaning that the LED light state will reflect the state of the respective control in the game whether you cycle the control in the game or via the control panels physical button. The Arduino microcontrller handles detecting button presses and controls LED lights, and utilizes a 2-way serial connection with SPAD.neXT to interface with the game.
-
Build the control interface board by following schematics.
-
3D print STL files located in
/Hardware/Panel 3D Files/STL/
. You will need 3 Brackets, 1 Slide Potentiometer Lever Hat, and one of each of the three faceplates. Use soldering iron to heat insert four M3-4mm knurled brass inserts into each bracket's corner faceplate mounting holes and secure each faceplate to bracket with four M3-6mm bolts. Note that bracket top mounting holes are misaligned relative to the bottom mounting holes. If you wish to attach the three brackets vertically, drill new upper mounting holes to 2 of 3 the brackets. Bracket mounting hole alignment will be fixed in future. -
Install buttons/potentiometers on to faceplate holes (note: you will need to use a deburring tool to slightly enlarge the component holes as there is very little tolerance) and wire up connections between panel and control interface board. Daisy-chain switch/pot grounds together for each panel. Refer to Bill of Materials for parts information. Reference I/O connection summary table and schematic.
-
To upload microcontroller firmware, install PlatformIO IDE and add
/Software/AVR/FLIGHT SIM SPAD INTERFACE/
as new folder project. Upload code to your Arduino Pro Micro. -
Add control interface board to SPAD.neXt as a new Serial device to SPAD.neXt under settings->Devices->Serial Devices->"Add New Device" with the following settings:
Serial Port = = your USB COM port
Speed = 115200
Enable DTR = ON
32 Bit = OFF
Save settings and restart SPAD.neXt. Verify control interface board serial device is connected to SPAD.neXt by going to panels->SERIAL COMXX and selecting "Show Log". If it is not connected press "Connect".
-
Add each of the scripts included in
/Software/SPAD.next Configuration/
folder to SPAD.neXt script panel. -
If you have flybywiresim's "A32NX" mod installed you will need to update the mod's light potentiometer indices in order to make the light potentiometers work (reference). Install Autohotkey and run script named
A32NX Pot ID Fix.ahk
located in/Software/A32NX Pot ID Fix/
References:
- Fusion 360 3D Design File or
/Hardware/Panel 3D Files/FLIGHT SIM COCKPIT v27.f3d
- Schematic
- I/O Reference Table
- Bill of Material
- Project Photo Gallery
Notes:
- Faceplate component holes do not have much tolerance; you will need to use a debururing to slightly enlarge the holes.
- The size of the microcontroller firmware is large relative to flash program memory of the Arduino Pro Micro. As such, many repeated firmware uploads may randomly corrupt the bootloader. You will need another Arduino or an AVR programmer to reupload the bootloader to allow firmware uploading from your IDE.
To-do list:
- Fix bracket top mounting hole alignment.
- Combine ground spoiler arm toggle switch and speed brake slide potentiometer into a single physical component.
- Add logic to force game's initial state of anti-skid, ground spoiler arm, and parking brake to match control board when controller is first connected.
- Implement spare 2 buttons and 1 potentiometer on panel.
- Fabricate front faceplates with backlit labels using http://www.frontpanelexpress.com/
- Clean up code
- PWM brightness control for LEDs
Version History:
- 10/14/20: Initial release