AltIMU-10 V5 and Serial sketch, values jump

Hello,
I really like the altIMU sensor, however I’m having a problem with extremely jumping acceleration values in all 3 axis when gently moving.
The general movement is displayed very well, but in between the values always jump down to very small values close to 0 and then up again to the correct value. I tried all different kind of sketches, and modifications, but can’t find a solution.

I’m using Arduino Uno and also ESP12 with the Serial sketch. I tried two different AltIMU-10, both have the same issue. I guess its not a hardware issue. The pictures show the jumping values from the Serial sketch in the serial plotter and serial port.

For easier analysis I am displaying only one acceleration axis. Does anyone have an idea why this happens and what adjustments I need to make? Thanks a lot in advance.

Hello.

I am sorry you are having issues with your AltIMUs. Can you verify a few things about your setups? You mentioned you are using both an Arduino Uno and an ESP12 board; do both of those microcontrollers produce this same behavior on both of your AltIMUs? Can you also confirm that this behavior occurs when running an unmodified version of our Serial sketch? Additionally, how are you supplying power to your AltIMU’s? Can you send pictures of your boards and their connections? Can you also share a link to a video that shows how the IMU’s are being moved?

-Jon

Hello Jon,

thank you for the quick reply.

Both boards (Uno and ESP12) produce the same behavior.

The behavior occurs also with the unmodified Serial sketch.

Powering of the AltIMUs:

  • Arduino Uno: 3.3V and 5V, both voltages produce the same behavior
  • ESP12: through a Pololu 3.3V Step-up/Down converter S9V11F3S5

Of the ESP12 setup I could not take pictures because it is already fitted tightly into a small case together with other components. However I added a drawing. In this setup all connections are soldered and wires are no longer than 5cm.

The Arduino Uno setup: wires no longer than 6 cm, soldiers to the AltIMU and plugged into the Uno board.

Thank you for your advice.

https://forum.pololu.com/uploads/default/original/2X/2/29cfc899219e5775ca645ef978fa95e9968501e5.mov

Can you post a sample of the data you get when the board is completely stationary (i.e. lying flat on a table)? Seeing a serial plot of that data would also be good. Additionally, can you post close-up pictures that show the connections between your AltIMU and the Arduino Uno?

-Jon

Hello Jon,

here are the pictures of the connections and the solderings. And a screenshot of the serial plotter with the AltIMU-10 flat on a surface 1) without moving and 2) without moving but not flat on a surface. Both are running the unmodified Serial sketch. I hope this helps.

From your video, it looks like there are wires spliced together on the I2C lines. Can you post close up pictures of the joints in the middle of your wire connections? Also, can you use a multimeter to check for continuity at all of your connections?

-Jon

I resoldered all connections and added photos of the connections. Still the same problem that values are given out, but always interrupted by infrequent huge jumps close to 0 (see video, not moving and not flat on even surface).
I also measured the continuity off all connections, they are good and not cross-connected. https://forum.pololu.com/uploads/default/original/2X/b/bef6532e3f653fddaa345726b697eb827a2ef47c.mov

I have found the reason for the problem!

Initially, in the library LSM6.h and LSM6.cpp I had changed all “uint” to “int” in order to make it work with the ESP8266.

I just reversed these settings back to original “uint” in both libraries and now it work smoothly on the Arduino Uno without the interruptions.

And making only one small change the original library LSM6.h it now also works on a ESP8266 for me. The only line of code where to change “uint” to “int” is marked blue in the picture.

Thank you, Jon, for your effort!

I’m sorry. It seems I made a mistake. I should have mentioned initially that I made changes to the library.

1 Like

I am glad you remembered about your library modification and solved the issue; thank you for following up and sharing!

-Jon