CaptainObvious 95 Posted April 23, 2014 doveman said: I only just reflashed my MPU-6050 with the spring-reset firmware and found it was still drifiting back towards centre a lot, even though I left the headset still on the table after flashing it and after starting FTNoIR before putting it on my head but I need to test a bit more as I only did a quick test. spring_reset is meant to drift to the center. Share this post Link to post Share on other sites
doveman 7 Posted April 23, 2014 CaptainObvious said: spring_reset is meant to drift to the center. OK, why on earth would anyone want it to do that then? Share this post Link to post Share on other sites
CaptainObvious 95 Posted April 23, 2014 doveman said: OK, why on earth would anyone want it to do that then? Actually, re-reading your post, you said a lot, that's not how it should be, spring_reset is meant to very slowly center the view when player is looking at the sides, and a bit faster, but still slowly when the player is looking forward-ish, it's a crude workaround for the yaw drift. Share this post Link to post Share on other sites
doveman 7 Posted April 23, 2014 CaptainObvious said: Actually, re-reading your post, you said a lot, that's not how it should be, spring_reset is meant to very slowly center the view when player is looking at the sides, and a bit faster, but still slowly when the player is looking forward-ish, it's a crude workaround for the yaw drift. Well I suppose 'a lot' is subjective but if I'm trying to look at something out the side window or the side console, I don't want it moving my view back to the centre by itself, which is what it was doing. I'm not sure if I've seen the yaw drift so maybe that's worse than what it's doing now but at the moment I find it pretty unusable I'm afraid (unless I stop tracking whenever I'm trying to look anywhere). ---------- Post added at 22:19 ---------- Previous post was at 21:24 ---------- I stumbled across these pages which might have something useful on them: http://reprapdad.wordpress.com/ http://www.brumster.com/articles.php?article_id=16 I don't really understand how some people have mounted the MPU directly above/opposite the Arduino as it doesn't seem like the pins on the two boards match up and I had to use jumper wires to link the right pins but I must be misunderstanding something. Here's a kit of the necessary parts if anyone needs it: http://hobbycomponents.com/index.php/diy-head-tracker-bundle.html?SID=24014dc15bda4f7af610c8c75a667a93 Share this post Link to post Share on other sites
f2k sel 164 Posted April 23, 2014 I also didn't get on with the spring_reset, it did make it better but I still had drift as well. By increasing the spring I ended up with more of a glance function, I would turn my head and you could see moving back to center. I also found the when you did return you head to center the view was now slight offset and took a while to reset but it was never perfect. The result was the more you move your head the more it went wrong. It looks like I finally have my GY80 working correctly, I left it running for an hour and there was no drift, I also did about 10 laps with Assetto Corsa and I could see any problems. Then again the MPU-6050 seemed to work of at first. As for mounting the chips I guess you could use a couple of pins and then use wires for the rest. Share this post Link to post Share on other sites
newboerg 10 Posted April 24, 2014 Hi guys, amazing how many people got this thin to work. I just ordered an MPU9150 (its an MPU 6050 with compass included) When its there i will add another guide in how to use this thing. Its a little bigger investment (around 10€) but i think it will make the Head Track device way more usable. As it should not be that prone to drift using the compass. I'll keep you up to date... Share this post Link to post Share on other sites
CaptainObvious 95 Posted April 24, 2014 doveman said: Well I suppose 'a lot' is subjective but if I'm trying to look at something out the side window or the side console, I don't want it moving my view back to the centre by itself, which is what it was doing. I'm not sure if I've seen the yaw drift so maybe that's worse than what it's doing now but at the moment I find it pretty unusable I'm afraid (unless I stop tracking whenever I'm trying to look anywhere). Yep, it's not perfect, but it's a lot better than having the center drift away and needing to reset the tracker every few seconds. newboerg said: I just ordered an MPU9150 (its an MPU 6050 with compass included) Nice! I suppose you have written a sketch for it too? I will keep a keen eye on your stuff, thanks buddy! :) Share this post Link to post Share on other sites
pocketmoon 10 Posted April 24, 2014 doveman said: [/color]I stumbled across these pages which might have something useful on them: <snip can't post links as I'm a new forum member!> I don't really understand how some people have mounted the MPU directly above/opposite the Arduino as it doesn't seem like the pins on the two boards match up and I had to use jumper wires to link the right pins but I must be misunderstanding something. Hi, I'm one of the guys working on that Head Tracker for the Elite: Dangerous game. Co-incidentaly our main thread is entitled "Head TRacker for under £10" and our basic hardware is the same. We expose the device as a 3-axis HID Joystick and use the in-game head-look config to bind the two relevant axis. Code is on github/pocketmoon We're using the I2Cdevlib arduino port of the invensense libraries so perform a full calibration on the mpu-6050 as described on the I2Cdevlib forum. We found yaw drift was an issue and the button was added to allow the user to look ahead and press it to reset yaw (takes 2 seconds of sampels). We found that this was needed every 5 minutes or so which wasn't ideal! I measure yaw drift and found that it was suprisingly constant. In debug mode the code outputs a yaw drift value which after it's settled (10 minutes or so) can be plugged back into the sketch. float driftComp = 0.12345; With careful calibration this virtually eliminates yaw drift for up to 45 minutes/ an hour. And when drift is noticable you just look straight ahead and press the button to reset. I'm now porting to a more recent mpu-6050 library which exposed more invensense functionality (can't post links but google "nav6 arduino") Where you see to arduino and sensor mounted together that's using a prototype PCB. We're having some professionalyy made which allows for a much small package - important when taping to you headphones! Cheers, Rob Share this post Link to post Share on other sites
newboerg 10 Posted April 24, 2014 pocketmoon said: Hi, I'm one of the guys working on that Head Tracker for the Elite: Dangerous game. Co-incidentaly our main thread is entitled "Head TRacker for under £10" and our basic hardware is the same. We expose the device as a 3-axis HID Joystick and use the in-game head-look config to bind the two relevant axis. Code is on github/pocketmoon We're using the I2Cdevlib arduino port of the invensense libraries so perform a full calibration on the mpu-6050 as described on the I2Cdevlib forum. We found yaw drift was an issue and the button was added to allow the user to look ahead and press it to reset yaw (takes 2 seconds of sampels). We found that this was needed every 5 minutes or so which wasn't ideal! I measure yaw drift and found that it was suprisingly constant. In debug mode the code outputs a yaw drift value which after it's settled (10 minutes or so) can be plugged back into the sketch. float driftComp = 0.12345; With careful calibration this virtually eliminates yaw drift for up to 45 minutes/ an hour. And when drift is noticable you just look straight ahead and press the button to reset. I'm now porting to a more recent mpu-6050 library which exposed more invensense functionality (can't post links but google "nav6 arduino") Where you see to arduino and sensor mounted together that's using a prototype PCB. We're having some professionalyy made which allows for a much small package - important when taping to you headphones! Cheers, Rob :) Nice , i was thinking to do roughly the same for the 6050 setup. as the drift is, when its there, usually very constant, i thought about an "reset" function that would meassure the drift in eg. 5 seconds and use this to compensate the drift Share this post Link to post Share on other sites
doveman 7 Posted April 25, 2014 doveman said: Thanks, I guess I can try 2/3 or A2/A3 to see if one works better than the other.I only just reflashed my MPU-6050 with the spring-reset firmware and found it was still drifiting back towards centre a lot, even though I left the headset still on the table after flashing it and after starting FTNoIR before putting it on my head but I need to test a bit more as I only did a quick test. Well it isn't working with A2/A3, so I guess I'll have to try 2/3. I'd be surprised if the guy who did that guide on the RC forum had the wrong pins identified though as he seems to know what he's talking about and there's been tons of replies, so I'm sure someone would have pointed out such a serious mistake. Maybe my chip is just faulty :( Share this post Link to post Share on other sites
f2k sel 164 Posted April 26, 2014 Well I'm not fairing much better, I can get my to work and drift seem to be zero but it keeps failing to work. If I unplug the cable or turn off the PC the next time I come to use it nothing happens. I have to completely reprogram and recalibrate it, this takes around 5mins and a compete pain. Share this post Link to post Share on other sites
doveman 7 Posted April 26, 2014 Damn, still not working after rewiring it to 2/3 instead of A2/A3 :( Share this post Link to post Share on other sites
newboerg 10 Posted April 26, 2014 doveman said: Damn, still not working after rewiring it to 2/3 instead of A2/A3 :( try the following: upload the "I2C Scanner" Sketch to your arduino. http://playground.arduino.cc/Main/I2cScanner to see if the connection is working. Share this post Link to post Share on other sites
doveman 7 Posted April 26, 2014 newboerg said: try the following:upload the "I2C Scanner" Sketch to your arduino. http://playground.arduino.cc/Main/I2cScanner to see if the connection is working. Thanks, that seems fine and gives: Scanning... I2C device found at address 0x1E ! I2C device found at address 0x53 ! I2C device found at address 0x68 ! done Share this post Link to post Share on other sites
newboerg 10 Posted April 26, 2014 doveman said: Thanks, that seems fine and gives:Scanning... I2C device found at address 0x1E ! I2C device found at address 0x53 ! I2C device found at address 0x68 ! done what if you swap the two wires Share this post Link to post Share on other sites
doveman 7 Posted April 26, 2014 newboerg said: what if you swap the two wires Well then it would be wired wrong! It's probably just that the firmware I've tried isn't suitable for the GY-85 I guess. Share this post Link to post Share on other sites
f2k sel 164 Posted April 26, 2014 Which software are you using, have you tried the one sebastian is using https://sourceforge.net/p/facetracknoir/discussion/iht/thread/eced1cb2/?limit=25&page=4#4496 I'd imagine you set up the same way as the GY80 but select GY85 instead. Share this post Link to post Share on other sites
doveman 7 Posted April 27, 2014 F2k Sel said: Which software are you using, have you tried the one sebastian is using https://sourceforge.net/p/facetracknoir/discussion/iht/thread/eced1cb2/?limit=25&page=4#4496I'd imagine you set up the same way as the GY80 but select GY85 instead. Yeah, I tried that after the RC forum software. Have you used sebastian's successfully with the GY80 and Pro Micro? Share this post Link to post Share on other sites
f2k sel 164 Posted April 27, 2014 doveman said: Yeah, I tried that after the RC forum software. Have you used sebastian's successfully with the GY80 and Pro Micro? Yes it's working ok ish, it just fails when I unplug it so I have to re-do the whole settup again. It also does the same with the another bit of software so it looks like a GY80 issue. How does it fail? Share this post Link to post Share on other sites
doveman 7 Posted April 27, 2014 F2k Sel said: Yes it's working ok ish, it just fails when I unplug it so I have to re-do the whole settup again.It also does the same with the another bit of software so it looks like a GY80 issue. How does it fail? That's weird that you have to re-do it all after unplugging it! Mine just doesn't give any output at all though. I guess I should have tested it on breakout board before soldering it all up but I assumed it would just work, like the MPU-6050 did. Share this post Link to post Share on other sites
f2k sel 164 Posted April 27, 2014 doveman said: That's weird that you have to re-do it all after unplugging it!Mine just doesn't give any output at all though. I guess I should have tested it on breakout board before soldering it all up but I assumed it would just work, like the MPU-6050 did. Yea , I'm just hoping it will be ok and keep it's memory if I switch off the PC, I just haven't had chance to test it properly.That way leaving it plugged in isn't an issue for me. They seem quite tough when it comes to soldering them, I'd used the pins then decided to remove them to allow for a more compact unit. I'm halfway through building a housing for it, until it's done I can't really use it. Share this post Link to post Share on other sites
doveman 7 Posted April 27, 2014 F2k Sel said: Yea , I'm just hoping it will be ok and keep it's memory if I switch off the PC, I just haven't had chance to test it properly.That way leaving it plugged in isn't an issue for me.They seem quite tough when it comes to soldering them, I'd used the pins then decided to remove them to allow for a more compact unit. I'm halfway through building a housing for it, until it's done I can't really use it. I took the easy way and bought this battery box, which is just the right size once I removed the battery connector, switch, etc http://www.maplin.co.uk/p/1-9v-switched-battery-box-l90an ;) Share this post Link to post Share on other sites
f2k sel 164 Posted April 28, 2014 Damn I think I have one as well somewhere. Share this post Link to post Share on other sites
doveman 7 Posted May 1, 2014 I guess I'll have to buy another one. Is there any advantage in getting the GY-85 over the GY-80 as the latter is cheaper, which seems weird as it has a barometric sensor, which the GY-85 doesn't? Share this post Link to post Share on other sites
newboerg 10 Posted May 2, 2014 (edited) OK, for the ones having constant drift problems with the sketch described withon the guide try the following: search for: hat.gyro[2]=angle_z; inside the arduino sketch file and change it to hat.gyro[2]=angle_z*0.988; where 0.988 is the value needed to correct the drift you might need to up or down it a bit with your setup heres the edited sketch: https://www.dropbox.com/s/jl5cdmcepdjt63w/gy_521_send_serial_HAT_ITG_spring_reset_compensation_setup.ino Edited May 3, 2014 by newboerg Share this post Link to post Share on other sites