Pololu has several MEMs sensor packages that are great for building your own head tracker. I’ve used their MiniIMU-9 sensor, both version 1 and 2, to build a very respectable head tracker. Version 2 of the IMU contains a 3-axis magnetometer and accelerometer provided by the STMicro LSM303, and a STMicro 3-axis gyroscope L3GD20. Heading accuracy much better on version 2. The version 1 IMU has the same LSM303 but uses a L3G4200D gyroscope.
You can couple this MEMs sensor board with an Arduino board such as the Nano and have a complete head tracker for about $60. It’s easy to do too because all the firmware work has already been done for you. The miniimu-9-ahrs firmware is based on Bill Premerlani’s Direction Cosine Matrix method of calculating heading which is in turn based on the Mahony paper. You can find more information on algorithms here. The DCM firmware was first part of the ArduIMU project and then adopted for the miniIMU-9. There is also an openIMU firmware which implements the Madgwick algorithm.
Pololu has all the details on their webpage for the complete build including a link to GitHub for the AHRS software. The links for the Arduino libraries are here and here. You’ll want to read through the Pololu page in detail to get everything setup correctly.
I’ve used the MiniIMU-9 with an Arduino Nano board to build a small compact head tracker for my applications (excuse the ugly cable!). I’ve even modified the Vireio Perception software (since it’s open sourced) to include support for my MiniIMU-9 + Arduino Nano combination. What I also like about this combination is that you have access to all the firmware and software to tweak the head tracker any which way you like. From filter parameters, to update rates, to modifying the algorithm directly. Everything you need to build a headtracker is all available for free. This is great for the homebrew crowd. You’ll notice below I’ve even added support for the YEI 3-Space tracker to Vireio.
I’ve also modified the Doom BFG open source code to include this head tracker. If you then mimic the MiniIMU-9 output format on any other custom tracker you build, you’ll be able to use the same software with different head trackers. It’s really a nice setup and a great way to introduce yourself to the details of MEMs trackers.
With the DCM/Mahony approach using the miniIMU9AHRS firmware, you’ll be tweaking gain and integration factors to fine tune your tracker. Using the openIMU firmware for the Madgwick approach you’ll be tweaking a beta or gamma factor representing the filter gain. You can also play with the amount of smoothing. In my testing so far I far prefer the Madgwick algorithm as it has less under/over shoot, and has higher update rates. The Madgwick tends to drift depending on how the filter converges at boot up. It’s important to let it sit stable and converge at start up. You can get my openIMU modified firmware here.
So if tweaking with the low level details of your tracker is your thing, the Pololu MiniIMU-9 is a perfect setup to do it with. If you’re interested in the modified Vireio Perception code or the Doom BFG code for this head tracker setup just send me an email. The file size is too large to post here as a download.