Go Down

Topic: Why is the angle between vector from accelerometer and compass not constant? (Read 2969 times) previous topic - next topic

username1092

Quote
Have you done compensation? MEMS magnetometers out of the box are not usable, they must be
calibrated in-situ.
By that, do you mean "tilt" compensation or the sensor calibration.
I haven't done anything to the sensor values and am just reading the raw sensor data.

 I was under the impression that tilt compensation was not needed for a 3 axis compass as all three axis can detect magnetic field.

But, I guess calibrating the sensor might improve my results. Maybe the three axis are not equally sensitive to the magnetic field or maybe they have different offsets. I will try that soon. 

Quote
So use mathematical simulations through matlab or something.... to ensure your method works in simulated scenarios.
I have never done this before and have no idea where to start. Any simple guides that you know off? I found something called openrave which I can use with python and octave and has sensor modules. I could use that I guess?

Thanks.

Southpark

By that, do you mean "tilt" compensation or the sensor calibration.
I haven't done anything to the sensor values and am just reading the raw sensor data.
The important question is ..... have you done sensor calibration of any kind? Looks like you're saying that you are just reading raw values from the sensor, hence uncalibrated - which suggests you haven't done any sensor calibration. Sensor calibration is absolutely necessary for these kinds of devices.

But, I guess calibrating the sensor might improve my results.
Calibration is totally necessary.

I have never done this before and have no idea where to start. Any simple guides that you know off? I found something called openrave which I can use with python and octave and has sensor modules. I could use that I guess?
You can use such software you mentioned - as long as you can conveniently use it to model your system (or the mathematics of your system). So, for the coordinate system you use, you could choose two vectors in the system. And you can know in advance what the angle is between those vectors. Then pretend that the data associated with those two vectors are 'measured', and then use that data as input to your software....then see if your software is able to calculate the correct (expected) angle between those two vectors. It's using computers and software to make sure that your maths processing is correct.

Importantly, the MPU devices generally cannot be used straight away. They need to be calibrated. So if you haven't calibrated, then that could be part of the reason for your computations not making sense. Part of the reason. Also, just follow the usual procedure of using devices - any device that you aren't familiar with..... which is - read up on it....read the manual and as much information about it as you can. Don't assume things. What's happening here is that you appear to be assuming something (such as incorrectly assuming you can use raw uncalibrated sensor data for measurements of angles).

MarkT

If you haven't calibrated the magnetometer it will be way out - you always have to calibrate
MEMS magnetometers to get anything vaguely like sensible readings.

And never expose them to strong magnetic fields, you'll permanently magnetize the pole
pieces in the sensor.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

jremington

The best procedure for calibrating magnetometers (absolutely essential) is http://sailboatinstruments.blogspot.com.au/2011/08/improved-magnetometer-calibration.html

Works for accelerometers too, if the sensor is held still for each data point.

Let us know if you have questions after going through the material.

Go Up