Category Archives: ArduPilot

SkyEye Tuning

The last month has been spent largely on the downlink software development and tuning the Sky Eye. It actually wasn’t as much work as I thought it would be and in the end only took about 5-6 hours. It’s also still far from perfect, but it does like quite pretty. Here is a set of loiter loops recorded this morning under 10-15MPH winds:




The biggest remaining variance left is altitude. When the plane banks sharply on the downwind turn, it loses altitude. This results in a pretty sinewave of altitude errors. I’m tuning this now but I doubt I will be able to get rid of all of it without reducing the possible bank angles. At the weight it is flying at and it’s relatively low speed, the Sky Eye drops precipitously in a 45 degree bank.

The big problem is a lack of thrust I think. It will not accept a bigger prop due to it’s design and just doesn’t turn the small thing enough to generate a ton of thrust. I am actually currently looking at a Sky Hunter for future projects, but for the time being I will finish this project. I am very near the point where I can start running the 30 mile course. I am planning on running a 30 mile set of autonomous circuits this weekend. If that goes well, I will plan on doing a followed 30 mile route next week.

APM 2.6 Installation


I received a new APM 2.6 to replace my fried v1 on Monday. After doing some quick tests, I got to work installing the autopilot in the SkyEye. By removing a hunk of foam from the bottom (see the picture below) – you can place the autopilot and associated wiring and electronics below the wooden mounting board inside of the canopy. This gives the APM basically no overhead in terms of space. You can see in the picture to the left that the APM module, receiver, and USB cable are captured almost entirely below the wooden panel. The GPS/Compass sits above it in an attempt to get a “clear view” of the sky. We’ll see how that works. I’m a little worried about the magnet right above the compass.

Anyhow with the installation complete, I’m about ready to do some testing with the autopilot and parameter tuning.


Note the wear and tear on the nose where the SkyEye comes to a stop. It’s basically a big brake, no matter how good you land. Really needs some tape there.


Bridging MAVLink over the Internet using an Android Smartphone


So I’m posting about a neat little trick I am using to hook up to my APM without having to make a physical connection to a computer. What I’m doing is hooking up the APM to an Android phone using an OTG cable and then using a nifty little app to forward the Serial Port connection over the smartphones Wifi radio. Here is the app I am using:

Redirector TCP_SerPort

If you hook it up to your APM’s USB port, you will want to select 115200 baud. You can then open up mission planner, select the “TCP” connection option, and enter the IP address and port from the app when prompted.

Using this trick you basically have telemetry control over your APM whenever the smartphone is within wifi range. And an OTG cable is a lot cheaper than a 3DR radio. :)

This trick most likely wont work on your cell network. The reason is most cell carriers have what is essentially a firewall between your phone and the rest of the internet. You have no control of this firewall so you are basically prevented from hosting any network servers over your cell connection. What you would need to do this is some sort of middleman. I may put something like this together, although I am not sure if it is practical to offer it to the public. I’ll let you guys know.


As I was setting up my reliable old APM 1 to get it installed in the Sky Eye, I must have shorted one of the PWM inputs. As a result, it no longer receives Radio Control inputs. Fortunately, the rest of the board works so I can still use it for testing.

As a result, I started looking for alternatives. 3DR has recently released their Pixhawk board. While it looks really interesting (I absolutely love how the code is documented and how it runs on a UNIX platform), I can’t really find any documented, successful use of it on planes. Their site claims it works fine but I cant find anyone else who has tried it. That makes me nervous. It doesn’t help that 3DR basically has a “no returns” policy. Oh well.

So, while I would have loved to have gone Pixhawk, I think I am going to stick with classic APM for now. I went ahead and ordered an APM 2.6 board with one of the new external GPS+Compasses to go along with it. Honestly, a pretty sweet deal at ~$260.

The one positive thing about this development is that I can use my old APM as a permanent development/test unit for my interfacing software. This means when I receive my 2.6 board, I can put it permanently in the plane, as opposed to constantly installing/removing it.

Project Overview

This site is a design log for a project I am undertaking to design a UAV that will carry an Android smartphone onboard to assist in it’s control logic and communicate with a downlink.

When this project is done, it is my goal to have a UAV that is capable of flying completely autonomously at low level a total distance of at least 30 miles while remaining in contact with the ground controller via a custom interface that interacts with an onboard Android smartphone.

Basic features will include the a full downlink application that will display basic statistics such as altitude, ground-speed, battery charge level, and other essential flight metrics. The downlink software will run in the browser and will be able to adjust the route on-the-fly as well as take pictures and video on command and have it sent to the downlink station.

When a mission is complete, the UAV will circle over a designated mission completion point until an operator turns on a radio transmitter and lands it manually.

The purpose of this project is to improve the state of production UAV’s available to the general public. Currently most UAV’s are at best tied to a high powered RF downlink which has at best a 10 mile range. As cell networks with internet capability spread and cover the planet, the concept of using them to control UAV’s at long ranges and out of line of sight becomes one of the best solutions available to us. Unfortunately, there are currently no easy to use / install systems that utilize both smartphones and mature UAV platforms to give forth a working system.

The work on the project encompasses four major categories:

Airframe – Work on the actual flying vehicle, which will initially be designed as a RC aircraft and slowly developed into autonomy. A COTS airplane will be used (see below) so most of this work will involve electronics mounting and placement.

ArduPilot – Work in tuning and customizing a build of the ArduPilot UAV controller to properly interface with Android in the desired way.

Android Development – Work on an Android application that communicates with the ArduPilot controller over an OTG USB cable. This will presumably only be a middleware that works between the downlink and the ArduPilot.

Downlink Development – Work on a web-based downlink application that allows control and monitoring of the UAV by the above-prescribed means.


The UAV I have chosen for initial development is the HobbyKing Sky Eye. I have chosen this airplane because I am very familiar with and a huge fan of the Bixler, and this is essentially the same airframe but upscaled with a longer wingspan and a bigger compartment up front. The model is very affordable and comes mostly pre-built. While I do enjoy building, this is a desireable quality for this project if I decide I want to produce multiple UAVs.

The Bixler is renowned for its tame flying characteristics and efficiency. I have easily gotten 20 minutes of flight time from them with a cruise of around 25MPH. I have also loaded Bixlers with 3x the battery weight they were designed for. I am hoping that the Sky Eye only improves on these characteristics of a Bixler.

The UAV Controller


I chose to use the ArduPilot UAV controller running ArduPlane for this project. This was mainly done because I had one on hand from previous UAV work and I am familiar with the codebase. DIYDrones is also a great resource for support and help when working on this platform, something other platforms don’t have.

The board I am using is an older APM 2 unit. These days you can buy the controller boards pre-built and packaged from 3D Robotics, but this one has served me well in the past so I will be re-using it. It has a GPS chip, a compass and a barometer built in. I have also customized it with an extension for the telemetry port. These are the wires you see coming off of it.

 The Phone

I will be using an old Galaxy Nexus as the onboard Android smartphone for the project. This is a reasonably powerful phone with a great set of features. Since it is a Nexus, it’s easily rootable and comes loaded with the latest versions of Android (necessary for OTG USB hosting). For whatever reason, Google put a barometer in these phones, which is a boon for my purposes. This will serve as a sanity check for the on-board APM barometer and I will be able to cross-calibrate altitude with it. Being a T-Mobile/international variant, swapping SIM cards in and out to give it cell access is simple.

About Me

My name is James Betker. I’m a 27 year-old software engineer at Garmin in Diamond Bar. I currently live in Tehachapi, which is beautiful, but known for it’s constant, high winds – not so great for model aircraft.

My interests lie in computers and aircraft, plain and simple. I designed my first website when I was 10 years old and wrote my first C++ program a year later.  I began flying model aircraft my first year of college and have been hooked ever since. I received my private pilots license in 2013 and became the proud owner of a full-size airplane in 2014.

My job specialty is low-level embedded development. At Garmin I help in designing and developing software for next-generation automotive applications. On the side, I have developed a set of smartphone applications that utilized sensors built into the latest phones in clever new ways. I believe this project is just an extension of that work.