# Uniform values from different MEMS 3-axis accelerometers

I have to find a solution to uniform values on 3-axis accelerometers on different android devices. I mean, a device with a specific accelerometer, under the same acceleration, give me values for 3 axis that are different from the values of another device with different accelerometer. I need some kind of normalization.

I tried to calculate sensitivity for different accelerometers (reading values with smartphone under +1g and -1g and calculating half of the difference for each axis) and I thought calculate the difference of sensitivity between two accelerometers (supposing to take one of these as the target for my normalization) and sum or subtract it to each output value of each other accelerometer. Is it the right way??

What can I do otherwise? Is possible to solve my problem?

• Can you make use of the measurements of gravity while at rest? – hazzey Oct 14 '15 at 0:42

This is actually very easy to solve. I will state some assumptions, but even if these are not true you can still solve the problem with a slightly more complex solution.

Assumption 1: The smallest negative value and largest positive value on any axis will have approximately the same magnitude.

Assumption 2: The 3 axes on a single device are calibrated against each other such that the maximum absolute value on all three axes is around the same magnitude.

### Solution

When your app starts, start recording the maximum value ever seen on any axis. This would be something similar to normalizer = max(normalizer, abs(x), abs(y), abs(z)) on each new reading.

Then when using the readings, normalize them by dividing by the normalizer value. This will give you values between -1 and +1 on all devices, regardless of their native range.

Note: If assumption 2 is not correct, you will need to use separate normalizers for each axis. If assumption 1 is incorrect (highly unlikely) you would need separate normalizers for negative and positive readings.