I am having issues with my Barometer on the NAVIO2 board on a Raspberry Pi 4B, which is preventing APM from running. It should be noted that my setup was flying perfectly until just today. Testing the “Barometer.py” script from the NAVIO2 repo is showing -200 degrees C and negative millibars (and wildly fluctuating at that). I tried AC-4.0.3, 3.5.5 and 3.6.9 and all showed the barometer issue persisting.
When trying to start ArduCopter, the following error appears (on ArduCopter-4.0.3)
And on (AC-3.5.5)
Running the following
journalctl -u ardupilot
systemd: Stopped ArduPilot for Linux. systemd: Started ArduPilot for Linux. sh: Could not detect RPi version, defaulting to 2/3 sh: PANIC: AP_Baro::read unsuccessful for more than 500ms in AP_Baro::calibrate  sh: MS5611 found on bus 1 address 0x77 sh: free(): double free detected in tcache 2 sh: Aborted systemd: ardupilot.service: Main process exited, code=exited, status=134/n/a systemd: ardupilot.service: Failed with result 'exit-code'. systemd: ardupilot.service: Service RestartSec=100ms expired, scheduling restart. systemd: ardupilot.service: Scheduled restart job, restart counter is at 2. systemd: Stopped ArduPilot for Linux.
and ArduPilot wasn’t even starting upon boot (systemctl status ardupilot showed “failed”). Now it shows “running” but the barometer calibration issue persists and I cannot connect to a GCS).
The device is clearly visible on the I2C bus with “ic2detect -y 1”
I’ve tried adjusting the I2C baudrate from 100KHz, to 400KHz and the standard 1MHz on the RPi4b, but the crazy temperature and pressures keep being reported from the “Barometer.py” script. I’m running with the Buster OS on a quadcopter.
I’m not sure if this is related, but the barometer seemed to go to hell when I plugged in the PX4FLOW module onto the I2C bus and started playing with the I2C baudrate to get the OF module working.
Also, the barometer was covered with microphone style foam with no adhesive near the sensor.
This board has been working quite well up to this point.
- Is there any reason to think that this barometer can be saved?
- Is there anything that can be done to make this board usable if the barometer is now faulty? I would hate for this to be trashed because of a now (likely) faulty barometer. Wondering if it would be worth it/possible to attach an external barometer on the I2C bus and modify the firmware.
- What could have caused the barometer to go haywire? Could it have been modifying the baudrate or overcrowding on the I2C bus (Compass, PX4FLOW and Barometer)? Could it have been changing the ArduCopter firmware many times in a 5 minute span (was testing to see how PX4FLOW would react to the different versions).
I would really appreciate any advice/wisdom thrown my way here Let me know if I can supply any other information which would be helpful in this diagnosis.