Sky's the Limit, Budget Not: DIY Flight Sim Controller

by hale_b0b in Workshop > 3D Printing

1323 Views, 22 Favorites, 0 Comments

Sky's the Limit, Budget Not: DIY Flight Sim Controller

Titelbild.png
Screenshot 2024-09-15 115029.png
PXL_20240822_181345719.MP.jpg
PXL_20240822_181354102.MP.jpg
Screenshot 2024-08-22 203347.png
PXL_20240822_163756569.jpg
Screenshot 2024-09-12 145026.png
Screenshot 2024-09-15 115359.png
PXL_20240915_123541583.MP.jpg
PXL_20240915_123634085.MP.jpg

Playing around with MSFS2020 and Meta Quest 3, I got fed up with the controllers and the bad handling of the plane. Although it is awsomely immersive, the steering of the plane was just annoying. While trying to get my ancient Logitek joystick to work with Windows 11, I came accross some projects using Mobiflight, a truely great add on for all sorts of flightsim interfaces using an Arduino. As I did not want to spend a fortune on more or less professional flight sim gear, I started thinking about some 3D printed flight yoke and possibly some rudder setup using potentiometers and arduino based electronics connecting to MSFS via Mobiflight. Some early prototypes worked well and so I went on to building a low cost, flexible and extensible setup. Eventually I found a smart open source virtual joystick solution to enable the controller for all sorts of joystick based games.

All you need is your DIY spirit, Tinkercad and a 3D printer with at least 256x256x256 build space and sufficently accurate print quality, some filament, one or more Arduino Nanos, an aluminum rod, a couple of ball bearings, potentiometers, soldering iron and a bit more - here we go.

Supplies

Supplies_.jpg

Most of the parts are printed on my 3D printer. Below are the parts that need to come from real world : )

  1. Linear potentiometers - for each control input one linear potentiometer, e.g. aileron, elevator, throttle, flaps, rudder, ... https://www.amazon.de/dp/B07QVQ67MV?psc=1&ref=ppx_yo2ov_dt_b_product_details
  2. Rotational potentiometers for the rudder pedal angle measurement, https://www.amazon.de/gp/product/B093DRBG3X/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
  3. Arduino Nano - https://www.amazon.de/gp/product/B0CX1B4X7M/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
  4. Vacuum fixture knobs - to use with fixing screws - https://www.amazon.de/dp/B0919WNVWG?psc=1&ref=ppx_yo2ov_dt_b_product_details
  5. Ball Bearings - https://www.amazon.de/dp/B07DK5H8MV?psc=1&ref=ppx_yo2ov_dt_b_product_details
  6. Connection Board - a connection board that carries the Nano and connects up to 5 analog inputs (Potis) and 5 pushbuttons built with KiCad - https://jlcpcb.com/ - see step 3

Other stuff:

  1. 3D Printer min 256x256x256 (e.g. Bambulab P1P)
  2. Soldering gear
  3. Crimp tool
  4. Screws
  5. Wire
  6. 10k Resistors
  7. Multi pin sockets and connectors
  8. Aluminum rod, hollow if you want to use buttons on Yoke, 370mm , 12mm cross section
  9. A couple of pull/push springs for centering and for rudder pedals (wip)

The Mechanical Concept

elevator - lever.jpg
aileron - gear.jpg
Control Concept - centering spring.jpg
linear lever.jpg
rotational lever.jpg
Control Concept.jpg
Control Concept - pedal angle measurement.jpg

I'm no engineer but I wanted to create the mechanics for the controller based on my own ideas. Limiting myself to linear potentiometers I came up with a drive using a set of rotational and linear gears to translate Yoke rotation and pull/push motion into linear positions. The pictures should show the function of this setup.

When the yoke is pushed or pulled, the pitch potentiometer handle (red) is moved in the same direction guided by the upper part of the main gear (green) guard rails allowing for a simultaneous rotation of the main gear. The main gear glides above the bottom linear gear in perpendicular direction without moving it.

Only a rotation of the main gear will drive the linear bottom gear (black) and move the respective roll potentiometer handle (red).

I included a spring fixture on the base and on the rod to have the yoke return to its center position if no control input is applied. The middle rod fixture will be pushed back to its origin by the springs (yellow arrows) if yoke is turned or pulled/pushed (red arrows).

The linear and rotational levers for things like thrust or flaps are also utilizing linear potentiometers. The linear and rotational lever baseplates can be attached to either side of the yoke base plate and can be stacked - so I'm free to add up many levers for all sorts of controls such as air brake, landing gear, etc.

As for the rudder I used a parallel set of levers to keep the pedals straight. Yet I use the same way to transform the pedal shift into a linear potentiometer setting as shown in the picture. If the pedals are shifted the potentiometer handle (red) is being moved likewise. For my purpose I used an additional arduino not to have to connect the poti of the rudder - on the floor in most cases - to the board of the flight yoke - on the desk in most cases. This gives some more flexibility but uses one more USB port of your PC. It's also possible to connect the poti via an appropriate 3 line cable to the yoke pcb.

Furthermore I included a measurement of the angle of the rudder pedal for wheel brake and potential racing car throttle and brake function. The pedal rotation is transferred to a poti via a gear set. The pedal is pushed back up by double springs as I did not have stringer ones available.

Signal Readout Mehods - Mobiflight for MSFS Only or VJoy for General Usage

Screenshot 2024-08-14 121833.png
Screenshot 2024-08-22 192001.png
Screenshot 2024-08-22 214956.png
Screenshot 2024-08-22 215056.png

After the mechanical concept is done to translate the control input into mechanical potentiometer settings a platform is required to measure and translate these settings into MSFS (or other applications) inputs. Initially I started this project using Mobiflight to readout the poti values and feed them into the MSFS. However even Mobiflight Developers say that using raw poti readouts as flight controls is not really the sweet spot of Mobiflight.

Nevertheless you can use Mobiflight (https://mobiflight.com, https://github.com/MobiFlight/MobiFlight-Connector/wiki) for this job greatly. In a nutshell it programs your arduino, reads the analog ports and sends the measurement values after some processing to the right MSFS variable. Same is possible reading out MSFS values and create outputs to LCD or other devices - e.g. LED, stepper motors and so on. The web page provides all relevant turorials and info to setup and configure the platform.

For prototyping a breadboard setup with directly connected potis can be used before proceeding with further steps. As soon as the arduino is connected and the potentiometer values are being measured at the respective analog inputs the configuration for MSFS is really simple.

A handy web page providing a tool to create an min/max value adjusted so called "preset code" for the configuration can be found here - https://hubhop.mobiflight.com/tools/. Later, you just have to enter your measured max and min values for the potis to adjust to the correct range and direction when you have your final assembled controller ready.

To be able to use the controller also for other purpose than only flight sim - like racing - I did some more research and found on github vjoy (https://github.com/jshafer817/vJoy.git) and yjoy-serial-feeder (https://github.com/Cleric-K/vJoySerialFeeder.git), a combo which does the job in a more general way.

Vjoy is a virtual joystick that mimicks a configurable, multi-Axis, multi-buton joystick. Using a simple arduino program (joystick.ino) it creates an IBUS channel stream out of the analog and digital readings of the Arduino and streams it to the serial com port. With the vjoy-serial-feeder the channel stream is read and assigned to the customizable Joystick axises and buttons of the vJoy device. Furthermore you can map the signals to more sophisticated non-linear behaviour with dead zones and much more. Download the vJoy installer from here (https://sourceforge.net/projects/vjoystick/files/latest/download) and start installation. Download the vJoy-serial-feeder from github and follow the installation manual.

Building the Electronics

PXL_20240822_163948166.jpg
Screenshot from 2024-08-14 12-32-40.png
Screenshot from 2024-08-14 12-36-26.png
Screenshot from 2024-08-14 12-40-28.png

There are no complex electronics as the arduino and mobiflight respectively yJoy do the heavy lifting. However there are still some connections that need to be made between +5V, GND, A0,A1,A2,A3,A4 for the potentiometers and potentially D3, D4, D5, D6 and D7 for some buttons. Manually connecting these through soldering wires became messy quickly, so I built a board using KiCAD. After some trying I got out with a reasonable board with routed connections ready to carry an arduino nano and provide five three-pin sockets for analog inputs and five two-pin sockets for push buttons with pulldown resistors.

I ordered 5 boards (minimum volume) for around 5€ at https://jlcpcb.com/ and got my boards within three weeks. You will find the respective gerber files zip file here - https://github.com/haleB0B/diy-flight-sim-pcb.git. Feel free to use them at your own risk.

3D Print Design

Now for the 3D printed parts which represent the majority of parts in this controller. I started with some basic ideas, merged them, removed redundant parts, increased durability of parts, added screw holes, moved key parts, changed heights and so on.

There are a couple of components that need to be printed separately and sometimes it is important in which orientation and with what level of support the parts are printed to make them work smoothly.

Base Plate: The base plate keeps the moving and non-moving parts in position. All other parts will be fixed to the base plate, respectively parts fixed to the plate. It needs to be printed in normal orientation (starting with the bottom of the plate)

Linear Gear: The linear gear is used to translate roll inputs via the yoke into a linear move of the poti handle. It has two guard rails that will guide the poti handle. This gear will make less noise when used in the controller if printed upside down. No support, nor brims should be required.

Board Adapter: To enable different microcontrollers I introduced an adapter board. This will hold the arduino circuit PCB. Print in normal orientation.

Main Roll-Pitch Gear: This gear translates push/pull control inputs from the yoke into pitch poti setting and transmits roll inputs from the yoke into left/right move of the roll poti handle via the linear gear. Print as Tower with tree support to keep the guard rail overhang as clean as possible.

Max Pull Fixture/Max Push Fixture: Just a fixture on the rod to limit the range of pull and push input. Print as tower with least support.

Pitch Poti Fixture Arc: This part enables to fix the pitch poti at the right place on top of the Main Roll-Pitch Gear. Print it lying on flat side.

Yoke and Yoke Fixture: The Yoke is a remix from a Tinkercad object - I could not find the originator in my notes anymore - many thanks nevertheless for the great model. The Yoke Fixture my be used to do what its name says. I printed the yoke upright, diagonally accross the print bed.

Spring Fix Base left and right and Center Spring Fix: These parts are required to enable a centering force when the yoke is moved. Print left and right fix on the side with tree type support. The center spring fix consists of an upper and a lower part. Print on its flat sides.

Main Cover: The main cover may be used to protect the inner wokings of the controller. It is handy when you have store the controller in a cupboard drawer. Print as tower placed on the large flat side. Use least possible support, no brims.

Main Cover Stabilizer: Small part to fix cover to base plate

Front Plate: The front plate is just a nice to have to make the cover look a bit like a jet nose - duh. Print laying on flat side.

Fixing Screws: The fixing screws can be used with the vacuum fixtures to fix the controller tightly to a desk. Print lying on flat side.

Blank Side Extension Plate: This plate is required to have some space between the yoke and the levers. it can be used on left and right side of the base plate. Print in normal orientation, no support required.

Linear/Rotational Lever Plate: Used for linear poti to be controlled by a push/pull lever through a ball bearing or a push/pull rotational lever. Print in normal orientation.

Linear/Rotational Lever Cover: A cover respectively for linear or rotational levers may be used to protect the inner wokings. Print upside down for linear and on flat side for rotational cover. Minimum suport, use trees to keep surface clean.

Different Knobs and levers: Knobs for levers and levers. Print on flat side.

Rudder parts: The rudder consists of a base plate, two pedals with footrest and pedal base with fixture for the rotational poti and springs, two levers for parallel shift and a top cover plate to cary the rudder poti and the Arduino PCB. All parts should be printed with largest flat surface on printing bed with least support and no brims.

Check out the model on Tinkercad - https://www.tinkercad.com/things/gUWDWdoZZ5G-low-cost-extensible-flight-sim-controller

In alignment to the assembly instructions in step 5 - highlight the respective part in the Tinkercad model (only that one) and use the export function to create an STL out of the highlighted part. With your favorite slicer you can then create the required gcode for your 3D Printer. Do this for all parts required. With some 3D print experience one can put multiple parts on one gcode/print bed.

Assembly

01 Base plate.png
02 Mount roll poti.png
03 Mount linear gear - adjust to poti handle.png
04 Mount board adapter.png
05 Mount arduino pcb.png
Screenshot 2024-08-22 221937.png
07 insert ball bearings over rod adjust roll gear and poti.png
08 Prepare pitch poti and poti fixture arc.png
09 mount max push fixture.png
10 Mount yoke fixture and yoke.png
11 Mount the cover stabilizer.png
Screenshot 2024-08-22 205021.png
12 Mount the main cover.png
13 Mount the front plate.png
14 Fix the controller to desk.png
15 Assembled flight controller.png
Screenshot 2024-09-12 144315.png
Screenshot 2024-09-12 144602.png
Screenshot 2024-08-15 135608.png
Screenshot 2024-08-15 135719.png

With all the parts assembly is not so straight forward. The pictures shows the order of the parts to be assembled highlighted in yellow for each step:

  1. Place Base Plate
  2. Mount Roll Poti in space under base plate, look for poti handle to be in center
  3. Mount Linear Gear, place poti handle between guard rails of linear gear
  4. Mount Board Adapter Plate
  5. Fix Arduino PCB on Adapter Plate
  6. Connect cables from Roll Poti to Arduino PCB, make sure you are consistent with 5V, GND and variable resistor contact
  7. Mount Main Roll-Pitch Gear and insert rod
  8. Adjust Roll Poti to Main Roll-Pitch Gear - should be symmetric without left or right displacement
  9. insert ball bearings
  10. Mount Pitch Poti on Pitch Poti Fixture Arc and mount Arc on base plate. Now adjust pitch mid point, so that Main Gear is central over Linear Gear and poti handle is central to poti. Connect the cables from pitch poti to Arduino PCB, make sure you are consistent with 5V, GND and variable resistor contact
  11. Mount Max Push Fixture
  12. Mount Yoke fixture and Yoke - needs to be aligned with Main-Roll-Pitch gear center position
  13. Mount Cover Stabilizer
  14. Mount the base spring fixtures left and right and the rod spring fixture. Fix with screws and adjust to have the springs relaxed in center setting.
  15. Mount Main Cover
  16. Mount Front Plate
  17. Mount Controller Fixing Screws

Sounds complicated? I've encountered worse assembly instructions : )

The rudder assembly is much simpler - I have included one picture to show how the parts go together.

It Works!

DIY Flight gear demo

Some Afterthoughts

_1a5d2e44-2301-4da8-bf05-dd9aecc86a6b_16-9.jpg

Designs are never final, changes are always required, dependencies are requiring further changes and will be missed inevitably if there is no quality management being done. So guess what happens in such a DIY project.

The final outcome has yet surprised me as really usable flight controller and together with the virtual headset it is hell lot of fun. So far I did not make broad use of the rudders as I do not yet have a decent idea how to fix the rudders to the floor without destructive screws in my nice wood panels - mabye a larger dedicated wooden board? But then the assembly/disassembly becomes less lean - more thoughts on that required.

Obviously the resilience of this gear is not as good as that of a purchased one - but you can tweak it and build and change and... extend it as you like. And it is self made!

And I already have some extension ideas (check out the instructable for upates):

  1. Trim buttons and auto pilot button on yoke
  2. Replacement Racing wheel setup, gear shift lever plate
  3. Nav and Radio LED and Button panel - not really useful for VR but for on screen MSFS
  4. Force feedback
  5. Bluetooth connect