Arduino/Sabertooth PID Motor Controller

Ever since a wonderful friend got me my first VR headset in 2015 (the Oculus Developer Kit 2), I became obsessed with immersion. I was constantly pushing it to see how far I could take it. The headset and force feedback racing wheel were amazing, but what else could I do to really lose myself? MOTION SIMULATION!

The first step was to see what others had done. 2DOF (2 Degree of Freedom) motion simulators using windshield wiper motors were successfully implemented by many racing simulator enthusiasts. Here is an example of one below.

2 Degrees of Freedom means the platform can move in 2 axis. It can tilt front to back and left to right. That’s pretty cool, but check this out.

Not being one to shy away from a challenge, I started the research. What I needed first was motors. I found 6 12Volt DC 2.5HP slow but torquey motors from a factory closeout on Ebay. These do not have what is called “feedback”. That is to say, the motor has no way of telling a controller what the position of the shaft is or how many how many rotations it has made. I’d have to figure that out later.

Next was a power supply. I gutted an ATX 1500 Watt Thermaltake computer power supply, combined its 4 300 Watt 12V rails into 1 and did the same for ground. I used thick cables, soldered them to the rails and tested them on all 6 motors at once. Worked like a charm. They all spun. It even has 5V rails for the Arduino and Sabertooth Motor Controller.

Next was a motor controller. This device needs to handle a few tasks. It needs to take a low voltage or serial input and convert that to a huge amount of power to push the motors. It has to be able to ramp up and supply the needed power to the motors very quickly and also needs to do something with the energy generated when the motors are reversed and wind down. I chose the 25AMP 2 Channel Sabertooth 2×25.

So here is the process:

A plugin called X-Simulator uses DLL hooks to extract motion data from the games

The plugin can be finely tuned to convert this data into motion commands

The motion commands are streaming packets sent down a serial port with motor positions translated from the motion data extracted by the plugin

Our motor controller cannot accept these commands for 2 reasons

The format is wrong

There is no feedback from the motors, therefore there is no way to tell where the motors position is, let alone where to go.

To solve this problem, I put an Arduino in the pipe. It takes the serial data sent by the X-Simulator plugin and converts it into something the Sabertooth motor controller understands.

Feedback:

Feedback was achieved by using Hall Effect Potentiometers on the shafts of the motors. When the motor is in the 6 o’clock position, the voltage on the corresponding analog pin is 4.2. When it is at 12, the voltage is 1. Boom, feedback done. All that is left is the frame and finding space for this thing.