cancel
Showing results for 
Search instead for 
Did you mean: 

Min (always zero) value from LSM9DS1 magnetometer looks suspicious.

Rstua.1
Senior

I have 2 LSM9DS1 9 axis chips and after waving them around I have the following min / max magnetometer values:

chip1:

X max/min: 657/-396

Y max/min: 598/-417

Z max/min: 377/-654

chip2:

X max/min: 533 -515

Y max/min: 788/-284

Z max/min: 0/-1213

...that last Z max/min on chip2 looks bad. How does it look to others? Are these chips (roughly) calibrated at the factory? Is there a setting inside the chip that can fix this - if it is a problem?

-thanks

2 REPLIES 2
Rstua.1
Senior

Oh, just had a thought! What if chip 2's Z magnetometer was never larger than zero? I bet my code doesn't account for a negative "max" value. But still, isn't that really far off from what these LSMDS1 magnetometer chips should be reporting for a maximum?

Rstua.1
Senior

So, I am looking for very low or negative maximum values from the Z axis magnetometer for my chip 2 (an STMicro LSM9DS1) and got the following average maximum: (-203.667) and the following average minimum: (-1182.67). If I plug in those values into my code I start to get compass bearings that make sense even when tilted. So, yes, the magnetometer appears to be working as expected.

Question is, is it normal to have a LSM9DS1 part out of the factory that never creates a positive magnetometer reading? No matter what position it is aligned in in the earth's magnetic field?

-thanks