HOMEBREW My Lego UAV By Chris Anderson

I didn’t have my children to justify controller, gears, sensors, the R/C system, and a playing with Legos, but it certainly didn’t hurt. Yet after Mindstorms motor geared to move an entire rudder a while, we (OK, mostly I) wanted to do something with servo back and forth.

Lego that had never been done before. But what? When I started, there was no good way to read The answer came to me while out on a run, and it GPS data with Mindstorms. So I went with a proof combined three geeky things that were on my mind: of concept that used Hi Technic’s compass sensor, Lego, R/C airplanes, and gyro sensors. Suddenly and helped my then-9-year-old write a program that it came to me. Gyros are what you use for auto- would just tell the plane to fly a square pattern. So pilots. An R/C plane with an autopilot? That’s an far, so good. Fortunately there were several groups unmanned aerial vehicle (UAV), or drone. Bingo. working on the Bluetooth GPS problem on Mind-We were going to build the world’s first Lego UAV. storms. So we ported all the code from Mindstorms Hi Technic sent me a gyro sensor, and I got my NXT-G to RobotC, which turned out to be pretty easy. first dose of reality. The sensors use tiny “rate Today we have a fully functional Lego UAV. You gyros,” which don’t measure absolute position. To give it GPS waypoints, take it off manually, then get them to actually keep a plane flying straight and flick a switch on the R/C transmitter, and it flies level, you’d have to combine them with acceleration to the coordinates you’ve entered. That’s pretty sensors and do a ton of gnarly math to get around awesome, but we want more. So the next job will be inertial forces, drift, and other complications. to integrate an onboard cellphone that communicates Then came the second flash of insight. Keeping with the Mindstorms via Bluetooth. Cool, huh? a plane flying straight and true is a solved problem

— companies such as FMA Direct sell “co-pilots” Full story at makezine.com/12/homebrew. for around $100. So that just left navigation for the Lego. I found a plane (a Hobbico ElectriStar) that was big enough to hold the Lego Mindstorms

Photograph by Anne Anderson

Chris Anderson is the editor-in-chief of Wired magazine and runs a site on amateur UAVs at diydrones.com.

192 Make: Volume 12

References:

http://makezine.com/12/homebrew

http://diydrones.com

Archives