FXOS8700 Magnetometer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FXOS8700 Magnetometer

2,121件の閲覧回数
michaelchapman
Contributor I

Hi, I'm using the NXP FXOS8700 and a FXAS21002C on a Adafruit breakout board that uses I2C comms. Each device can be configured and the status read using single and multi-byte transfers as shown in the attached document. However the magnetometer gives an output that seems odd that is to say it doesn't make sense to me.

I have tried degaussing the sensors too try and get rid of any residual magnetic field. One of my boards has a massive offset.

I was expecting the magnetic sensor to give and out similar to the accelerometer, i.e. the output when pointing:

  1. towards magnetic north would be +ve
  2. in the opposite direct (point south) would be -ve and approximately 60uT
タグ(2)
0 件の賞賛
返信
2 返答(返信)

1,568件の閲覧回数
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Michael,

Yes, the magnetometer requires calibrating not only for its own offset but usually also against spurious magnetic fields resulting from any nearby ferromagnetic components on the PCB. The AN4246 discusses it in more detail. 

A simple software calibration of magnetic hard-iron offset is to rotate the board in a figure of eight twisting motions for a few seconds, record the minimum and maximum magnetometer readings, and compute the hard-iron calibration from their average. Have a look at my simple example code where I illustrate it.

Hope it helps.

Best regards,

Tomas

0 件の賞賛
返信

1,568件の閲覧回数
michaelchapman
Contributor I

Thanks Tomas I will try the calibration process that I’ll adapt from your code.

I think the way the magnetic sensor is a mystery to me!

Regards

Mike

MJ Chapman

Tel: 01483 504136

Mob: 07768 585894

Email: <mailto:mjachapman@subcraft.co.uk> mjachapman@subcraft.co.uk

0 件の賞賛
返信