Friday, 20 June 2014

arduino - How do I get gyro sensor data (L3G4200D) into degrees/sec?


I've been using a gyroscope sensor for an Arduino project. It's all hooked up and working but I have no idea what the units of the data it's giving me are in. I try to spin the board in my hand at what should be roughly 90 deg/sec but I'm getting numbers from the gyro of 2000-5000 range. I've just tried scaling it down and calibrating the scale factor by visually rotating the board 90 deg/sec. I know there has to be a better way to do this. I've been over the data sheet many times and I'm still not getting it. It says the units are mdps/digit which I've never heard of before.



Answer



It says the range can be set to 250/500/2000 DPS, which I think is the maximum angular speed the device can measure (i.e 2000 DPS is the fastest setting)
DPS stands for Degrees Per Second, so 360 DPS means 60 RPM (revolutions per minute) or 1 revolution per second.


The mdps/digit stands for Milli Degrees Per Second, so (I think) for instance the value of 70 mdps/digit for the 2000 full scale range could be converted to degrees per second by dividing by 1 / 0.07 = 14.286. 1 revolution per second should therefore be 360 * 14.286 = 5413 Make sure you are reading the output registers correctly, the data is a 16-bit value in 2's complement (i.e the MSB is the sign bit, then 15 bits for the value)


Try the above and see how it goes.



No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...