## Gyro Raw data to degrees per second

5 posts / 0 new
Author
Message

Hi,

I have a gyro (L3GD20H) that gives me raw values in 2 bytes expressed as 2s complement.

The full scale of my gyro is +/-2000dps (degrees per second).

To me, it means that to convert raw data to dps, I need to do : (2000 / 32767) * raw

2000 / 32767 = 0.061 but when I look at some examples on the Internet, the formula that I find is : dps = 0.07 * raw.

So I don't really know why I should use 0.07 instead of 0.061. Does my calculation are incorrects?

Thanks.

Data sheet says you can read it at 700hz (every 1428 usecs). Each reading is the rate of change (deg per sec) during that 1428usec period. So you read the rate, mult by the deltat to get the degrees in that sample time, then add that to the degrees to get where it is now. I think.

Imagecraft compiler user

bobby4078 wrote:

Hi,

I have a gyro (L3GD20H) that gives me raw values in 2 bytes expressed as 2s complement.

The full scale of my gyro is +/-2000dps (degrees per second).

To me, it means that to convert raw data to dps, I need to do : (2000 / 32767) * raw

2000 / 32767 = 0.061 but when I look at some examples on the Internet, the formula that I find is : dps = 0.07 * raw.

So I don't really know why I should use 0.07 instead of 0.061. Does my calculation are incorrects?

Thanks.

Hi Bobby, did you ever get the L3GD20H to work? I've got one and it's giving me lots of problems. I get acknowledges from the gyro and I can read the WHO_AM_I register correctly with the corressponding 0xD7 data. However, I haven't been able to get any useful data from the X, Y, Z output registers. I receive data from them but the data never changes. Whatever the value that I receive from one of those output registers is the same value that I continue to receive over and over. Can you please post your code if it's working? Thanks.

Are you still having trouble? Give the datasheet a thorough read; the L3GD20H starts up in "power down" mode. To change this, you need to write to the CTRL1 register at address 0x20.

I know this is a dead thread, but I came here looking for the same answer and found it elsewhere. For anyone unable to find the answer:

You want the conversion factors in units of mdps/digit from row 2 of the table. There's no explicit indication, but the conversion rates for the 16 bit raw data go as follows:

 range (+/- dps) conversion factor (mdps/digit) final value (dps) 245 8.75 0.00875 * raw 500 17.50 0.01750 * raw 2000 70.00 0.07000 * raw