Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: IMU and RC receiver on Teensy 4.1 problem

  1. #1
    Junior Member
    Join Date
    Oct 2021

    IMU and RC receiver on Teensy 4.1 problem

    Hello all, in my project I have two IMUs (Adafruit BNO055 and Adafruit FXOS8700 + FXAS21002) and RC receiver (6 channels) connected to Teensy 4.1. This RC receiver produces PWM at 50hz which teensy is reading them through interrupts using attachInterrupt() function. Now, the way I have it setup is higher-level processor (say an Nvidia Jetson) can request IMU information by sending a string via USB to teensy, which teensy will run provided adafruit library functions to acquire IMU data and send it back to higher-level processor.

    The problem is occasionally, with seemingly no pattern, there would be an impossibly high read in IMU data such as acceleration of 1,000,000 m/s^2. This also occur for angular velocity as well. I believe the cause is the interrupts from RC receiver PWM would occasionally by chance happens in the middle of IMU reads function, which causes it to misread the data due to timing issue. This is because this problem seems to only happen when RC receiver is active.

    Do you think my assessment is correct? I have heard that Input Capture is a more efficient way to go about this, but I am not sure if it is true or it would even solve this problem. What should I do?

    Thank you for your help in advance.

  2. #2
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Santa Fe, NM
    Can you share code? It's really hard to help without seeing what's going on.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts