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 Industriesand 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.
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.
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;
WiFi + ROS: The Robot Operating System(ROS) is awesome. You can use a ROS node to visualize the flight mode and control the drone. If you want to go this route, check out this video;
Traditional RC: Alternatively, you could buy an RC controller with a PPMSUM-enabled receiver and attach it to the autopilot (to the PPM-SUM input channel);
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.