My accelerometers aren't calibrated.

Mateusz Kondej mateuszkj at gmail.com
Wed Nov 26 21:30:06 CET 2008


Wednesday 26 November 2008 12:55:26 Andy Green napisał(a):
> Somebody in the thread at some point said:
> | Mateusz Kondej wrote:
> |> Hi,
> |>
> |> I think that accelerometers in my FR aren't calibrated or driver 
doesn't
> |> work properly. For example, if I use script form
> |> http://wiki.openmoko.org/wiki/Accelerometer_data_retrieval, I got this
> |> data:
> |> X	Y	Z	SUM
> |> 54 -18 -1062 1063
> |> 54 -18 -1062 1063
> |> 36 -18 -1062 1062
> |> 54 -18 -1062 1063
> |> 54 -18 -1044 1045
> |> 36 -18 -1080 1080
> |> FR is laying on my table, screen to bottom. So it should return 
gravity,
> |> 981 cm/s^2. But It returns similar values but it's too big for me.
> |> How to get properly results from accelerometers? Eventualy How to
> |> calibrate them?
> |
> | I'm wondering, why the LIS302DL kernel driver returns 16bit values for
> | each axis. Because the sensor itself has only 8bit resolution for each
> | axis. The next question is if the returned values are normalized to
> | "g * 10^-2" or just upscaled raw values (which makes no sense). 
Because
> | 1g in 8bit would be ~64 if the sensor is set to +-2g range (which can 
be
> | changed to +-8g range within the sensor).
> | When the returned values are representing "cm/s^2" than you are right
> | that the z-value is a bit off.
> | But i can't find any related information about how to interpreted the
> | returned x/y/z axis values on the wiki page.
>
> It's in mG, the actual 8-bit values are worth 18mG each typically for
> that chip.  1000 is 1G then.
>
> So the "calibration" for the original poster is fairly decent allowing
> that 1 count is worth 18 and the sensor values change according to 
exact
> mounting detail of PCB to plastic, amount of solder paste under each
> side of it, how level his floor and table are, etc.  There's an extra
> ~80 on 1 full G because his single sample on that device is not exactly
> 18 but 17.9x, but we don't take care about it.
>
> -Andy

I forgot to additional results when FR is on the table, screen to top.
X  Y   Z     SUM
54 36 990 992
54 18 990 991
72 18 1008 1010
72 18 972 974
54 18 990 991
36 18 990 990
36 18 990 990

And for others axis result different values.

I also, when I was testing the sensors, I have made exemplars for 
calibration my accelerometers:

x = ( x - 52 )  / 1033;
y = ( y - 24 )  / 987;
z = ( z + 55 ) / 1025;

And results is close to phiical values ( for +1 G - 1 G and 0 G). I didn't 
test it for other values  ( for example + 2 G ) and I don't know how. How 
you think It' will return propely result for other values. 
Is it good way to fix this problem?

Kondej Mateusz




More information about the community mailing list