Cockpit
Feb 6, 2021This post details the build process for a home cockpit, the main interface for which is Mobiflight. Individual components come from a variety of sources and are linked inline.
Concept
The initial idea came from a link to the MobiFlight project, which details a cheap way to form a home cockpit setup with common components. The firmware is targeted at Arduino boards, notably the Arduino Mega and Arduino Micro. Given the low computing requirements of MobiFlight, the primary difference is number of IO pins offered by each board.
First test
The first proof-of-concept test was done following the tutorials for connecting a LED and Switch. Using an Arduino Mega 2560 R3, and a simple breadboard setup, it was possible to connect each to (respectively) show and control the state of the parking brake within FS2020.
Design decisions
The first primary decision was the extent to which the first stage of the project should stretch to. In order to be able to split the project into stages, it made sense to design everything in a modular way, such that a small subset of controls can be incorporated into a single panel, with further panels able to be added to the project as it progresses. One of the most important factors in the modular design is the number of pins available on the Arduino - the Mega has 52 pins available, and the Arduino Micro has 12. This suggests that an Arduino Mega can be used for larger panels, with the Micros being used for smaller modules.
Inputs/Outputs
There are a selection of inputs and outputs supported by mobiflight:
Inputs:
- Pushbuttons
- Encoders
- Encoder Press
Outputs:
- LED
- 7 Segment Displays
Creating the Autopilot module
The logical first panel to replicate is the centre section of the autopilot panel, as it contains the most variety of inputs:
- LOC button
- AP1 button
- AP2 button
- A/THR button
- APPR button
- SPD encoder
- HDG encoder
- ALT encoder
- VS encoder
The first iteration was created with a simple cardboard chassis to mock up the final design. This helped lay out the controls in a flexible manner which could be used to design the later iterations.
Each button has a backlit LED indicating its status, and each encoder has a corresponding 7 segment display showing the current value.
Buttons
The AP module consists of 5 simple press buttons - a pre-existing model for these buttons was found on thingiverse, which incorporated the backlit LED
3D printing these was trivial, with a half-used roll of transparent filament for the middle section, and black filament for the button itself.
Each button cap was glued to the transparent middle section
A green LED was inserted into each “bucket” segment
A microswitch was inserted into the bottom of each “chassis”
The button segment was glued to the “bucket” segment
The whole button was inserted into the chassis
The button is mostly held together by the pins of the LED within it, which was fairly sturdy once solder was applied to the connectors.
7 Segment display
The first test of a 7 segment display was unsuccessful due to a bad jumper lead to the +5V bus, however once this was discovered, the displays were easily hooked without many issues
TODO: picture
Encoders
The first encoders which were tried did not work well with the MobiFlight firmware, so a few different types of encoders were ordered. The simplest EC11 encoder proved to work, and also provided the option to replace the knob used on top.
Another thingiverse project was found which provided a number of different types of knobs which could be used - this included the types of knob used on all the autopilot controls.
TODO: picture