Quadrotor UAV


I'm making a UAV that is propelled by four rotors.

It uses a control loop running on a PIC composed of sensors, a Kalman filter, a PID controller, flight equations, and motors.

The PIC communicates via an RS-232 link with a Linux SBC.


All the sensors are linked to the PIC.

Kalman filter

I found some very good examples online and on the SparkFun forums, but these have to be extended to many more states.

I've also implemented a simple one in a simulation to learn how to use it.

PID controller

The PID controllers recieve the current orientation from the Kalman Filter and the desired orientation from the SBC and combine them using the error, its integral, and its derivative to get the desired speed of each axis to get to the desired position.

There is a PID each for:

Flight Equations

The UAV is modeled by these equations:

Yaw, Thrust, Pitch, Roll - these are all the speed in that axis

R is the speed of each rotor. (rotor 2 and 4 are counter-rotating)

These equations can be solved to what I call the 'flight equations'.


Four brushless motors will be used that are controlled by a custom I2C brushless controller.


An NSLU2 is used as a SBC running Linux from a USB flash drive. The NSLU2 is modified to increase it's clock speed, make it always run when power is available, and add three extra USB ports to the normal two.

A flash stick and a USB Wifi adaptor are connected to the NSLU2.

The NSLU2 is also connected to several cameras that have door peepholes, which are used as wide-angle lenses. At most three can be used without adding an additional USB hub.


There are three seperate boards: