Electronics > Beginners
compass heading using MPU9250
<< < (2/2)
hussamaldean:
when I use the magnet, I get the maximum value of 5584.244140    and when I rotate the chip around the same axis, the sensor have same value and doesn't change at all
hussamaldean:
Hi all
I fixed the issue and I managed to get the heading correctly and the issue was the printed axis on the PCB was in correct and it was not helping me out
Mechatrommer:

--- Quote from: hussamaldean on August 11, 2018, 10:10:15 am ---I got these data

--- End quote ---
we got lego hi technic compass sensor here. and it has calibrate method and describes how to do it... during calibrate command, rotate the sensor a little bit more than 360 degree in 2 minutes times (i'm guessing the slowness is to avoid excess vibration that will make invalid reading during data collection). i'm guessing the sensor will collect data during the process and interpolate/compensate appropriate heading angle after that. you should do the same and provide again the data while its being rotated in full rotation.


--- Quote from: jeroen79 on August 11, 2018, 09:27:53 am ---I would find a pair of magnets to create a more controlled magnetic field.

--- End quote ---
if heading relative to earth is required, any man made / artificial magnetic field should be avoided. the calibration to earth pole should be conducted in any free artificial magnetic field influence. this given you are not located near north or south pole that doing calibration will give difficult result.

from the data we should be able to see the maximum (or minimum) magnitude reading when sensor in parallel to the magnetic field. ymmv.


--- Quote from: hussamaldean on August 11, 2018, 10:10:15 am ---I got these data

--- End quote ---
edit: and can you provide data with comma separated so anybody can help you analysis in excel easily by copy pasting? 2cnts.
hussamaldean:

--- Quote from: Mechatrommer on August 11, 2018, 11:39:09 am ---
--- Quote from: hussamaldean on August 11, 2018, 10:10:15 am ---I got these data

--- End quote ---
we got lego hi technic compass sensor here. and it has calibrate method and describes how to do it... during calibrate command, rotate the sensor a little bit more than 360 degree in 2 minutes times (i'm guessing the slowness is to avoid excess vibration that will make invalid reading during data collection). i'm guessing the sensor will collect data during the process and interpolate/compensate appropriate heading angle after that. you should do the same and provide again the data while its being rotated in full rotation.


--- Quote from: jeroen79 on August 11, 2018, 09:27:53 am ---I would find a pair of magnets to create a more controlled magnetic field.

--- End quote ---
if heading relative to earth is required, any man made / artificial magnetic field should be avoided. the calibration to earth pole should be conducted in any free artificial magnetic field influence. this given you are not located near north or south pole that doing calibration will give difficult result.

from the data we should be able to see the maximum (or minimum) magnitude reading when sensor in parallel to the magnetic field. ymmv.


--- Quote from: hussamaldean on August 11, 2018, 10:10:15 am ---I got these data

--- End quote ---
edit: and can you provide data with comma separated so anybody can help you analysis in excel easily by copy pasting? 2cnts.

--- End quote ---
no need
I figured out everything
thx for your help
jeroen79:

--- Quote from: Mechatrommer on August 11, 2018, 11:39:09 am ---
--- Quote from: jeroen79 on August 11, 2018, 09:27:53 am ---I would find a pair of magnets to create a more controlled magnetic field.

--- End quote ---
if heading relative to earth is required, any man made / artificial magnetic field should be avoided. the calibration to earth pole should be conducted in any free artificial magnetic field influence. this given you are not located near north or south pole that doing calibration will give difficult result.

--- End quote ---
I meant it for use on the bench when testing the sensor.
When using it in the application any magnrtic disturbances must indeed be minimised.
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod