DIY Head Tracker For A Tenner

I'm not entirely sure I'd want roll captured from my head, to be honest :) !?

Anyways... I've update the guide PDF in relation to Pocketmoon's latest sketch....

Link in OP...

I say you do it and record how it looks after you had ten cans of your favorite beer, lager, cider etc LOL :p
 
Merged axes are something to do with the MPU6050 not resetting correctly or the registers on the ProMicro.
I think Pocketmoon and Brumster are a bit more knowledgeable on that one.
Cosmos and I had it and it was fixed.
Involved something like uploading some code using different libraries which behaved better then reuploading the sketch.

I think some others have tried other games though I have not myself.
You may need Vjoy or something to help map the controller to other games I don't really know.

I understand TF2 and other Source engine Games have headtracking support but I don't know how to enable it or set it up.

always worth doing a full recalibration (debug on, open monitor window, press button while it's 'settling' wait for calibration to complete). Must be kept very flat and very still.

I've ported the sketch to a newer version of the Invsense libraries which look good so far and may help with more reliable calibration. I'll release that along with the new ED Tracker Windows App later this week.

Cheers

Rob

Thanks guys will try that out, the games I have tried so far are euro truck sim 2 and warthunder, they both pickup the joystick axis, warthunder picks up all 3 and euro truck sim 2 picks up only 2, I did not think it would of worked in warthunder only because for facetracknoir you have to use tirview.dll from trackIR, so was pleasantly surprised when it did, will play around with this more see if I get any head way on it.

Will post here if I get anywhere with it
 
X axis is ok now, Y is a bit weird it seems merged slightly, the cross hairs goes up when I tilt it up but down it goes down a little and then to the left, if I do it more then it goes all over so am not sure what to do but I am still playing around with it.
Has anyone tried this device on any other games apart from elite dangerous?

Yes I had that problem and thought I had damaged my MPU6050 while soldering it.

If you look in the current Pockemoon "MPU-6050-Arduino-Micro-Head-Tracker-master" zip folder you should find a "MPUReset" that should sort out the merged axis problem. It used a better behaved library that can do a full reset of the chip.
 
What I'd like to know is how you're putting these together for under a tenner. Arduinos must be a damn sight cheaper over there than here Stateside. The Pro Micro is $25 on it's own! (Unless you get one of the cheapie ones off ebay from China that take six weeks to arrive)
 
I thought that too it was damaged, I did try and use that mpureset but get a whole list of error message with some text highlighted.

mpu_force_reset();


mpu_force_reset was not declared in this scope

underneath are a whole bunch of error messages

Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Leonardo"

Build options changed, rebuilding all

MPU6050Reset.ino: In function 'void setup()':
MPU6050Reset:96: error: 'mpu_force_reset' was not declared in this scope
MPU6050Reset.ino: In function 'void loop()':
MPU6050Reset:162: error: 'dmp_read_fifo' was not declared in this scope
MPU6050Reset.ino: In function 'boolean initialize_mpu()':
MPU6050Reset:203: error: aggregate 'int_param_s int_param' has incomplete type and cannot be defined
MPU6050Reset:207: error: 'mpu_init' was not declared in this scope
MPU6050Reset:216: error: 'INV_XYZ_GYRO' was not declared in this scope
MPU6050Reset:216: error: 'INV_XYZ_ACCEL' was not declared in this scope
MPU6050Reset:216: error: 'mpu_set_sensors' was not declared in this scope
MPU6050Reset:218: error: 'mpu_configure_fifo' was not declared in this scope
MPU6050Reset:219: error: 'mpu_set_sample_rate' was not declared in this scope
MPU6050Reset:221: error: 'mpu_get_sample_rate' was not declared in this scope
MPU6050Reset:222: error: 'mpu_get_gyro_fsr' was not declared in this scope
MPU6050Reset:223: error: 'mpu_get_accel_fsr' was not declared in this scope
MPU6050Reset:230: error: 'dmp_load_motion_driver_firmware' was not declared in this scope
MPU6050Reset:237: error: 'dmp_set_orientation' was not declared in this scope
MPU6050Reset:239: error: 'DMP_FEATURE_6X_LP_QUAT' was not declared in this scope
MPU6050Reset:239: error: 'DMP_FEATURE_SEND_RAW_ACCEL' was not declared in this scope
MPU6050Reset:240: error: 'DMP_FEATURE_SEND_CAL_GYRO' was not declared in this scope
MPU6050Reset:240: error: 'DMP_FEATURE_GYRO_CAL' was not declared in this scope
MPU6050Reset:241: error: 'dmp_enable_feature' was not declared in this scope
MPU6050Reset:242: error: 'dmp_set_fifo_rate' was not declared in this scope
MPU6050Reset.ino: In function 'void disable_mpu()':
MPU6050Reset:247: error: 'mpu_set_dmp_state' was not declared in this scope
MPU6050Reset.ino: In function 'void enable_mpu()':
MPU6050Reset:253: error: 'mpu_set_dmp_state' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

I don;t know what anything of tht means so I just left it alone, I am no prgrammer, hardware is my sort of thing.
 
What I'd like to know is how you're putting these together for under a tenner. Arduinos must be a damn sight cheaper over there than here Stateside. The Pro Micro is $25 on it's own! (Unless you get one of the cheapie ones off ebay from China that take six weeks to arrive)

The unit price for an "Arduino Compatible Pro Micro" is £5.39 including UK taxes, and the price for the full kit of parts is just under £9.00.

With post and packaging it comes up a bit over £10 but at least we are lucky that its one thing we get cheaper in the UK over the US.
 
Last edited:
I thought that too it was damaged, I did try and use that mpureset but get a whole list of error message with some text highlighted.

mpu_force_reset();


mpu_force_reset was not declared in this scope

underneath are a whole bunch of error messages

Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Leonardo"

Build options changed, rebuilding all

MPU6050Reset.ino: In function 'void setup()':
MPU6050Reset:96: error: 'mpu_force_reset' was not declared in this scope
MPU6050Reset.ino: In function 'void loop()':
MPU6050Reset:162: error: 'dmp_read_fifo' was not declared in this scope
MPU6050Reset.ino: In function 'boolean initialize_mpu()':
MPU6050Reset:203: error: aggregate 'int_param_s int_param' has incomplete type and cannot be defined
MPU6050Reset:207: error: 'mpu_init' was not declared in this scope
MPU6050Reset:216: error: 'INV_XYZ_GYRO' was not declared in this scope
MPU6050Reset:216: error: 'INV_XYZ_ACCEL' was not declared in this scope
MPU6050Reset:216: error: 'mpu_set_sensors' was not declared in this scope
MPU6050Reset:218: error: 'mpu_configure_fifo' was not declared in this scope
MPU6050Reset:219: error: 'mpu_set_sample_rate' was not declared in this scope
MPU6050Reset:221: error: 'mpu_get_sample_rate' was not declared in this scope
MPU6050Reset:222: error: 'mpu_get_gyro_fsr' was not declared in this scope
MPU6050Reset:223: error: 'mpu_get_accel_fsr' was not declared in this scope
MPU6050Reset:230: error: 'dmp_load_motion_driver_firmware' was not declared in this scope
MPU6050Reset:237: error: 'dmp_set_orientation' was not declared in this scope
MPU6050Reset:239: error: 'DMP_FEATURE_6X_LP_QUAT' was not declared in this scope
MPU6050Reset:239: error: 'DMP_FEATURE_SEND_RAW_ACCEL' was not declared in this scope
MPU6050Reset:240: error: 'DMP_FEATURE_SEND_CAL_GYRO' was not declared in this scope
MPU6050Reset:240: error: 'DMP_FEATURE_GYRO_CAL' was not declared in this scope
MPU6050Reset:241: error: 'dmp_enable_feature' was not declared in this scope
MPU6050Reset:242: error: 'dmp_set_fifo_rate' was not declared in this scope
MPU6050Reset.ino: In function 'void disable_mpu()':
MPU6050Reset:247: error: 'mpu_set_dmp_state' was not declared in this scope
MPU6050Reset.ino: In function 'void enable_mpu()':
MPU6050Reset:253: error: 'mpu_set_dmp_state' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

I don;t know what anything of tht means so I just left it alone, I am no prgrammer, hardware is my sort of thing.

Looks like it's missing the nav6 libraries...
 
I thought that too it was damaged, I did try and use that mpureset but get a whole list of error message with some text highlighted.

mpu_force_reset();


mpu_force_reset was not declared in this scope

underneath are a whole bunch of error messages

Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Leonardo"

Build options changed, rebuilding all

MPU6050Reset.ino: In function 'void setup()':
MPU6050Reset:96: error: 'mpu_force_reset' was not declared in this scope
MPU6050Reset.ino: In function 'void loop()':
MPU6050Reset:162: error: 'dmp_read_fifo' was not declared in this scope
MPU6050Reset.ino: In function 'boolean initialize_mpu()':
MPU6050Reset:203: error: aggregate 'int_param_s int_param' has incomplete type and cannot be defined
MPU6050Reset:207: error: 'mpu_init' was not declared in this scope
MPU6050Reset:216: error: 'INV_XYZ_GYRO' was not declared in this scope
MPU6050Reset:216: error: 'INV_XYZ_ACCEL' was not declared in this scope
MPU6050Reset:216: error: 'mpu_set_sensors' was not declared in this scope
MPU6050Reset:218: error: 'mpu_configure_fifo' was not declared in this scope
MPU6050Reset:219: error: 'mpu_set_sample_rate' was not declared in this scope
MPU6050Reset:221: error: 'mpu_get_sample_rate' was not declared in this scope
MPU6050Reset:222: error: 'mpu_get_gyro_fsr' was not declared in this scope
MPU6050Reset:223: error: 'mpu_get_accel_fsr' was not declared in this scope
MPU6050Reset:230: error: 'dmp_load_motion_driver_firmware' was not declared in this scope
MPU6050Reset:237: error: 'dmp_set_orientation' was not declared in this scope
MPU6050Reset:239: error: 'DMP_FEATURE_6X_LP_QUAT' was not declared in this scope
MPU6050Reset:239: error: 'DMP_FEATURE_SEND_RAW_ACCEL' was not declared in this scope
MPU6050Reset:240: error: 'DMP_FEATURE_SEND_CAL_GYRO' was not declared in this scope
MPU6050Reset:240: error: 'DMP_FEATURE_GYRO_CAL' was not declared in this scope
MPU6050Reset:241: error: 'dmp_enable_feature' was not declared in this scope
MPU6050Reset:242: error: 'dmp_set_fifo_rate' was not declared in this scope
MPU6050Reset.ino: In function 'void disable_mpu()':
MPU6050Reset:247: error: 'mpu_set_dmp_state' was not declared in this scope
MPU6050Reset.ino: In function 'void enable_mpu()':
MPU6050Reset:253: error: 'mpu_set_dmp_state' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

I don;t know what anything of tht means so I just left it alone, I am no prgrammer, hardware is my sort of thing.

You not far from success. The reset sketch uses a different library to the normal one.
You need to copy the three folders in the libraries zip ( thats in the MPUReset folder) (( hope your following this))

Well the three folders "HMC5883L, InvensenseMotionDriver and nav6" need to end up in "C:\Program Files (x86)\Arduino\libraries"

Once you have done that you shouldn't get any error with the sketch and it will upload ok.
 
Atmos, I think that just means that the sketch you are uploading is trying to use libraries you don't have installed.
Or you have loaded the sketch into the same window as the old one so its maybe trying to load two? No such blah declared in this scope...... All looks very familiar to me, lol.
I had some difficulties interpreting the directory structure and was putting stuff in the wrong place.

:)


I had very similar massive lists of errors early on. Its easy to fix if you know what to do, but very hard if you don't. Hang on for Pocketmoon to skim the error list or brumster. Edit: Or Omegahunter .(ninjad) :)


If you don't know what you are trying to achieve then it's very difficult to achieve it right. All part of the "fun" yeah!

But I'm pretty sure your board is fine don't worry or be glum.
 
Last edited:
From the Alpha forum post when we had the same issue with the MPU6050 before.

"For folks with unhappy MPU6050s I've upload a sketch based on a different library which seems to initialise the sensor more cleanly.

See contents of MPUReset:

https://github.com/pocketmoon/MPU-60...-Head-Tracker/

You will need to copy the contents of libraries.zip into the arduino/libraries folder and then load the sketch and open the serial monitor.

Let the sensor settle then yaw the sensor while flat on the table. That should confirm if it's behaving and you can go back to the ED Tracker sketch.

Cheers

Rob"


Its just a matter of getting the sensor reset then you should be ok to reload the ED Tracker sketch as he said :D
 
The unit price for an "Arduino Compatible Pro Micro" is £5.39 including UK taxes, and the price for the full kit of parts is just under £9.00.

With post and packaging it comes up a bit over £10 but at least we are lucky that its one thing we get cheaper in the UK over the US.

The Tenner price was envisaged before we had the daughter board PCBs made.
Because they are made in Scotland as a prototype and not mass produced in China they cost more than the other two boards put together. A fiver a time. Still a lot cheaper than it really should be but we will see how it goes.
I think if you buy 300+ the price comes down to below a fiver for both surface mount boards from China, but someone would have to stump up the cash and take a risk and probably have to wait six weeks for the boat to come in.
Originally the idea was to DIY it all but some people have expressed an interest with having other people assemble the unit with the custom board,calibrate, program and test it with the latest iteration of the code. We consider £25.00 plus p+p to be a reasonable price for it. Which is not, I agree, a Tenner.
:p
 
Last edited:
The Tenner price was envisaged before we had the daughter board PCBs made.
Because they are made in Scotland as a prototype and not mass produced in China they cost more than the other two boards put together. A fiver a time. Still a lot cheaper than it really should be but we will see how it goes.
I think if you buy 300+ the price comes down to below a fiver for both surface mount boards from China, but someone would have to stump up the cash and take a risk and probably have to wait six weeks for the boat to come in.
Originally the idea was to DIY it all but some people have expressed an interest with having other people assemble the unit with the custom board,calibrate, program and test it with the latest iteration of the code. We consider £25.00 plus p+p to be a reasonable price for it. Which is not, I agree, a Tenner.
:p

Definitely - the very title of this says DIY for under a tenner, so if you're doing it with a breadboard, and the pro micro and accelerometer are available for under a tenner (which it is!) then there's no worries. If you're mass producing (well, not mass… you know what I mean!) a full solution, then that's a different kettle of fish.

I'll probably have a bang off making one at some point - I'm currently using a Leonardo to build a control panel for the game using toggle switches and potentiometer for the scanner as well as buttons (and maybe an LCD as well, because if you're going to kill… might as well overkill!) but this will be next. But if there was a finished article, with a nice enclosure that I could just velcro to the top of my headphones, rather than a homemade job with bits all over, then I'd probably plumb for the nice kit. (Wireless would be the business, though!)
 
Are you working towards a download this single file, double click and all software installed approach? Oh and if you ever pass Manchester free beer!!! For your troubles
 
So after a bit of soldering this evening (which I found terrifying btw) I've managed to get the thing to work!

SaLtf7F.jpg

I only have the premium beta to will have to play around with ujr to get my thrustmaster hotas and the gyro working together. Still, I was able to successfully test it in ED by unpluging my joystick and leaving just the gyro plugged in. I selected keyboard/mouse in controls and was then able to set up the gyro for x and y head look.

Amazingly it works!!! I set head lock mode to DIRECT as this seems to work best. It really does work, flying past asteroids looking at them out of the windows is fantastic. I can wait to try it in combat. Thanks to everyone in this thread for there help!

The only issue I'm having is on the x axis. I.e. when I look to the left or right. After only around a minute or so, when I centre my head the view is slightly off to the left. If i play for longer it is even further over to the left. If I press the reset button on the gyro that fixes it, but only for a couple more minutes.

Any ideas guys? Is this the drift issue people have talked about? I though this was on the Z axis though?
 
Last edited:
The only issue I'm having is on the x axis. I.e. when I look to the left or right. After only around a minute or so, when I centre my head the view is slightly off to the left. If i play for longer it is even further over to the left. If I press the reset button on the gyro that fixes it, but only for a couple more minutes.

Any ideas guys? Is this the drift issue people have talked about? I though this was on the Z axis though?

Yes it is, X axis in the game or Z axis from the MPU-6050's point of view.

You will be able to reduce this to a reset down to 30 mins or longer once you have fully calibrated the yaw drift
 
Sounds like a rushed drift calibration to me.
I have noticed that sometimes the drift correction value can take 40 or more minutes to settle down to a more or less stable figure.

Pocketmoon says that if it is not converging fast enough just press the reset button until its looking more sensible.
It resets all the counters I think.

Pocketmoon knows best.

Sounds like its working and just needs a bit of fettling, which is a bit difficult if you only have experience of one.

I don't think you really need to calibrate in usb game controllers but it might help get the comfortable range of movement of your head to match up with the movement of the crosshair and z axis monitor in the little window.
Brumster does not bother with that, most he says you should do is reset to defaults. But he's into funky exponential tracking and all sorts ,lol.
He's a proper Nutter! I'm jealous!

I've had some beer now and my posts tend to get a bit epic and artistic after a few...
So..... Signing off till tomorrow.
:)



Well done.
:)
 
Last edited:
Back
Top Bottom