Hermione’s first flights

Hermione’s been out and about using the full X8; her first flight shot her into the air at hyper-speed due to a FIFO-overflow that the code didn’t catch.  With the code fixed and a replacement motor installed, I tried again.  After a couple of reasonable flights proving the X8 PIDs needed no tuning, they then started to fail for a couple of reasons:

  • FIFO overflows
  • I2C I/O errors

Both types were caught and killed the flights, but why were they happening?

  • The FIFO errors I think are due simply because I’m now pushing the limits of my A+’ performance; adding an exception to ensure the FIFO was processed as a priority when the FIFO fills over 50% has resolved that.  However…
  • The I2C I/O errors seem (after lots of testing) to be related to the Garmin LiDAR-Lite.  If it’s plugged in, regardless of whether I’m sampling it or not, I get the I2C I/O errors.  If it’s unplugged, all works perfectly.

I have various things to try out:

  1. It could be due to the extra power-draw when it’s plugged in.  Easy to test as I’ve just bought a huge 4S2P 6600mA LiPo:

    GensAce 4S2P 6600mAh LiPo

    GensAce 4S2P 6600mAh LiPo

  2. It could be confirmation of a rumour I’d heard up that the LiDAR-Lite V2 wasn’t good at sharing the I2C bus with anyone else – I hope the V3 doesn’t suffer from the same.
  3. It could be due to noise on the bus caused by the 20cm long cables.  I picked up some stuff from my PX4FLOW investigations about wiring requirements for long cables.
  4. Mentioned in the PX4FLOW docs, and also in the Garmin LiDAR Lite V3 instructions is the need for a decoupling capacitor between Vcc and ground.

If / when I can get the Garmin working together with the IMU, then it’s all systems go for sustained zero drift flights.

2 thoughts on “Hermione’s first flights

  1. I’ve had the same issue with a ADC1115 and even the official touchscreen display – I’d get timeouts and garbage data (random touches on screen). I manage to isolate 2 issues causing this: long i2c wires (~15cm in my case) were picking up noise and insufficient decoupling of a device (si6643 rf chip) on the 3v3 line. This was introducing a lot of noise in the i2c lines as they are pulled up to 3v3.

    The LiDAR draws power in pulses and I think it’s critical to add decoupling.

    • Thanks Jean, that backs up even more that the decoupling is absolutely necessary. My wires are 20cm. I’ve already placed the order for 680uF as specified by the Garmin spec, and they’ll be in tomorrow. Fingers crossed!

Leave a Reply

Your email address will not be published. Required fields are marked *