Arduino 3DOF Head Tracker

Thanks Z.

That 5K resistor thing was really nagging me, it didn't make sense and also I feared it might mess with the RC filter already on the gyro/accelerometer outputs. So after pondering the situation today and re-reading everything again, twice - I did discover that the resistor is to be added to the VREF pin, not to every input pin. I didn't have a 5K, so I used a 4.7K and wired it up to the 3.3V produced by the Arduino's own regulator. The ones on the gyro and accel boards seem to be more accurate, but they aren't the same and I couldn't decide which to use:

Arduino 3.345V (3.266 mV/unit)
Gyro 3.305V (3.227 mV/unit)
Accelerometer 3.293V (3.215 mV/unit)

Now that the thing has been running with analogReference(EXTERNAL) without magic smoke, I'll probably use the gyro 3.3V output as it's the closest to ideal.

I've been using Hyperterminal to collect the CSV and Excel to chart, and wrote a VB program as well - it doesn't graph, but does use slider controls so you can see what is going on, and I'm playing around with drawing lines on a PictureBox to visualize how the sensor is oriented. That will be easier once the code is outputting proper angles.

Offsets - ::slight_smile: hmmph - of course it was my code that calculated them wrongly (far too few samples), I changed my too-clever "offsetcount" method to a time measurement calibration instead ... I've tried 1, 5 and 10 seconds it doesn't seem to make much difference to the offsets, which pretty much take all the sensors to zero with no-motion - aside from the gyro drift of course.

Thanks for your insight about responsiveness - I removed my special timer code and the results were pretty well the same as before.

As for the 'impulse' acceleration and separating that from the physical position of the device, I've been playing around in the VB program and taking the difference between successive readings as the impulse, and trying to subtract an accumulation of impulses from the current value.