PICAXE-controlled GPS Autopilot

Paul's circuit system

Paul Bowler
Ashburton College
Year 13 Electronics

After building and flying radio-controlled model aeroplanes for five years, Ashburton College student Paul Bowler wondered whether it was possible to build a GPS-based autopilot using off-the-shelf components that could steer one of his models over a set route of waypoints just like a military or commercial unmanned aerial vehicle. But it wasn't until he came across the PICAXE family of microcontrollers that he knew the idea was practical.

The challenge was to develop an autopilot that could receive and interpret GPS data and translate these signals into accurate servo control commands. A number of commercial systems were available, but Paul wanted to build something from scratch and learn about the technology required.

In the end, Paul developed a system where the user can remotely over-ride the manual control system of the aircraft and switch on an autopilot to steer. The autopilot receives data from the on-board GPS receiver, analyses it for the relevant heading, bearing to destination and velocity information, and adjusts the rudder servo accordingly. The throttle, aileron and elevator channels remain under manual control at all times.

The autopilot also transmits a stream of data to a laptop showing the plane's current bearing to destination, heading, velocity and whether it has reached its destination waypoint or not. At present, this data is only available over a short range (less than 100 metres), due to the radio frequency modules used, but nevertheless this still provides feedback to the user as to how the autopilot is functioning.

Paul believes his system is unique as he hasn't seen any other similar PICAXE-based systems during his research.

The project is still very much at the prototype stage, and a number of issues need to be resolved. Further adjustment and calibration of the autopilot is required to ensure it can provide reliable steering control on an aircraft. This will be done using a modified radio-controlled model car as a test bed, which avoids the complications of dealing with an aircraft flying in three dimensions.

To provide stability in the lateral and longitudinal axes of the aircraft, Paul will install a commercial 'co-pilot' unit. A 'co-pilot' acts as a go-between between the receiver and aileron/elevator servos. The device creates an artificial horizon using infra-red sensors; when it senses the aircraft rolling or pitching unnecessarily without input from the user it makes corrections to keep the aircraft stable.

Paul's circuit systemThe biggest challenge though is to find a way of refining the somewhat crude and inefficient autopilot function. Field testing indicates some sort of inertial navigation system (or something similar) is required to keep an aircraft on course and following a logical path towards its destination in between the updates from the GPS receiver. Paul's prototype is unable to correct its heading in between updates – once it makes a steering correction based on information computed from the GPS it cannot determine what effect this correction has had, and compensate for any errors.

"It's a bit like trying to drive a car with one's eyes closed. If you were to only open your eyes once every few seconds for a very short period of time (equivalent to the update/refresh rate of the GPS) and make a steering correction based on your observations you may be able to approximate a straight course. However, if you noticed you had to make a large steering correction but you were not able to determine how far this correction had taken you while your eyes were closed, you may not be able to follow a direct path towards a destination."

What's required, Paul says, is a process to fit between the updates from the GPS to double check that the autopilot has not over corrected or that the steering correction is having an effect. "Hopefully, this might mean the system could approximate an efficient course to the destination whilst remaining on track throughout its motion."

The potential of this project is enormous, Paul says. He is particularly excited about the possibility of using freely available GPS software to track a plane in real time. Initial experiments indicate this is possible using the Live Track Feature available with GPS Utility software, which allows the geographical position, velocity, course and many other pieces of information to be displayed on a laptop when a connection to the onboard GPS unit is present. When this information is overlaid on topographical maps or aerial photography the possibilities are very exciting. It may also be possible to use this software to update the set GPS course en-route and in doing so allow much greater flexibility. This development will be possible with the integration of more sophisticated radio frequency modules that will allow a virtual bidirectional serial interface between the software and GPS to be created.

Theoretically, using this software might allow the autopilot to be used in an aircraft equipped to carry a payload such as a digital camera. This could then be used for aerial photography and other forms of research or observation.

Paul's prototype autopilot won second-equal place in Category A [17 years +] of the Bright Sparks Competition 2008. Paul intends to study engineering at Canterbury University and plans to work in aviation engineering.

Paul at Bright Sparks with his autopiloted plane