Building an Android based autopilot

I bought a PhoneDrone board a couple of months ago, hoping to use the board in order to build some sort of autopilot or  plane stabilization in conjunction with any standard Android phone that supports Android 2.3.5+. 

My idea is to use the sensors in the phone to stabilize a plane. Initially I thought about stabilizing even a multirotor, but I soon figured out, that would be way to complicated. So I´m starting with a plane. In my case I´m using the EPP-FPV from hobbyking since it has plenty of space to hold all the electronics and flies very docile.

After getting in contact with the nice folks at the 3drobotics support I was able to get some code samples and build a basic prototype connecting all the pieces. A Samsung Galaxy Nexus, the PhoneDrone board, a Turnigy9x receiver and some servos which you can see in the embedded video at the top.


 
The next step is involving the onboard gyro and accelerometer to stabilize one axis of the plane. The code is allready in the repository and I tested it very briefly but I wanted to see first how an APM2.0 stabilizes my plane. Also I´m thinking very hard about backup solutions in case my PhoneDrone-Android setups fails in the air. I´ve studied the failsafe of the APM1 and APM2 and decided to get a 
"Wireless Buddy Box System" with 
4 or 
8 channels from Hobbyking. Dedicated hardware failsafe seems like a good idea to me.

Next steps are actually getting experience with the APM2.0 to get a real feeling what to expect from a plane autopilot since I´ve only used this kind of hardware on multirotors so far. Then I will see how much of the functionality I can cover with the "IMU" that is in my phone. It´s really cool if you think about it, my Galxy Nexus Phone has all the sensors of the APM2.0 (gyro, ass, compass, gps, baro) plus a "modem" and a very handy input device called a touch screen to configure the software :) Plus it has tons of memory, dual core ARM processors and it´s own backup battery.

I´ll keep you guys up to date with my progress here on diydrones. You can also look directly at my github for changes in the code, my youtube channel or twitter.

I´ve also created a google group to exchange ideas and experiences with other people who bought a PhoneDrone board.

 

Views: 13665

Tags: Android, phoneDrone


Developer
Comment by John Arne Birkeland on May 14, 2012 at 6:20pm

Compared to an 8bit AVR, the average cpu(s) in a Android system is just so much faster and has so much more helping hardware that they should offsets any schedule timing errors and comparatively have better "real time" performance then the AVR. At least for AHRS math in the 1000 Hz range. Heck, my Tegra 3 based Transformer Prime as a companion core used just to keep the system alive during idle sleep that is much, much faster then any 8-bit AVR.

Comment by Ellison Chan on May 14, 2012 at 6:46pm

Well, like I said, not trying to discourage anyone from experimenting, and would love to see someone actually achieving it.  Just trying to point out some possible constraints.  Although I got to say, I personally would find my android phone more useful as a phone than an imu for a plane. ;-)

The advantage of interfacing an android phone, is the possibility of extreme distance control of the craft.  But, for planes, and multirotors, regulations make that a moot point for now.

I expect that within a year or less, we are going to start having STM F4 based flight controllers in beta stage.  I'm pretty sure that by summer, we may seeing the AeroQuad32 board come out.  (I was the one who sourced the supplier for the proto board.)

Comment by David Rosendahl on May 15, 2012 at 8:44am

Other advantages by using a phone is that its easy to obtain/replace (and upgrade), is built in large quantities and so on. I agree that it has a lot of drawbacks, but I love the experiment :). 

Comment by Seonkyu Lee on July 17, 2012 at 12:02am

Excellent !! I am sorry, could I obtain your firmware and arduino source code? If possible, please send me. (itnc at pknu.ac.kr)

Comment by Scott Bott on September 20, 2012 at 9:27pm

deadfalkon, I am a DeVry student in Arizona and I have a team that wants to create an application similar to the desktop GUI for the autopliot.  We feel this would have better control for the user and can be used on any Android tablet or smart phone. 

Comment by endrew on November 15, 2012 at 3:14am

Hi,
How do you upload the arduino code to the Phonedrone board? Do you use the onboard USB port and an android phone? Is there an arduino version for android? Is it possible to use a PC to program the board? 

Thanks!

Comment by deadfalkon on November 15, 2012 at 4:08am
I used the USBport of the phone drone to upload the Arduino code and used Wireless ADB to push my app to the phone, since the phones USB port is blocked by the phonedrone
Comment by endrew on November 16, 2012 at 7:58am

@deadfalkon Thanks for the reply.
Did you program the phone drone using a PC and a male to male USB cable?

 

Thanks!

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service