DIY Head Tracker For A Tenner

<chuckles out loud in the office>

Well, from what I can see, it's blue. Cheaper.
It's fun this. Waiting for parts from the UK. Should arrive tomorrow or on Wednesday.

Try a search for this in ebay co uk:
9DOF MPU-9150 9 Axis Accelerometer Gyroscope Magnetic Field Sensor
princessdress08 is selling for £9 inc lengthy delivery from Hong Kong !
:D
 
Try a search for this in ebay co uk:
9DOF MPU-9150 9 Axis Accelerometer Gyroscope Magnetic Field Sensor
princessdress08 is selling for £9 inc lengthy delivery from Hong Kong !
:D

Thanks very much.

Pin compatible with the 6050 I ordered from HobbyComponents, so a much better solution. I can wait, no problem.

Hopefully order goes through without a problem.

@Cody: It's blue...
 
That is way too complicated for the likes of me.
I'm in over my head already.

Thats what I was thinking as the last time I picked up a soldering iron and used it on a circuit board I owned an Atari ST :eek:

That part is easy, even sorting out what you need to install PC wise to get the Arduino working isn't to bad.

I only get lost when it comes down to the code but at least I can follow it even if I can't understand C++ enough to make any changes to it.
 
On the subject of yaw drift error, this might be useful - from those nice Oculus folks:

Help! My cockpit is drifting away. It's about magnetometer integration.

Just thinking, since you would kind of assume that *on average* over say 15-20 minutes, your head would be centered/ oriented straight ahead as far as tracking is concerned, could you code in a very faint bias to slowly drag orientation back to 'zero' over that time? (Zero being calculated as the running average of where your head is pointing). After all, absolute permanent accurate head tracking isn't necessary I guess, just short/medium term fidelity.

Hope you see what I mean, and apologies if I've overlooked something obvious.
 
Already there ;) I have a prototype board here that I have made up with a 9150.

Great! As Hobby Components didn't have any 9150, I ordered a separate magnetometer (along with a second Micro Arduino/MP 6050 bundle). I am clearly over my head here, but if I understand correctly, the micro arduino should have enough analog inputs to accomodate both the 6050 and the magnetometer. I'll probably try to find a 9150 later.

I'm a programmer at heart, and it's definitely the coding part that I'm looking for, even though I have no doubt you'll have a working solution before I even start figuring things out. I love the idea of extending the reach of my coding skills outside of the computer. It's as I feared, it seems I have been hooked into that DIY thing.
 
On the subject of yaw drift error, this might be useful - from those nice Oculus folks:

Help! My cockpit is drifting away. It's about magnetometer integration.

Wow! Their yaw drift sucks :p Without a magnetometer they get (best) 35 degrees in 10 minutes and 4ish (best) with the mag.

With care the sensor we use drifts about 8 degrees over the same period but with 'drift comensation' in the code I get less than a degree over the same period (currently working on making calibration/drift compensation more user friendly).

Just thinking, since you would kind of assume that *on average* over say 15-20 minutes, your head would be centered/ oriented straight ahead as far as tracking is concerned, ....

I have played with that in code and it's tricky to balance. I've got about 15 minutes of head tracking data in a spreadsheer somewhere that's s on my list to analyse. I was also thinking of a 'crotch look' reset, so you just look ahead, glance down at your virtial groin, and that would reset yaw :)

Rob
 
Last edited:
  • Like (+1)
Reactions: Rog
On the subject of yaw drift error, this might be useful - from those nice Oculus folks:

Help! My cockpit is drifting away. It's about magnetometer integration.

Just thinking, since you would kind of assume that *on average* over say 15-20 minutes, your head would be centered/ oriented straight ahead as far as tracking is concerned, could you code in a very faint bias to slowly drag orientation back to 'zero' over that time? (Zero being calculated as the running average of where your head is pointing). After all, absolute permanent accurate head tracking isn't necessary I guess, just short/medium term fidelity.

Hope you see what I mean, and apologies if I've overlooked something obvious.

No, totally understood - there was quite some discussion on this within the Alpha forum, n0ahg found some good material out there.

Quite clearly relying on purely a gyroscope and accelerometer is never going to avoid drift; put simply, the axes in the MPU rely on gravity pushing down on them to provide a reading, and the X axis (yaw, if you like) tends to be perpendicular to gravity all the time, hence very hard to keep a reading accurate on it.

Static drift (ie. standing still) is generally very consistent and easy to address, you could do as you suggest but we've found a simple static adjustment factor applied regularly fixes it.

The problem at the moment is quick, high-G maenouvres that throw the sensors a curve ball. There are open-source filters out there from various sources, public on the net, that purport to address this by bringing in magnetometer readings.

Currently we're looking to see if we can make use of the "black magic" of the DMP (Digital Motion Processor), a feature of the InvenSense chip that could offload all the computation for us, but it's closed-source and figuring out the firmware settings is a bit trial and error. Most of it is reverse-engineered by others out there on t'internet.

I guess if we can't get it to work, we just have to implement our own filters in the AVR code.

But, and again this is the key bit to remember, having said all of that, drift really is at a low level - maybe not acceptable for £300 worth of Occulus Rift headset, but for a tenner, it's fine - I tend to have to reset every 30 minutes of gameplay. Provided you don't attempt any headbanging during game, it's fine :D
 
will all this talk of a new chip 9150, have I just wasted some cash on the 6050 kit , or can it be replaced with a 9150 later on?
 
will all this talk of a new chip 9150, have I just wasted some cash on the 6050 kit , or can it be replaced with a 9150 later on?

Nope, nothing wasted, the chips are completely pin compatible - and if you're using the dev breakout board from Hobby Components, there are similar designs from China with a 9150 chip on them that use exactly the same pin layout. So it's just a "drop in" replacement, so to speak.
 
will all this talk of a new chip 9150, have I just wasted some cash on the 6050 kit , or can it be replaced with a 9150 later on?

No you haven't, all the coding so far has been based on getting it to work with the available and cheaper 6050 chip.

This has meant working out how to remove the yaw drift ourselves as no one seems to have worked on this issue to our liking. Its now down to a reset every 30 minutes or longer from the original 2 to 5 minutes.

Current pricing for the 9150 doubles the cost of the kit so its a non starter until the plans get to revision 2 or 3 when it might be a single circuit board build with everything surface mounted.
 
Gotta say hats off to you guys - finding the whole project very impressive.

It looks like the Oculus people recently updated their magnetometer drift correction too.

Ummm... How about a bright IR led placed above the monitor, with a corresponding IR photodiode on the board. Get an initial calibration setting, then whenever the IMU thinks you're roughly central AND you get a similar (to the calibration) IR peak (bound to happen over 20-30 mins), THEN reset central position. I'll stop chucking lame thoughts at you now. :smilie:

PS, love the thought that 'crotch look' might now be an acceptable phrase! :D
 
IMG_20140428_183711.jpg

:)
 
Last edited:
No you haven't, all the coding so far has been based on getting it to work with the available and cheaper 6050 chip.

This has meant working out how to remove the yaw drift ourselves as no one seems to have worked on this issue to our liking. Its now down to a reset every 30 minutes or longer from the original 2 to 5 minutes.

Current pricing for the 9150 doubles the cost of the kit so its a non starter until the plans get to revision 2 or 3 when it might be a single circuit board build with everything surface mounted.

every 30 minutes for a reset is fine in my books, I used facetracknoIR and was resetting every 5 mins using faceapi am itching to try this one out.
looks like the daughterboards have arrived :)
 
That's fine. You're basically looking for a dev board with 8 pins just like the 6050 board we've used up to now. The pin order just needs to be the same.

VCC
GND
SCL
SDA
EDA (or maybe XDA)
ECL (or maybe XCL)
AD0
INT

I've not found one yet that has a different pin order, so generally if it's got 8 pins I'd say it's fine, but obviously I can't fully commit on that ;)
 
Very impressive project, guys. Thanks for taking the time and making the effort to get this together. My inner Scotsman heartily approves and I can see myself putting one together in the near future.

One question, though. Will this work OK in the alpha 1.1 version that premium beta backers are currently flying? I understand there is a limitation related to axis duplication across devices.
 
Correct; it won't, no, not without using a virtual joystick drivers and something like UJR with vJoy to map and merge the controllers into one.
 
Back
Top Bottom