AndroCopter - use your smartphone as an autopilot !

3689556151?profile=original

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

Comments

  • Great Romain

    I wrote some time ago on the drones-discuss groups about this. You've just brought it to life!! 

    It gives a lot of power in terms of connectivity (integrated GSM) and the ability to write "plugins" for the androcopter allowing image recognition with the on board camera and a lot more high demanding processing stuff that cannot be done in APM/Pixhawk

    A+

  • Hi Romain!

    Congratulations for your Androcopter, flies ver well!

    I'm doing another project that uses a smartphone as a flying platform: Flone

    http://flone.aeracoop.net

    I'm using Multiwii+BlueToothModule instead the wiring communication between android and Arduino, because it's cheaper and lighter.

    I already have an Arduino ADK so I will like to test your software soon.

    Our plan is using the multiwii code as a failsafe if android fails. Also we are writting  an Android app for piloting with another smartphone. Video feed works well until 300 meters, but new smartphones can operate also in the 5Ghz band, that covers more distance.

    Witch communication protocol are you using? MAVLink?

    There are very cheap persicope lenses in ebay for the upper camera that works very well. 

    If you want to test our frame that is designed to carry a smartphone there are the files for a laser cutter:

    http://www.thingiverse.com/thing:113497

    Bon chance!

  • Thank you for your feedback !

    @Hugues: all the smartphone source code has been written by me. It is not so long, it's about 1000 lines of code. I have not tested the Wi-Fi range yet, but I expect it to be up to 100m in favorable conditions, like the AR-Drone.

    @Andrew: it may be possible to port the APM on Android, but the main issue is the lack of real-time. On AndroCopter, the control loop is supposed to have a period of 5 ms (sensors max sampling rate), but in practice, some loops can last more than 20 ms ! I ignore if APM can handle this. The goal of this project was to use a "stock" phone, without customization (it is not even "rooted"), so I don't want to try to install a RT Android kernel.

  • Developer

    Hi Romain,

    Nicely done!

    You might like to know that I've been working on a port of the APM code to Linux, initially targeting the Beaglebone Black and the RaspberryPi.

    It would also be possible to build the APM code for Android, which would give you a lot more features than your code, and I think would make a very interesting experiment.

    I suspect a port using the NDK wouldn't be too hard. The main trick would be getting the scheduling consistent enough for good flight control. For the Beaglebone port I'm using the RT preempt kernel patches, which may be difficult to get on an Android phone.

    Cheers, Tridge

  • MR60

    Excellent. C'est genial. As-tu développé le code seul sur le smartphone ? Ou as-tu porté des algortihmes d'autres codes sources ?

    Je suppose que le controle du PC au drone se fait par wifi, quelle est ta portee ?

    Bravo en tout cas!

  • Moderator

    Here's some feedback, love it well done!

This reply was deleted.