Constant Magnetometer Z reading on LSM9DS0 (Flora)

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
plasticrake
 
Posts: 10
Joined: Mon May 12, 2014 12:11 am

Constant Magnetometer Z reading on LSM9DS0 (Flora)

Post by plasticrake »

With the LSM9DS0 on a relatively flat surface here are readings I am getting:

Code: Select all

Accel X: -0.05   	Y: -0.17   	Z: 1.00  	m/s^2
Magn. X: -0.60   	Y: 0.52   	Z: -2.62  	gauss
Gyro  X: 0.68   	Y: -0.31   	Z: -6.37  	dps
Temp: 87.00 *C
**********************

Accel X: -0.03   	Y: -0.18   	Z: 0.97  	m/s^2
Magn. X: -0.60   	Y: 0.52   	Z: -2.62  	gauss
Gyro  X: 0.47   	Y: -0.37   	Z: -6.27  	dps
Temp: 87.00 *C
**********************

Accel X: -0.03   	Y: -0.16   	Z: 1.04  	m/s^2
Magn. X: -0.60   	Y: 0.52   	Z: -2.62  	gauss
Gyro  X: 0.32   	Y: -0.68   	Z: -6.06  	dps
Temp: 86.00 *C
**********************

Accel X: -0.05   	Y: -0.18   	Z: 0.97  	m/s^2
Magn. X: -0.60   	Y: 0.52   	Z: -2.62  	gauss
Gyro  X: 0.46   	Y: -0.81   	Z: -6.48  	dps
Temp: 85.00 *C
**********************

Accel X: -0.04   	Y: -0.18   	Z: 0.99  	m/s^2
Magn. X: -0.60   	Y: 0.52   	Z: -2.62  	gauss
Gyro  X: 0.64   	Y: -0.69   	Z: -6.16  	dps
Temp: 87.00 *C
**********************

The thing that sticks out the most is the constant -2.62 Z value. I see this regardless of the orientation or motion of the sensor. The other values seem a bit jumpy as well. Can anybody shed some light on this?

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Constant Magnetometer Z reading on LSM9DS0 (Flora)

Post by adafruit_support_bill »

Some z-axis component is normal due to inclination of the magnetic field. But that seems a bit high. What do you get if you rotate the sensor so that it is 90 degres from the surface of the table?

User avatar
plasticrake
 
Posts: 10
Joined: Mon May 12, 2014 12:11 am

Re: Constant Magnetometer Z reading on LSM9DS0 (Flora)

Post by plasticrake »

Like I said, it stays the same regardless of the orientation. If I change the sensitivity it scales up as well. So for lsm.setupMag(lsm.LSM9DS0_MAGGAIN_12GAUSS); I always get -15.73.

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: Constant Magnetometer Z reading on LSM9DS0 (Flora)

Post by Franklin97355 »

None of the mag values seem to be changing. Could you post your code and a description or drawing of your connections between it all? Please use the code button "</>" or

Code: Select all

 tags when posting code to the forums. And could you post clear pictures of your board and the connections to it?

User avatar
plasticrake
 
Posts: 10
Joined: Mon May 12, 2014 12:11 am

Re: Constant Magnetometer Z reading on LSM9DS0 (Flora)

Post by plasticrake »

I posted the output keeping it still. If I move the sensor the X and Y mag values do change, just not the Z.

The code is the sensorapi example from the Adafruit LSM9DS0 library loaded on a flora.

The connections are soldered then covered with hot glue to help with strain.
IMG_4953.jpg
IMG_4953.jpg (617.37 KiB) Viewed 304 times

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Constant Magnetometer Z reading on LSM9DS0 (Flora)

Post by adafruit_support_bill »

If I move the sensor the X and Y mag values do change, just not the Z.
Definitely not right. Please contact [email protected] with a link to this thread for a replacement.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”