# How to convert accelerometer data into G with the ADXL345 digital accelerometer

Am totally new to electronics and the datasheet is very confusing to me, so can anyone please guide me through the specification of the accelerometer? So that i can have a better understanding on the accelerometer and to be able to convert the accelerometer data into G.

X-axis Y-axis Z-axis -28 -26 218 These are the readings i get from the accelerometer with a ±2g range

This is the datasheet for the ADXL345 digital accelerometer [1]: https://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf

Hello @ckkkkk!

Well, this accelerometer has a resolution of 10bit, or 1024. Meaning that you can get 1024 “steps” in your reading (512 in the positive side and 512 in the negative side

Since you have set up the accelerometer in the ±2g range, each “step” it outputs means it reads a variation of 2/512 = 3.9mG. This value can be found here:

Currently, your accelerometer is reading -28 * 3.9 = -0.11G in the x axis, -26 * 3.9 = -0.1G in the y axis and 218 * 3.9 = 0.85 G

If your accelerometer is resting flat on a surface, I suggest that you get a level and shim your table because, based on the readings of the module, it is clearly crooked