Raspberry Fly

A Raspberry Pi based autonomous aerial drone


As with any good software testing is important and perhaps even more so because of the potential dangers associated with drones. How the testing is done is up to you, but it should be very thorough. Make sure every bit of software is working as expected before putting it all together and powering up the motors. My development and testing sequence has been:


  1. Flight instrument software
  2. Basic control loop with instrument readout (no motors)
  3. Pulse-width modulation using an oscilloscope and then a firmly secured motor with no propeller attached.
  4. PID controllers for pitch and roll. Testing resulted in one accident (ouch) and then I built a make shift testing rig as can be seen in the video below. It is nowhere stable enough and if the drone flips the wires will get caught in the rotor blades, so when you do built a testing rig make it better than mine!
  5. PID tuning (ongoing)


When I'm satisfied with the PID tuning I will add PID's for yaw and altitude control. When tested for stability I will attempt a simple but automatic takeoff, hover and landing.


As for PID tuning strategy I am (very) far from being an expert, but will make updates as I gain more experience.


Test results


  • Instrument tests have been successful and all instruments now return correct values when tested as far through their range as possible.
  • External PWM-driver was tested and calibrated with an oscilloscope. Pulse-widths are as expected.
  • 12V -> 5V conversion for the Raspberry Pi is too noisy. Todo: Try smoothing out the noice with capacitors.
  • Stability test has been conducted during PID tuning. Video can be seen here. Motor speeds where below takeoff with a solid margin which is why the Raspberry Fly has a bit of problems overcoming the drag between broomstick and chair the second time it is pushed (broomstick and chair? Oh yeah, high tech testing indeed!)


Drones are fun but can be dangerous. Use any information on these pages at your own risk