BNO086 IMU ESP32 Thingplus C Project

I’m working a project to better learn IMUs and PID control theory. So far I have the (Sparkfun) BNO086 IMU interfaced to the (Sparkfun) ESP32 Thingplus C microcontroller (uC). The IMU is centered on a test fixture with 2, 7mm x 20mm brushed coreless motors (with props) spaced 5 inches apart. The bottom center of the test fixture is attached as a lever to allow for approximately +/- 20 degrees movement (y axis only) as controlled by the PID algorithm and motor controller algorithm executing in the uC. The uC is not attached to the test fixture yet; the uC is connected by about 5 in wires, attempting to not be too constraining with the test fixture movement. So far this runs stable/level and responds to various PID control variable values as I gain a better understanding of PID control theory.

I initially used the SF ESP32 Redboard IOT uC to get this test fixture running; this uC ran well also.

I enabled the IMU using the GameRotationVector report at 4 msec interval. Looking at the IMU processing time on a o’scope, I see a interval variance of approximately 2 milli secs to 4 milli secs. I’m still researching to see if I can accomplish the IMU running more consistently at 2ms.

If you’re using I2C to communicate with the IMU, the bus speed and potential contention can introduce delays. SPI is faster and less prone to communication jitter. It may provide more consistent timing. If you are not already using SPI, consider switching. SPI provides faster and more reliable communication. Studying the ESP32-C3 BNO086 Slime VR tracker project can help you. ESP32-C3 BNO086 Slime-VR tracker - Share Project - PCBWay

Thanks, I’ll check into these.