cancel
Showing results for 
Search instead for 
Did you mean: 

Why is the LSM9DS1 magnetometer X and Y sensitive to mechanical stress?

Henry Robinson
Associate II

Hi,

we're using the LSM9DS1 as the basis for a compass. We have found that the magnetometer X and Y axes seem to show a huge sensitivity to mechanical stress. if you apply a slight bending stress (just with your fingers, nothing special!) to the pcb, the mag values show huge changes. We've done the tests on the STEVAL-MKII59VI pcb. Conditions - SPI bus, reading mag at 80 Hz when Mag DRDY asserts. The rest of the device seems Ok, and when unstressed we can use it pretty well as a compass and attitude sensor. But this mag-stress issue is a huge problem.

Has anyone else seen this problem?

7 REPLIES 7
Eleon BORLINI
ST Employee

Hi @Henry Robinson​ , are you able to exclude external effects due to the environment? Does the magnetometer of the LSM9DS1 restore to a correct value after the bending, or does it show a permanent magnetization? And how big is this unwanted effect (can you share data)? Regards

Henry Robinson
Associate II

Hi

yes, I have excluded external environmental effects. I can apply the stress by means of my fingers which are nonmagnetic. No effect is seen until force is applied. The overall orientation of the pcb does not move visibly. The effect is very substantial, i.e. the stress applied with finger pressure produces a signal change of the same order of magnitude as the geomagnetic field. So when used as a compass, you can see apparent turn of 90 degrees or so! When the stress is removed, the value go back to the original values. The effects on the x and y magnetometers are similar to each other; the z axis shows no visible effect.

As for sharing data, happy to share my data with the community so I attach a bundle of files - time series csv, also as a .mat file; image showing the graphs of mag field from my compass app; also a register dump, and pictures of the ST eval board.

Henry

Henry Robinson
Associate II

Well, it seems that ST are unable to resolve this problem! I have a support case open on this issue and so far, after several weeks, no solution has been offered.

The only way to use these reliably is to ensure that they are mounted stress-free, e.g. on a very thin flexible pcb. Or not to care about the compass pointing accurately!

Hi @Henry Robinson​ , sorry for the late answer. The fact it is not a permanent deformation/magnetization can point to an induced external magnetic field due to the pcb deformation: the current flowing in your pcs could induce this magnetic field variation. The compass measures the static field, so if you build your compass and you have to bend your pcb during this process, you can directly compensate this offset effect on the sensor memory, properly setting the OFFSET_X_REG_L_M (05h)...OFFSET_Z_REG_H_M (0Ah) registers. In ST reference designs the compensation of the magnetometer mis-calibration (hard iron and soft iron compensations) are managed by proper algorithms and allows the compass to be accurate (example). Regards

Henry Robinson
Associate II

Eleon, thank you. But your answer does not account for the observations.

There is no significant current flowing in the pcb. I have tested using three different boards, including the ST eval board, which has nothing on it apart from the LSM9DS1 itself. It takes about 4mA. The current consumption does not appear to change when the pcb is stressed - not as far as I have been able to measure. Even if it does, any such change would be within the IC, because that's the only device on the board. (Note also that a current of 4mA would need to be less than 4 microns away from the sensor, to produce a magnetic field equivalent to the observed change. But we're seeing a CHANGE in the field when stress is applied, and as the supply current does not appear to change significantly when the board is stressed, we'd be talking about a very subtle change in the current flowing in a track or wire which would have to be within a few nanometres of the sensor element. That's not plausible: and even if it were, it puts the problem squarely in the domain of the device design!).

Yes, I know about calibration and taking out offsets. We've been doing this for some years. Our calibration procedures measure the hardiron, softiron, and the misalignments between the axes (the sensors are not perfectly aligned to each other, and neither are the respective XYZ axes perfectly orthogonal!). But this problem is not about taking out permanent offsets.

We are left with a fundamental, inescapable fact. When the pcb is mechanically stressed, the magnetic field measurement changes, very significantly. Your answer is interesting but does not address this.

I repeat my earlier question: have you run this test yourself?

I'm not able to understand how a constant offset should impact your application if your target is building a compass. You can just compensate it after you have the compass built. When you use a compass you don't need to bend the device. Regards

Henry Robinson
Associate II

Eleon

We are not bending it massively. Just mounting the pcb on a stack. When you secure the mounting pillars, all it takes is for the mounting pillar heights to vary by a few microns and that puts enough stress on the board to change the offsets very significantly. Then the client buys the board and mounts it into his electronics - then the compass needs recalibrating again. Full 3D calibration is done on the pcb before mounting in a system that is often too large and unwieldy to do a full 3D cal. Then the client is operating this in a vehicle in real world conditions - temperature changes. As we all know, things expand, contract, distort when the temperature changes. In a bimetal strip, the effect is rendered very visible: that same effect is present everywhere, albeit to a lesser extent. It is enough to alter the compass output.

So it's not a "constant" offset. It changes when the stress changes. It changes on a hot day. It changes when you launch an AUV into a chilly ocean. This is the real world!

The problem remains. I stringly suggest you test it for yourself, you will see how sensitive it is. we need our compass to be as accurate as possible. of the order of 1 degree is possible using other sensors. Do the calcs, you will see how gentle the stress changes have to be, to achieve this with the LSM9DS1!