Introduction: Acrylic Tablet Stand for Flight Sim With Real Knobs
This is a stand for a tablet (e.g. iPad) for use with flight simulator software. Using rotary encoder modules and an Arduino Mega, I created a solution where the physical knobs can be mapped to control specific instrument functions in the sim. As you can see in the picture, there are a few apps that remotely display the cockpit instruments from a PC flight simulator application (like X-Plane) on the tablet. It is fun to turn the physical knobs and watch the GUI respond! This design has 7 knobs which are mapped to: Airspeed density altitude adjustment, Gyro heading knob, Gyro heading bug, Altimeter baro setting, VOR1 OBS, VOR2 OBS, and ADF heading knob.
Design goals were: functionality, simplicity, and elegance.
1. Tablet (e.g. iPad)
2. Acrylic stand for iPad. Rather than fabricate a stand, I went looking for something usable that was off-the-shelf, and found this:
3. Flight sim remote instrument app. There are apps that will connect with your flight simulator and display the cockpit instruments in real time. Many people use these to free up screen real estate on the main PC. Some of these apps include:
Air Manager: https://apps.apple.com/us/app/air-manager/id10525...
Remote Flight Cockpit HD: https://apps.apple.com/app/remoteflight-cockpit-h...
I am using Fsi C172.
4. Arduino Mega: https://store.arduino.cc/usa/mega-2560-r3
The Arduino collects all of the knob inputs, and sends this info to the flight sim app over USB.
5. Arduino Mega shield:
This is a board that sandwiches on top of the Arduino Mega, and allows you to put your own custom circuitry/wiring.
6. Rotary encoder module:
This product comes with a small circuit board assembly and header pins, which lets you connect things up without a soldering iron.
The header has 5 pins. 2 are for power and ground. Two are for the rotary encoder - the Arduino determines whether the knob is being turned clockwise or counterclockwise based on these two inputs. A finally, there is a pin for a pushbutton switch which is built into each knob.
7. Jumper wires (male to female)
These can be peeled apart, which makes it easy to create a custom 5-pin ribbon cable for the buttons.
Step 1: Drill Holes in the Tablet Stand
The dimensions of the tablet stand are 12.5"x9", or 320mm x 230mm. The dimensions of an iPad Air 2 (my tablet) are 240mm x 169.5mm. This allows the iPad to be centered in the stand with 40mm of border on each side. Assuming that (0,0) is at the bottom left corner of the stand, I drilled 7 holes at these x,y locations: (100,195), (140,195), (180,195), (220,195), (300,127.5), (300,85), (300,42.5). All figures in mm.
You need to be careful when drilling through acrylic, use the proper drill bit and a slow RPM.
The knobs come with washers and nuts for easy fastening.
Step 2: Connect Rotary Encoders to Arduino Shield
The rotary encoders have 5 pins. "GND" and "+" are connected to ground and power. "CLK", "DT" and "SW" are connected to digital input pins on the Arduino. These are easy to access from a socket header on the shield board, although in my case I needed to solder on the connector. So, just peel away the 3 signal pins, and plug them in. Make sure that CLK and DT are on sequential pin numbers.
This leaves the question of power and ground connections. Each button has a power and ground pin, so that means 7 power connections and 7 ground connections. I soldered two single row socket headers on to the proto shield, and wired them up to act as power and ground busses.
I used the following Arduino pin assignments (CLK/DT/SW):
Airspeed knob: 38/39/40
Gyro knob: 41/42/43
Heading Bug knob: 44/45/46
Altimeter knob: 47/48/49
VOR1 knob: 5/6/7
VOR2 knob: 8/9/10
ADF knob: 11/12/13
Step 3: Install Simvim Software and Firmware
This solution requires firmware code that runs on the Arduino to collect the button inputs, and software that runs on the PC to interface between X-Plane and the Arduino. Both of these can be acquired at http://www.simvim.com.
Simvim installs as an X-plane plugin using the standard plugin install process. Once installed, you can load firmware onto the Arduino (via USB) using the Simvim plugin UI within X-plane.
Note that Simvim subsists on the patronage of its users: https://www.patreon.com/simvim
Step 4: Final Step: Configure Simvim
The last step is to use Simvim's configuration tool to assign and define the pin connections from the Arduino. You can find that here:
Using the web UI, it is easy and straightforward to map cockpit buttons/knobs to Arduino pin assignments. In this photo you can see that VOR_Nav1 and VOR_Nav2 have been configured. Once the configuration is complete, click "Save" and Simvim will create and download a data.cfg file with your configs. Stick this file in your X-plane plugin folder, and you are good to go!