Maker Pro
Maker Pro

HMC5883L compass module - Y/Z movement affects each other

Liran

Dec 9, 2017
4
Joined
Dec 9, 2017
Messages
4
I'm using HMC5883L compass module with arduino. There is a strange issue with the readings from this module - for some reason, the Z and Y axis are both affected from only Z axis movement or Y axis movement.

I need the readings to be correct per axis movement.

Y = tilting nose up/down
Z = turning left/right (compass)

I tried several libraries, the last two from these links:
https://github.com/sleemanj/HMC5883L_Simple
https://github.com/jarzebski/Arduino-HMC5883L

the module:
https://www.ebay.com/itm/GY-273-HMC...896943&hash=item5d37766e10:g:7PwAAOSwYvFZL5aC
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Did you examine the datasheet for the HMC5883L to determine what its maximum cross-axis sensitivity is, and whether that meets your requirements? It is rated ±0.2%FS/gauss, which seems reasonable to me for compass applications. What are you using this for? What do you expect from a transducer instrumentation package that sells for less than ten bux? Perhaps you should consider a precision flux-gate transducer with magnetic shielding to prevent cross-axis interference.
 

Liran

Dec 9, 2017
4
Joined
Dec 9, 2017
Messages
4
the sensitivity is good - i don't need perfect cross axis one. actually - i only need the compass readings, but it must only be affected by the turn of the module - not by tilting forward/back or left/right. currently, tilting (even snall ones) affects the compass readings.
 
Last edited:
Top