This is a guide to creating a DIY Head Tracker, primarily for use with the epic “Elite: Dangerous”.
(Dan has writtem a top guide to gettting this software up and running – http://www.brumster.com/downloads/Headtracker-Software_Install_Flashing.pdf)
Elite: Dangerous (E:D) supports the £140 TrackIR head tracking system as well as the £200 Occulus Rift. It also has built-in “head look” bindings which you can assign to a mouse or joystick axis. For around £10 it’s possible put together a Head Tracking (HT) device that appears to Windows as a USB Joystick. Using the in-game controller config you can then assign this new device to ‘head look’ .
Fellow alpha-backer Brumster (Dan) has put together a video showing in-game footage of his version of the E:D Head Tracker :
Note! The guide may be incomplete and I can’t guarantee that following it will get you to the happy ‘head tracking’ place that I am in. It’s definitely DIY 🙂 It’s looks odd watching how head tracking works – you move your head but your eyes stay looking at the screen. But after a few seconds of play you brain adjusts and it becomes transparent to the player.
Elite Alpha 2.x/3.x and Multiple Input Devices
Elite Dangerous Alpha 2.x does not support multiple input devices. So to use this DIY head-tracker with your usual joystick you will need to fart around a bit with this :
It allows multiple devices to be merged into one. Elite Dangerous can than pick and choose from the extra head-track axis.
E:D Alpha 3.x release notes suggests it support multiple input devices and can be configured to bind you main controller along with the E:D Head Tracker BUT for me it looses the bindings on exist from the game and gets them confused on restart. Workaround is to use Ujr/Vjoy or just rebind any lost controls when you start up.
The device has two main components:
Sparkfun Pro Micro (or clone such as a ‘hobbycomponents pro micro’). This is a cool little programmable chip that appears as a USB device to your PC. It can be programmed to appear as any Human Input Device (HID), e.g. mouse, keyboard,joystick, all with a bit of software. Picture of clone below.
An MPU-6050 Breakout board. I believe this is he same chip used in the Occulus Rift. It has a built in ‘cpu’ that can merge it’s raw accelerometer and gyro data into a steady, drift free set of out outputs. The Pro Micro can talk to this chip using a protocol called I2c, which needs only 2 wires to exchange data.
You will need something to build it on such as a small breadboard and perhaps some sort of perfboard to make it more permanent.
Alpha Backer Brumster has made a small sample of custom PCB’s which makes for a very tidy finished product.
At the moment I have simply connected the Pro Micro to the MPU breakout together directly using short sections of wire.
You will also need
- Wire (or breadboard jumpers (male to male) to connect the bits together. Ebay is a good place for cheap jumpers.
- A micro USB cable.
- A small momentary push switch (http://hobbycomponents.com/index.php/mini-diy-part-4-pin-tact-switches.html)
- A soldering iron and solder
Depending on what you buy, the gyro module and/or arduino may or may not have the rows of pins already soldered on. It’s easy enough to do, just stick the two rows of pins into breadboard first, place the pcb on top, solder away! Adafruit (http://learn.adafruit.com/) has slots of resources relating to Arduinos and breakout boards and general tips about soldering etc.
Note on Clones
If you want to save a few more pennies then ebay has a range of both products available from the far east.
I had a few probs with the drivers than came with the “pro micro” so I picked up something called a USBTinyISP for 8 quid which allowed me to ‘re-flash’ the chip to appear as a Arduino Micro and use the official drivers. I’ll write up a separate guide for that later. You may find your clone is fine.
To upload code (sketches) to the Pro Micro you will nedd the Arduino IDE. Download the latest release (1.5.6 R2 Beta) from Arduino website and unzip to the folder of your choice.
The first thing to do is get the Arduino equivalent of “Hello World” working; the Blink Sketch. Plug you Arduino Micro in the the PC and install drivers. The drivers usually live under the Arduio IDE folder. Instruction for installing Arduino Micro drivers are half way down this page.
Otherwise, clones from other sources will usually have links to alternative drivers/instruction. If you reflash your clone as an Arduino Micro then follow the official steps above.
Once installed, open up the Arduino IDE and select Tools->Board-> ‘Arduino Micro’ (or name of your clone). Select tools->programmer->AVRISP MkII .
Select File->Example->Basic 01->Blink and some code will appear in the IDE. CHANGE THE LED PIN TO 17 , which is where the LED lives on the Micro boards. Hit the ‘Upload’ arrow and watch the little LED go. Play around with the code to change the delay, upload and ensure the LED flashes change.
If the IDE complains about not being able to find the Mirco then change to port number. You can check which port the chip has appeared in device manager.