AndroCopter - use your smartphone as an autopilot !


Hi all,

I would like to present my latest project, a scratch-built quadcopter with a special autopilot: an Android smartphone !

The phone is onboard (under the battery), and actually computes how to stabilize the drone. Of course, a phone cannot be connected directly to the ESCs, so an Arduino ADK bridges the two.

The idea came from the fact that smartphones now feature a lot of nice components useful for a drone. For example, the Nexus 4 used in this project has:
-sensors: accelerometer, gyrometer, magnetometer, barometer, GPS.
-wireless communication: Wi-Fi, 3G.
-2 cameras.
-a powerful quad-core processor, with a GPU.

For the moment, I can fly it manually from a laptop, with a XBox gamepad. I am currently implementing the vertical stabilization, using the barometer. The next step is the GPS. I am also thinking about implementing an optic flow algorithm, for indoor stabilization.

All the source code can be found on Google Code, in case someone is interested.



I would love feedback!

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones


  • Until you start to do acrobatics, I'd stick with the PID controller. That really is sufficient for most other applications. Some of the lack of responsiveness may be due to small communication delays caused by Android (assuming you are using the Android open accessory interface). I suspect the same problems with mine but haven't had a chance to look into it in detail.

  • @Tyler: Wow! Your project is really impressive !

    @Scott: The PID tuning was not too complicated.I have the feeling that this quad is a bit less responsive than others, but this may change, as I could implement a better control method in the future.

  • Nice! I was thinking of doing something like this a while back, but unsure of what to use as bridge between Android and ESC's. I was mostly curious about the phone's acceleromoter, and whether up to the job of doing stabilization or not. Did you have to do much PID tuning? How responsive is it?

    I have a MultiWii lying around, and might have a go at the Bluetooth link (if I can get some time!)

  • Great work! I've done something similar here so, if you have any questions about my work feel free to ask.


    FYI, in case you haven't encountered it yet, heat may start to give you troubles with the barometer. Since phones tend not to dissipate heat well, the barometer will heat up which pretty significantly affects the measurement. I think you can probably create a relatively straightforward algorithm to compensate for it using the phone's internal temperature sensors, though.

  • At the time I started this project, I was not aware of the IOIO board. But maybe it would have been a better choice, because of the smaller board size.

  • Love it! Can't wait for the full stuff to come out. Have you thought about the possible use of the IOIO with this?

  • Now that's awesome! so we dont need to buy an AP anymore in the future. But hey, how to answer those calling during flight?


  • Nice project - I'm doing something a bit similar using an android phone as the high level computer system for drones (see more at I've done a lot of experimenting and I thought I would like to give you a few watch outs :)

    1) Using the Android to do the IMU part is a bit "dangerous" because in contrast to risc based computing systems like arduino, the number of calculations needed to do corrections on a copter based drone, can vary and you might run into instability.

    2) Even though I also use the built in sensors in the Android phone, I have also realized that some of the sensors are below the standard required for this type of application. Many phones have a very unprecice GPS, magnetometer etc.. I've actually started to use external sensors of better quality, interfacing with the phone using I2C. Also, phones do not shield their magnetometer from interference from motors, esc's etc, which can result in your drone flying in the wrong direction.

    I'm have the advantage of working in a mobile solutions company, which gives me access to many different android phones, and through experimentation, I've learned that many devices are of such poor quality, that they are not suited for this kind of application.

    But this is a very interesting project - maybe you could do a little post now and then, so we can get some insight.

    Even though APM is great, it's nice to see that somebody is doing their own thing - variety is always a good thing :)

    Best of luck :)

  • That's neat! Congratulations on achieving stable flight.

  • @lot: I've already seen the Flone project before. It seems nice and cute! Using a Multiwii board is probably the safest option, but for this build, I really wanted to use as little external electronics as possible.

    For the moment, I am using a simple custom protocol to communicate with the computer. This is only temporary, since the objective is to use MAVLink, to be able to use QGroundControl.

    Thanks for the periscope tip. This is a nice way to use both cameras of the phone.

This reply was deleted.