I'm using a BMX055 (connected to a STM32) but i'm a little bit lost with acceleration values read.
I think that my BMX is well configured (you can check the picture that i've attached) and i read these raw values :
acc_x = 4094
acc_y = 4092
acc_z = 250
are these values in two’s-complement format ? or can i directly convert these values into g (acc_x_g = 1g = 4094*8/32767 = acc_y_g and acc_z = 0.06g), it should be 0 g for x and y axis and 1g for z right ?
Also, i try to understand what is the bias accelorometer value but i'm not sure of what i've done : i've read 100 times the acc_x/y/z values then i get an average and i store the result into offset_xy/z registers. But the fact is these registers are only 8bit registers.
Are the offset_x/y/z register values atutomatically substracted from x/y/z data registers when we read them ?
Thanks for your help
Solved! Go to Solution.
BMX055 acceleration sensor only have 12 bits resolution. so your x and y value should be minus not plus. Here your conversion goes wrong because you take whole 16 bits as sensor read out. you can refer to datasheet page 50 and 51 about the definination of the acceleration data structure.
From the configuration, you select as 8G range for the accleration which means 1g = 256 LSB.
You can directly refer to the API for the sensor to avoid such kind of issue.
On page 30 of the BMX055 datasheet, the Figure 5 explain you how the offset register value works for the whole 12 bit accleration signal you read from sensor. And the value you write into the offset register will be added up into the sensor output and stored into the data register directly.