AnsweredAssumed Answered

ADXL345 Z-axis reading

Question asked by Samer on Apr 1, 2013
Latest reply on Mar 16, 2015 by Sandy@9028829909

Hello,

 

Regarding this topic

http://ez.analog.com/message/81854#81854

 

I'm having the exact same problem with the Z-axis ! X and Y axes are working well, but the issue is with the Z-axis ..

1- When using +-2 g range, the Z reading is 511, it doesn't change regardless the orientation of the ADXL345.

2-I was obliged to use +-16 g range to read any difference in the z-axis

3- When using +-16 g, the z-axis only changes from 4095 to 3773 from 0 to -1 g, I mean by that :

From 0 to 1 g (z-axis) --> The reading is 4095 (doesn't change)

From < 0 g (z-axis) --> The reading begins decreasing until reaching -1 g orientation giving an output of 3773

Therefore any value > 0 g (z-axis) isn't captured, the maximum is 0 g .. Working range is -1<g<0

 

-I'm using I2C mode

-I'm using this board:

https://www.sparkfun.com/products/10121

 

- I tried using a negative offset of the maximum value OFSZ = 0x80 (-128 LBS) , the same problem exists but with a maximum value output of 3582 [ (4095*3.9 - 128*15.6)/3.9 ].. I think this means that the problem isn't the maximum number of bits (13 bits), but a sensor core problem.

 

Similar problem was found here:

http://arduino.cc/forum/index.php?topic=101845.0

I think he was then satisfied with the -1<g<0 readings after using +-16 g range mode.

 

 

Note:

I'm using I2C with PIC16F877A which has a logic level of 5 V, should I use a logic level converter ?! I didn't use one, taking into consideration that the I2C bus is pulled up in the ADXL345 module with 3.3 V so no need of logic conversion as the pic is only driving the line low or releasing it (I2C protocol).

Also if there was a problem with I2C, it wouldn't appear only in z-axis, it would've appeared in other readings.

By the way, X-Y axes readings are very accurate, with no noise at all specially after adding a 47 uF parallel capacitor on the input power source.

 

 

Any help is appreciated,

Best Regards

Outcomes