Jump to content
  • 0

adxl345 output values


canye23

Question

Hello, 

 

I have programmed the adxl345 with labview and linx via I2C protocol and I have the following question.

The output from the accelerometer is given in voltage if I am not mistaken. In order to convert it to m/s^2 I have to multiply it by 16*g where g=9.81 m/s^2 (suppose of course I have 16g resolution)?

 

thank you in advance

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Hi @canye23,

In the datasheet here on page 4 under sensitivity it give you mg/LSB or LSB/g. mg/LSB stands for milli-G's per Least Significant Bit. As a milliliter is to a liter, 1 mG is to a G. So, 1 mG = 0.001 G's of acceleration. LSB relates to the digital representation of the measured acceleration. This basically tells you the accuracy of your output reading. In other words, if the accelerometer has a rating for 3 mG/LSB, then when the lowest order bit in your output changes, your acceleration has changed by 0.003 G's, or 3 mG.

thank you,

Jon

Link to comment
Share on other sites

Hello @canye23,

The output from the accelerometer is initially in voltage, but the internal ADC within the ADXL345 will convert the voltages to a digital value (which varies based on what resolution you choose as well as what g range was chosen). If you then want to convert this into usable data (i.e. g values), you will need to use either the LSB/g sensitivity of each axis or the mg/LSB scale factor of each axis that is provided on page 4 of the ADXL345 datasheet.

Using the example of +/- 16g scale with 10 bit resolution, this is 32 LSB/g, so if you wanted to convert the values inside the registers to g, you would take the register value (units of LSB) and divide it by 32 LSB/g to get the result in g. The catch here is that the data in the registers is in 2's complement (to account for negative values) so you would need to account for that as well. This can be manually done by checking the MSB and seeing if it is a 1; if it is, flip the 9 other bits of data and then subtract a value of one to get a positive binary value, or you can use the Two's compliment conversion VI (which I believe converts the value directly into decimal rather than binary).

Let me know if you have any questions about this.

Thanks,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...