i2c Dev Lib low sensor resolution

Hi guys,

I'm working on a project which requires the highest resolution possible from every sensors installed on this IMU board. Since I'm using this ESP32 Dev Board, I've found out that I can achieve that goal using the i2c dev lib. Apart from the magnetometer and the barometer which are working fine, giving the full resolution, looks like I can't get the same 13-16 bits out of my ADXL345 accelerometer, nor ITG3205 gyroscope.

By diving into the i2c dev lib class references for my two problematic modules, I've found many useful functions, but looks like I can't still get them to increase my module's resolution. I've been able to change the sampling rate and activate the internal filter of my gyro, but still getting low resolution digits (e.g. when laying on a table, my accelerometer z axis is showing 230 as a value).

For ADXL345 there is the setFullResolution command but I'm not sure which parameter I should pass in, I know it's the resolution but how should I behave?
For ITG3200 there is the setFullScaleRange but again I'm unsure about the parameter.

If you guys could give me an example of those function used inside a code, that would be great.
I'm using the respective code library samples.

Thank you.

ADXL345_raw.ino (3.14 KB)

ITG3200_raw.ino (3.16 KB)

Little UP :smiley:

The ADXL345 is only 13 bit, so you are never going to improve on that, the gyro does have 16-bit ADC, so you should be able to call that information.

On the gyro it looks like you have to seperately read MSB & LSB for each parameter (Addr 1D & 1E for Gyro X) which you could possibly do with a multiple call.

The accelerometer appears to be similar, but implies there may be some performance degradation moving from 10 to 13bit.

With both sensors you'll need to thoroughly understand their operation and test.