Like the best rock stars…

cool, but unstable! Here’s what the drone looks like now:

Drone photo

Drone Pi

Upgrades include new blades (lightweight, stiff carbon), new motors (higher power, lower weight), and new back legs (black). I’ve also swapped the RPi model B for a model A in my PiBow variant case showing in a previous blog entry.

Why? The model A swap was for using less battery power and lowering the total weight and the centre of gravity; the motors for increased spin power for the same battery power usage and lowering weight; the blades for lower weight and greater lift; and the legs cos they’re cool!

Even though it’s still not stable, things are getting better – primarily due to fixing a couple of bugs in the code when changing from take-off to hover mode, but also because of setting PID gains. My starting point was here, and this article does a great job of explaining how the PID works.

I’d recommend watching his video.

I screen captured the PID diagram as it’s so helpful showing the quadcopter double tier PID control that allows stability to be controlled directly from the gyros by the inner PID, and the attitude (stable angle of lean in any direction) to be controlled from an operator (me) to be controlled by the outer PID. Certainly, the lack of low pass filter for the gyro feedback is something I’ll be investigating, although the MPU6050 does have one built in. If that doesn’t work, it’s fast fourier transforms (FFT) all the way!

PID design

PID design

P.S. You ain’t seen nothing yet!

5 thoughts on “Like the best rock stars…

  1. Nice! I’m not sure if you have mentioned it, but how are you handling the PWM for all four motors?
    Can I also asked what and how you power both Pi and the motors?
    BTW: any video of your test flights?

    • PWM is from an Adafruit PWM breakout board they sell for use with servos , but equally usable for motors. Pi and Motors are driven by the same 12v LiPo battery – the Pi’s is regulated (switched for efficiency) to 5V – this is on the breadboard, and then the GPIO pin 2 takes it to the Rpi via the Adafruit breakout ribbon cable.

      Sorry, no videos yet of test flights as I can’t let the thing loose – it’s still too unstable, and I’m still working out why. It’s either physical vibrations from the motors or PSU noise. I’m investigating both at the mo. Fingers crossed!

    • Hi Mark,

      It’s just dawned on me that actually your question about powering both the Pi and the motors is possibly the key to all the noise my gyros are seeing. The motors are bound to be producing sh1t-loads of electrical noise, and all that’s separating them from the Pi is a switched regulator. I have a funny feeling I’ll be swapping it for a DC-DC converter (which offers isolation plus noise filtering).

      Thanks for asking the question!

  2. Pingback: DronePi gets a makeover with a #RaspberryPi model A | Raspberry PiPod

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.