Quick note: This project uses components from Erle Robotics. I'm not affiliated with the company or its founders, but I do dig their work and open-source ethos. If the scene interests you, a couple other suppliers of robotics components for Raspberry Pi-based projects are Dexter Industries and PiBOT. I'll be bringing you more tutorials from across the makerverse down the line.
Part of the fun of robotics in 2016 is that it can serve as a relatively low-cost hobby, one that tests and enhances your hardware and coding chops. That's largely due to the Raspberry Pi and other cheap micro controllers, to hundreds of components and shields available for custom hacks, and, of course, to an open source community that supports sharing information and advice.
Erle Robotics, which I mentioned in last week's piece about the increasingly important role of Linux in robotics, supplies cheap components for DIY Raspberry Pi projects. I got in touch with the makers at Erle this week to come up with a great tutorial for our readers.
Introducing the $200 DIY smart drone. The project comes courtesy of Victor Mayoral Vilches, a roboticist from Spain, and edited versions of his instructions are included here with permission.
Components
Erle Robotics PXFmini compatible power module
Debian-based Linux file system for drones
The Pi0drone and its components
Step 1: Assemble the drone kit
Time: ~30 minutes
Once you get all the components start by assembling them. This is where the fun of DIY hardware comes in. Use the picture above for reference.
Step 2: Ready the autopilot
Time: ~30 minutes
Connect the PXFmini shield on top of the Raspberry Pi Zero. Use this image for orientation reference:
You're almost done but you still need to get the right software on the Raspberry Pi Zero+PXFmini set. This should include the flight stack, an appropriate kernel, enabled daemons that auto-launch on boot, and additional goodies.
If you purchase the PXFmini from Erle Robotics you get access to their Debian images, so you can just fetch a PXFmini compatible Debian image and flash it into a microSD card.
Step 3: Mount the autopilot
Time: ~5 minutes
PXFmini mounted on top of the Raspberry Pi Zero assembled in the drone
Mounting the autopilot (Raspberry Pi Zero + PXFmini) in the drone can be done a few ways. Pick yours and connect the JST GH cable from the power module to the PXFmini. This will to power the autopilot when the battery gets connected.
Next you'll need to mount the PWM channels in the autopilot. Get your ESC cables and connect ESC 1 (corresponding with motor 1) to PWM channel 1, ESC 2 to PWM 2 and so on.
Step 4: Mount the propellers and get it flying!
Time: ~15 minutes
Two of the propellers turn clockwise (marked with an "R") and two turn counter-clockwise. Place the clockwise propellers on motor 3 and 4 and the counter-clockwise propellers on motors 1 and 2. This is a pretty important step to get right.
Now you'll need to decide how to control your drone. You've got some options.
• WiFi + gamepad: Have the autopilot create its own WiFi network with a USB dongle (Erle Robotics images support this by default) and use a common gamepath to control the drone through a Ground Control Station;
And that's it! Here's a video of the drone in action using the traditional RC method.
Questions on the tutorial? Leave 'em in the comments.