Hi All,
I’ve been working on project where I want to log imu / gyro data to determine motions (pitch, roll, and yaw) and accelerations to compare against speed. I have had repeated OLA failures and I am at a loss to understand why.
Process/ sequence as follows:
Components:
- SparkFun OpenLog Artemis (OLA DEV-16832) *
- Ublox Zed F9P *
- Sparkfun Micro Oled
- Sparkfun qwiic I2C MUX
*donates initial setup, other components added later with AI code input
My first attempt used the initial setup only. All raw data was logged on SD card and post processed to obtain the required variables. I discovered an issue with “drift” and the quality of data was quite noisy which made post processing difficult.
My research suggested I use a Mahony filter and proceeded with this in mind. My programming skills are limited and have heavily relied on AI (I have used multiple sources to cross check output).
When I upload the code (through IDE 2.3.6) I experience an ola failure immediately. This has just happened for the 4th time.
After the failure the following is noted:
- board showed no serial activity, no LED indicators, and did not enumerate consistently over USB.
- Even with minimal code and no peripherals attached, there was no sign of successful boot or communication.
- The ZED F9P is still functional when connected to my laptop.
Hardware Replacements
I have replaced/considered the following components as my research suggests the code is not responsible (not convinced but relying on AI here unfortunately).
- USB cable for data transfer
- All quiic cables
- MicroOLED
- Added a powered USB Hub for data transfer
- Sparkfun OLA x 4
Below is an output from AI that summarizes the code. I have attached the code for reference.
github boat test.txt (7.4 KB)
Primary Targe Functions of Code:
- Collect and log synchronized IMU + GNSS data at 10 Hz
- Fuse accelerometer, gyro, and magnetometer data using the Mahony filter to compute pitch, roll, and yaw
- Display real-time orientation and speed on an OLED screen
- Log buffered sensor data to SD once per second in CSV format
- Safeguard board with watchdog-triggered soft reset and LED alert
Peripheral Interfaces (via TCA9548A I2C mux):
- Channel 0 → ICM-20948 IMU (accel, gyro, mag)
- Channel 1 → MicroOLED display
- Channel 2 → u-blox GNSS module (e.g. ZED-F9P)
Key Libraries Used:
ICM_20948.h
→ IMU data acquisition (accel, gyro, mag)Adafruit_AHRS.h
→ Mahony filter for orientation estimationSFE_MicroOLED.h
→ OLED screen outputSparkFun_u-blox_GNSS_Arduino_Library.h
→ GPS data (lat/lon/speed/heading)SdFat.h
→ High-speed SD file writingWire.h
→ I2C communication and mux control
Core Features:
- 10 Hz loop collects sensor data, buffers in
SensorData[10]
struct - OLED displays live pitch, roll, yaw, and max speed
- SD card logs buffered data every 1 second in CSV format
- Soft watchdog resets board after 5 seconds of IMU inactivity
- LED on pin 19 blinks 5× to signal watchdog resets
Any suggestions on what to try or modify would be greatly appreciated.
Thanks!