I feel kind of stuck on the kickstarter project since I need a video before I make the project, and I can't get funding until I make the project. Work is definitely kicking my but, we started with 5 technicians and now we're down to 2, so if we can't get any more technicians the project is going to be put on hold. Luckily I'm Post Support so I've been able to put in a couple of full weeks, once I get enough for a decent digital camcorder, there will be some decent videos of MINIMouse V1.0 appearing on here.
While I wait to get paid, I've been sampling different gyroscopes, I still like the ADXRS613 the best thus far. The 150°/s resolution is my only real complaint since the GM8 Gearmotors on V1 easily can send it off-scale high. V2.0 I plan to use the GM2 Gearmotors and a gyro with 300°/s resolution to keep it within scale.
ADRXS613 Sensor Data on a Graph
This ADXRS613 has an angular drift of 6°/hr and a bias of 2°/s or so. To correct for these factors, we initially take a running average to determine a suitable bias. Then after we have the bias we subtract that from our sensor readings, these readings are also put through a running average to reduce noise. The final value we get is still just a raw value and must be converted to °/s.
To find the conversion factor, we simply take half of our ADC range (511) and divide it by our sensors resolution (150), this gives us 3.41. You can then take the ADC result, and divide it by 3.41 and subtract 150 to get the value in °/s.
(0 / 3.41) - 150 = -150°/s
(511 / 3.41) - 150 = 0°/s
(1023 / 3.41) - 150 = 150°/s
With microcontrollers it can be useful to convert this math into integer math. This is easily done by scaling the conversion factor and ADC result by a value that makes the conversion factor an integer. To make things simpler we can also round the conversion factor down to 3.4, this gives us a scaling factor of 10. Our conversion factor is now 34:
((0 * 10)/34) - 150 = -150°/s
((511 * 10)/34) - 150 = 0.29°/s
((1023 * 10)/34) - 150 = 150.88°/s
While not perfect, this allows us to completely avoid nasty floating point math which hogs CPU time and program memory.