Skip to main content
Visitor II
March 10, 2021
Solved

L3GD20H wrong gyroscope readings

  • March 10, 2021
  • 6 replies
  • 1771 views

I'm using L3GD20H on a flight controller board for drones.

While conducting a temperature test that starts from -11°C and ends at 50°C, I observed a sharp rise/drop in gyro values at around 23°C. (The board stayed still the whole time inside a vibrating chamber.)

Can you give me any insight on why this happens or/and how to prevent it?

0693W000008wTuaQAE.png

0693W000008wTuVQAU.jpg

    This topic has been closed for replies.
    Best answer by Gabsu

    Hi @Ggfd.1​ @Eleon BORLINI​ ,

    Sorry I was away for some time.

    I solved this issue by re-flashing the firmware (in my case, ardupilot copter.)

    But I decided rather not to use the board, just in case.

    6 replies

    ST Employee
    March 11, 2021

    Hi @Gabsu​ ,

    that's a strange behavior indeed...

    Did you check if this behavior is repeatable and/or if it occurs on a single part or also on other ones?

    And is the conversion of raw data depending on the temperature, in your firmware code?

    As temporary workaround, since the effect of this sharp transition looks like to increase the zero rate level of the device, you could think to apply a high-pass filter to the dataout, as described in the datasheet p.19.

    -Eleon

    GabsuAuthor
    Visitor II
    March 12, 2021

    Hi @Eleon BORLINI​ 

    1) I have 20+ boards in my hands and yes, the behavior is repeatable on 2 - 3 boards, other boards are fine.

    ​2) I'm using an open source firmware called ArduCopter. The firmware I'm using is not modified on my end. I'll have to look into this.

    3) Thank you for your suggestion, I'll read the document.

    Please let me know if anything rings a bell. Thank you!

    ST Employee
    March 12, 2021

    Hi @Gabsu​ ,

    and do you see a repeatable failure just at 23°C on all the failing devices?

    Could you try to speed up or slow down the ramp (or to invert it), to check whether it is a temperature related failure or a "time-related" issue?

    I'm wondering if the custom firmware sets any temperature compensations centered around 25°C...

    I'm asking you so since I have no guess for a device failure so far, indeed...

    -Eleon

    GabsuAuthor
    Visitor II
    March 16, 2021

    Hi @Eleon BORLINI​ ,

    I double-checked and only 2 of my flight controller boards had the same issue.

    Also, it turned out that one of them was a fake chip posted on: https://community.st.com/s/question/0D53W00000cyCTnSAM/l3gd20h-fake-ic-issue

    Anyway, ​I ran another test with the genuine chip in an environment with a different rate in temperature change (picture on the left),

    And it also happened at 23°C.

    (The picture on the right is the result from my original post.)

    0693W000008wzCGQAY.png

    Also, I checked if this is a time-related issue. I left the board on for about 14 mins (left) and 2 hours (right) at room temperature and both didn't have the problem.

    0693W000008wzMBQAY.png

    And FYI, the result of the fake chip, where the issue happens at 28°C.

    0693W000008wz6mQAA.png

    So I'm still not sure what the problem is, the issue does not occur on the other duplicates with L3GD20H, with the same firmware.

    Maybe I'll try flashing the board and re-installing the firmware.

    It'd be great to know any ideas on methods to pinpoint why this behavior happens.

    Thanks.

    ST Employee
    March 17, 2021

    Hi @Gabsu​ ,

    First, thank you for the detailed reportage of the issue.

    Glad to hear that one of the two failing chips was a fake one.

    However, it's difficult for us to narrow down the issue, if it is not repeatable and is affecting only a single device (and not the other ones). Can you please confirm me that, when you initially start the device at 25°C ambient temperature, you don't see the issue? You could think to perform a self-test on that specific part, to check the goodness of the MEMS (you can find a sample code for the self-test here --> l3gd20h_self_test.c)

    >> Maybe I'll try flashing the board and re-installing the firmware.

    This is a good trial, please let me know if you'll make any progress.

    -Eleon

    June 17, 2021

    .

    ST Employee
    June 25, 2021

    Let's check whether @Gabsu​ did some progresses

    -Eleon

    GabsuAuthorAnswer
    Visitor II
    June 28, 2021

    Hi @Ggfd.1​ @Eleon BORLINI​ ,

    Sorry I was away for some time.

    I solved this issue by re-flashing the firmware (in my case, ardupilot copter.)

    But I decided rather not to use the board, just in case.