DIY Head Tracker Part 1

Welcome Commander

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 :

http://evilc.com/joomla/articles/9-code/autohotkey/1-ujr-universal-joystick-remapper

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.

Hardware

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.

promicro_1

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.

6050

You will need something to build it on such as a small breadboard and perhaps some sort of perfboard to make it more permanent.

breadboard

Alpha Backer Brumster  has made a small sample of custom PCB’s which makes for a very tidy finished product.

http://www.brumster.com/articles.php?article_id=16

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

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

I picked up my Arduino Micro Clone from Hobby Components and my MPU-6050 board from 4tronix

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.

Software

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.

ide

End of Part 1

8 thoughts on “DIY Head Tracker Part 1

  1. Pingback: DIY Head Tracker | Mis-adventure in 3d Printing

  2. Hi there!

    Thanks heaps for sharing this, I really appreciate it!! Just one question. Can you please clarify (perhaps with a picture too) what you mean by “CHANGE THE LED PIN TO 17, which is where the LED lives on the Micro boards” I understand the concept; I’m just not sure about the instructions. Do you mean change the LED VCC input to pin 17? Also, where is the surface mount LED on the board? lolz

    Thanks and Cheers!!!!!!

    • Hi,

      Probably 🙂 But you’d have to be able to do a bit of soldering and be happy to pick up a little bit of coding skill. We’re looking at being able to provide a finished product for people who don’t want the hassle of DIY so perhaps hang on a couple of weeks and keep an eye out for announcements.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s