Where’s your head at?

The edtracker GUI, used to configure a DIY head tracking unit.

 

It’s been a while since I’ve managed to see a side-project to completion. So it seemed like a logical choice to pick my next electronic diversion carefully. Maybe this time take on a task both that is straightforward and compelling enough to finish .

In my previous post I mentioned how much fun I had playing Elite: Dangerous with an Oculus Rift. Well, long before VR came along, “head tracking” hardware has been a staple of flight sim enthusiasts for years. The idea is for the player to move his or her head, and have the in-game view react accordingly, usually in an exaggerated way (so that one can still see the screen). This creates both a greater sense of immersion and improved situational awareness.

It should come as little surprise that I wound up buying Elite: Dangerous a few days after PAX. I found myself wanting to replicate the immersion of the VR headset but without paying $300 for a DK2. Unfortunately most commercial IR head tracking solutions are rather pricey as well. But, through the miracles of Reddit I found that a enterprising group of British E:D fans had put together a DIY head tracker, the EDTracker , using an accelerometer and an Arduino micro controller. They posted their source code and some detailed instructions.

Now this sounds like something I can sink my teeth into.

I quickly ordered the parts, sticking to US based distributors. The stars of the show are the Sparkfun Pro Micro control board and an MPU-6050 Accelerometer breakout board. Sparkfun has an updated version of the Pro Micro for sale, but they were not offering the 8-pin version of the MPU that I needed to follow the edtracker guide, and their only offering for this particular accelerometer was $20, so I picked one up on ebay for a quarter of that. The parts all arrived a week later, at the same time. Handy that.

 

2015-03-23 14.22.34
Humble beginnings

First I needed to soldering some header pins into the two boards. I still haven’t mastered the art of the helping hands so I’m not sure if they came out perfectly straight. But close enough.

 

2015-03-23 15.14.36

I decided to start with a breadboard prototype. Looks like the pins were straight enough after all; they fit into the breadboard slots, albeit a bit snugly. I followed these directions  and routed some signals under the boards. Also, I didn’t realize how small the Pro Micro and MPU really were, so I wound up buying buttons that were comically large. The button is used to “zero” the device for quick re-calibration.

 

2015-03-23 15.40.50
Assembled!

Next I needed to get the edtracker software onto the Arduino. This is when the project took a frustrating turn. I’ve only ever developed Arduino project in Linux, where the operating system has very little trouble recognizing and communicating with these devices. But, currently, Elite: Dangerous is a Windows-only game (Mac client is in beta, Linux client promised but no ETA). So I needed the Arduino to be recognized correctly in Windows, which is something I’ve never really tried to do. It sucks. I had hoped never to look upon the Device Manager again. After yesterday I think we’re on a first-name basis.

When I installed the Arduino drivers from the EDTracker site, the GUI and console scripts they provided would not work at all. I couldn’t even use the Arduino IDE to flash the bootloader, I just got mysterious USB errors. Also the EDTracker sketches won’t compile in the outdated version of the IDE they insist you use. Apparently the new Pro Micro that Sparkfun is selling uses an entirely different AVR core than the one that the EDTracker was originally built around. So blindly following their instructions was actually detrimental to my efforts, and cost me a couple of hours of banging my head on a wall trying to flash the thing. I needed to download the “Arduino Addon” files from Sparkfun, unpack them, dive into their hierarchy and find the signed Windows drivers, and associate those with the mysterious device Windows created. Once I did that, the EDTracker GUI sprung to life.

 

2015-03-23 17.06.10
It lives!

Calibration seemed to be successful. Now I just need to test it! By wearing it. On my head. While it’s plugged in. Somehow. I’m sure in the future I’ll have it enclosed and properly mounted on my headphones or something. But for now, double-sided tape will have to do.

 

2015-03-23 17.20.39
Functional AND fashionable.

I couldn’t use a baseball cap because they all have that little button on top. This was the best alternative. The good news is that I’m also protected from the sun’s harmful rays while I play my videogames indoors. I had the wife take pictures of my “field testing.”

"That hat makes you look like an idiot."
“That hat makes you look like an idiot.”  (post edit: Stephanie really wanted me to clarify that this was a Firefly reference and not her being quoted)

2015-03-25 17.49.36

I have a college degree, ladies and gentlemen.
I have a college degree, ladies and gentlemen.

The good news is… IT WORKS. Almost perfectly. I occasionally get some snapping to center when I’m looking very slightly in any direction. It could be an issue with dead zones in the game clashing with the fine input from the Arduino, but I’ll play with it a little more. And, of course, find a better way to wear it.

I could talk more about this experience, but they pretty much mirror the results from the EDTracker demonstration video.

Despite this being a fairly simple one-day project, I still have the opportunity to perfect it by giving it a proper PCB and enclosure. That said, I fear I may be taking the first step down a very dangerous path. There are communities out there dedicated to passionate players building custom controls, cockpits, and peripherals for simulation games. I mean check out this redditor’s home made E:D control panel! And this guy’s custom ‘mech pit! People make their own flight sticks and throttled out of spare parts, repurpose racing pedals, all kinds of things to enrich their experiences and…

I should… I should turn back now.  Or should I?

-K