WARG PicPilot

October 2016

The WARG Autopilot (nicknamed the "PicPilot") is the custom developed autopilot board that we use at the Waterloo Aerial Robotics Group. The hardware is based on two dsPIC33s communicating with each other over DMA SPI. One of the chips is responsible for managing the orientation of the aircraft, whilst the other is responsible for path management.

This has been one of WARG's longest running project, and the design of the original hardware dates back to 2010. As part of my responsibilities at WARG, I'm the current software lead for the autopilot. Most of my work on it has been primarily focused on optimization and reliability, both of which are vital to something that controls a flying vehicle.

Sensors and Peripherals

Some of the sensors connected to the autopilot. These communicate over UART, SPI, I2C, and PPM:

  • Telemetry downlink using the 900Mhz band using Xbee radios that sends down real time status data for the aircraft about 5 times a second (UART)

  • IMU (Intertial Measurement Unit) to get a sense of the orientation of the aircraft (SPI)

  • Altmeter/barometer to get the altitude of the aircraft (I2C)

  • A GPS to get accurate positional readings (SPI)

  • RC Receiver for getting input from controller (PPM)

My part

Some of the things I've done include:

  • Leading the development of the project, including deciding feature addition and task breakdowns and assignments

  • New generic asynchronous UART hardware abstraction driver that leverages an interrupt based workflow and queues to decrease wasted cycles talking to peripherals

  • New telemetry implementation that leverages the aforementioned UART driver for greater reliability and memory usage

  • Abstracting all of the peripheral interaction code and de-couple the autopilot from using specific sensors. This allowed for unit-testable code, and the ability to perform hardware-in-the-loop integration tests later on

  • Making PWM readings more reliable and adding support for PPM on the autopilot, cleaning up wiring for the drone

  • Integrating the Ceedling unit testing framework, and writing unit-tests for some of the most vital components of the system, such as the telemetry downlink

  • More robust DMA SPI implementation for communication between the two microcontrollers. Implemented custom checksums to check for positional and value integrity of data

  • Reliable kill-mode implementation, to make sure that in the case of a loss -of range, the aircraft performs a full deflection and dive towards the ground rather than fly into dangerous, populated areas

  • lots more..

End Goal

As my personal goal, I want this project to be able to compete with other open source autopilots out in the market. Essentially, the objective is to develop it to a point where other people can use it to fly their drones. Namely the PicHawk is currently one of the most used autopilots on the market. With enough time and work I hope to get the PicPilot (or the future revision, the ZeroPilot) up to a state that competes with it.

View on Github