I wrote an ADXL345 driver. Its readings are off by a scale of 12%. #15951
Replies: 1 comment
-
OK I found the issue. I was using and RPI pico and accidentally connected the VBUS pin to my power bus on the breadboard instead of 3V3OUT. So the accelerometer received a voltage higher than its operating voltage. I tested the accelerometer with a sparkfun pro micro that runs on 3.3V on a different breadboard and its readings were correct. I was using an old library by Jeff Rowberg. So I checked my wiring on pico and discovered the wiring error. Good thing this is just for tinkering. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote my own ADXL345 driver based on the data sheet and some github code I read. It's pretty basic, with only reading values at a fixed +-16g range and 100Hz without FIFO. It's just for that purpose, reading and printing out accelerometer values. What I noticed was that with my breakout board, the z-axis values span about 1.92g range (ideally 2.00g), 8% off in scale, which was not too bad considering I didn't seriously align the accelerometer and am bound to read a less value range. But x and y values both span about 2.25g (ideally 2.00g) so they are about 12% off in scales, larger than expected. This is a bigger issue since it really shouldn't happen if I don't try very hard to align the accelerometer I should get a smaller range of values, not larger range. This isn't an offset issue since offsets will be cancelled out if I subtract + and - readings on the same axis. I wonder if anyone has ideas what may have gone wrong. It could be the accelerometer itself. I'll acquire a new one in my next batch purchase. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions