It can even be useful for things such as “first-person
view” flying, where you use video goggles and an
onboard video camera and transmitter to simulate
the experience of being in the plane while it’s flying,
something that can be so disorienting that an autopilot is often required to make it home safely.
B From Lego to Arduino My own autopilot obsession started as something to do with the kids that was fun both for them and for me. We had a Lego Mindstorms NXT robotics kit and someone had given us an R/C plane. After quickly realizing that that we were never going to be expert at either (and not seeing much point in just doing stuff that others had already done), I got the idea of combining them. Thus, the world’s first Lego UAV, which was written up in MAKE, Volume 12. My next UAV was built on the observation that almost everything you need for an autopilot system is already in a good smart phone: computer, GPS, 2-way wireless data, a camera, and even a 3-axis accelerometer. Just strap it to the bottom of a plane with a serial interface to the R/C system, and the
plane now has a phone number, allowing it to send
images and receive instructions in flight. We turned
the autopilot into a free software app for Windows
Mobile phones, which worked well enough as a
proof of concept but was too hard to maintain as
Next I turned to embedded processors, starting
with the venerable BASIC Stamp. This proved educational, and although I created a barely functioning
autopilot, it mostly illuminated the limitations of the
BASIC Stamp board (no floating point math!).
At this point Jordi Muñoz, a fellow UAV hobbyist,
suggested the then-new open source Arduino platform. It was much more powerful than the BASIC
Stamp, but even easier to use, thanks to the Arduino
IDE and excellent libraries created by the community. And unlike BASIC Stamp, it was open source
hardware as well as software, which meant we could
design our own custom board based on the Arduino
reference design. A few months later, in late 2008,
ArduPilot was born as a working prototype.
Creating an Autopilot Board
ArduPilot’s hardware design started with the standard Arduino schematic (see arduino.cc), which we
modified to add autopilot-specific features.
The first change was the easiest: we added a
connector for a GPS module (we chose the EM-406,
which is based on the excellent SiRF Star III chipset,
which we knew well and had found to be rock-solid),
and wired it up to the Arduino serial-in line.
Then we added the ability to interface with R/C
equipment. Arduino has the built-in ability to read
and write pulse-width modulation (PWM) signals,
the standard used to control servos in R/C gear, on
its digital pins. But we wanted to do more than just
add standard 3-pin servo connectors to the board.
Instead, we felt that the ability to regain manual
control at any time in case of autopilot failure was
so important that we should create a special circuit
that did it in hardware, rather than trusting software
(which could crash) to do it.
Some people choose to handle the fail-safe
function in software, using interrupts to check to
see if the autopilot code is still running properly
and switching to manual control if not. For closed
source projects, where you can rigorously test and
control the code, this may be a good solution. But
for our open source project, where we didn’t know
what people would be doing with our code and what
sort of bugs they might introduce, we thought it was
safer to make this a standalone circuit.
Our fail-safe circuit consists of 2 elements: a
multiplexer chip that switches outputs between
Fig. A: Jordi Muñoz (left) and Chris Anderson (right)
have developed a kit to turn ordinary remote control
planes into autonomous flying drones. Fig. B: Muñoz
prepares to launch an autonomous drone.