Meaning of “LSB/Unit” and “Unit/LSB”

天大地大妈咪最大 提交于 2019-11-29 06:16:42

问题


At the moment I'm playing with the LSM303DLHC accelerometer/magnetometer/thermometer.

This is its datasheet: http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00027543.pdf

Everything is working quite well, but I don't know how to interpret the output values. The datasheet (page 9) says something like "1 mg/LSB" (no, it's not milligramm :D) about the linear acceleration sensitivity in my configuration. What the hell should that mean? Same with temperature sensor output change (8 LSB/°C) and magnetic gain setting (1100 LSB/gauss), only the other way around.

For example, what to do with this accelerometer output: 16384? That is my measured gravitational acceleration.


回答1:


Now I got the trick. There are several things on this MEMS you have to know, but which are not mentioned in the datasheet:

  1. The accelerometer's output register is just 12 bits and not 16 bits, so you need to right-shift the value by 4 and multiply it with 0,001 G. Furthermore it's little-endian.
  2. The magnetometer's output register is 16 bits, but big-endian. Furthermore the vector order is (X|Z|Y) not (X|Y|Z). To calculate the correct value you need to devide X and Y by 980 gauss⁻¹, while it's 1100 gauss⁻¹ for Z.
  3. The temperature sensor works, but it's not calibrated. So you can use it to measure temperature change, but no absolute temperatures. It's also just 12 bits, but big-endian and you have to devide the output by 8 C⁻¹.

With that Information it's possible to use the LSM303DLHC. But who the hell invented this? "Let's build a new accelerometer, magnetometer and thermometer in one package and screw the user up by mixing word length and endianness up without mentioning it in the datasheet."




回答2:


LSB/unit or Unit/LSB is the factor(called sensitivity) with which you have to multiply the raw sensor data. Say Sensor A has X,Y and Z registers , the values coming in each of the registers needs to be Divided/multiplied with the LSB/unit or Unit/LSB factor. This is because the data sheet says @ the particular fullscale you will have this much sensitivity(LSB/unit or Unit/LSB)

for LSB/Unit :

x lsb means - 1 unit

1 lsb means - 1/x unit

value lsb(value in the register) = (1/x)*(value in the register) - Apply unitary method here.

similarly for Unit/LSB you have to multiply the sensitivity.

You can build Accelerometer,Magnetometer or Temperature sensor or may be Gyro-meter in one module, but what if a customer/User wants only one sensor?

Rgds, Rp




回答3:


The datasheet is definitively unclear regarding the interpretation of the Acceleration registers. Genesis Rock solution assume it is 12-bits, which works. (Another solution is to assume gain is 16 mg/LSB instead of 1 mg/LSB, but as the last 4 bits of the accelerations seem to always be zeros the former solution makes more sense).

But both for the temperature and acceleration, if you take into account only the 12 most significant bits. The last two bits are still also always zero, so the effective resolution would be 10-bits which is confusing.

I also can't make sense of the temperature reading unless there is an unknown offset not specified in the datasheet.

I hope others can confirm they are getting the same results.




回答4:


Regarding the 12 bit output of the accelerometer: there is a high-resolution flag on control register 4. It's off by default and there's no information on what high resolution means. I'm guessing that it might enable 16 bit output. Also on control register 4 is a flag to set the endianness of the accelerometer output. It's little endian by default. The data sheet is pretty weak overall.




回答5:


The simple and embarrassing fact is that none of the responses have hit the target of the question.

The result is buried in another parameter that is supplied in the data sheet: the sensitivity. for example the FXAS21002C for 2000 dps sensitivity is 62.5 mdps/LSB (=0.0626 dps/LSB). the zero offset is 25 LSB thus the value in dps units is 0.0625 * 25 = 1.5625 dps

the same IMU has another sensitivity for 250 dps which is 7.825 mdps/LSB (=0.007825 dps/LSB) and since the offset is also 25 LSB then the calculation will expose the real value of 0.0078125 * 25 = 0.1953 dps

the example can be found here: https://learn.adafruit.com/comparing-gyroscope-datasheets/overview



来源:https://stackoverflow.com/questions/19161872/meaning-of-lsb-unit-and-unit-lsb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!