$50 Analog Joystick (HOTAS) With Haptic Feedback for Flight Sim
Introduction: $50 Analog Joystick (HOTAS) With Haptic Feedback for Flight Sim
The aim is to create a fully functioning USB HOTAS* joystick from low cost electronics parts.
I bought Elite Dangerous when it was released for the Mac and realised very quickly I was going to have the floor wiped with me if I didn't have a decent joystick, the problem is a really good joystick costs 100's of dollars or $450 in the case of this one: http://arstechnica.com/gadgets/2014/09/flying-in-s... . Its very difficult for me to tell my wife should doesn't need another pair of shoes if I order a $450 joystick for playing a "space game".
SPECS
Fully USB powered
Mac / PC / Linux Compatible
Programable Micro Controller
Analog X/Y Axis primary joystick
Analog X/Y Axis sub controller
Analog Throttle capable of 1024 acceleration points and boost
Weapon Arming toggle switch
2 x Analog Trimming Knobs
4 x Programable Momentary Buttons
4 Vibration motors
*HOTAS Stands for Hands on Throttle and Stick, so this is not a 'typical' HOTAS Joystick, by some definitions it would have to have a DPAD on the joystick controller, where my DPAD is controlled by the thumb of the throttle hand. But definitions aside this is an extremely capable game controller and infinitely customisable thanks to the on board programable micro controller.
Step 1: Parts List
$10 - Arduino Leonardo
$3 - Old Wii Nunchuck
$19 - Joystick with potentiometers - type used for CCTV systems or wheelchairs
$3 - ABS Enclosure
$2.5 Flip up weapon toggle switch
$4 - Sliding Potentiometer
$0.5 - 2 x100K Potentiometers
$0.5 - a few Dupont cable connectors
$2 - 4x mini vibration units
$2 - L289n Motor driver
$2 - 4x minibuttons
$2 - 'Carbon fibre' vinyl wrap
The hardware is under $50 including postage to Australia.
It should be said I'm not picky about brands, the only genuine parts here are the Dupont cables, and I'm not even sure about them, this is how I managed to keep the costs down.
Step 2: The Brain
The $10 Arduino Leonardo is the brain of the joystick - it has a few advantages over to more commonly known UNO model. 120
One of which is that it can act directly as a USB mouse or Keyboard. Example sketches are included with the Arduino software that allow you to control a mouse x & y access and also a 'scroll wheel' (which I connect to the throttle).
So out of the box the Leonardo can control 3 joystick axis* + give you access to the entire suite of keyboard commands, pretty good for 10 bucks.
Software
I also used Ordered Bytes amazing Mac Controllermate software to read the USB events and translate to a virtual keyboard joystick. this made it so much easier to set up centre points etc and calibrate the joystick I would not really enjoy having to do this in the Arduino code - not 100% necessary but life is short. I'm not sure of a PC or Linux equivalent to Controllermate, but there will be something.
You could just build this, load the code in and it would work, but Controller mate makes it really easy to do things like adjusting the left right balance, or adding an automatic boost trigger to the accelerator.
* There is a firmware mod for Arduino UNO's out there that allows control for more than 3 axis - but I have not modded the firmware on this instructable.
Step 3: The Main Joystick
I purchased an industrial grade joystick (JH-D202X) for US $18.57 from ebay.
They have a few variations and they seem really solid.
If you get a different joystick, make sure you get one with potentiometers not microswitches - there are a few models available, they also have models with buttons on top.
There are 3 pins on both the x and y axes, the side pins on each axes connect to 5v and GND on the Arduino.
The centre pins connect to the Analog pin you will use to read the data on the Arduino.
x axis rolls the craft left and right
yaxis pitches the crafts nose up and down
Step 4: The Sub Controller (mini Joystick)
To make this I butchered a cheap Wii Nunchuck - basically opened it up and removed the joystick. 611