A dodgy sensor? Nope, a dodgy coder!

The dual power source isolating the Raspberry Pi from the LiPo / ESC / motors works well.  Test flights showed zero missed sensor readings.

What they did show, and what I’d suspected for a while, was that the Y-axis accelerometer is sluggish / broken.  My suspicion something was wrong originates from the fact Phoebe always drifts right, and has done so for quite a while.  But I didn’t bother trying to confirm the problem because replacing the sensor would mean redoing the calibration, and I didn’t have a beer fridge then!

The nearest thing to proof though appeared in today’s flight diagnostics:

Stuck accelerometer?

Stuck accelerometer?

This shows the distribution of gravity across the sensors as Phoebe pitches and rolls in flight.  The quad-frame raw gravity vector Y axis (qfrgv_y) doesn’t change throughout, as though someone dropped superglue on it!

I have a spare sensor, so now I’m back to doing dynamic calibration of the accelerometer, it’s just a quick swap and a test flight tomorrow to see the change.

P.S. Or of course, it could be due to a typo in my code, d’oh.  Only went hunting carefully after swapping the sensors and still seeing the same flat-line on the accelerometer y-axis.  A down-side of python is not having to explicitly declare variables as long as they are set prior to being read.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.