Fixed Wing UAV

This project was completed in semester 2, year 2, with a group of 5. My role was in avionics. This involved design, making, and programming a semi autonomous flight computer. The rest of the team designed and built the wing.

UAV
Lifting flow over a cylinder

For the flight computer, we were given:

With the given items, the avionics system had to: The first step was to design the circuitry required, followed by a simple prototype.

Iron bird
Iron bird

After multiple iterations, the design was finalised, and the wiring could be layed out and fixed to the avionics tray. A sizeable portion of time was spent optimising the various systems to lower mass. Jumper cables would added later to connect the various components.

Schematic
Schematic

The software was written in parallel with hardware development. Given the use of an Arduino Uno, memory was severely limited. The program had to do 3 things:

  1. Read sensor data, and log it to an SD card
  2. Monitor if the autopilot switch on the transmitter is engaged
  3. Autonomously control the ailerons and elevator if the switch is engaged
To achieve these goals, many problems had to be solved:
  1. We were specifically told at the start of the project it was not possible to run all the sensors, and we'd have to use a limited subset of them. With careful library choice, we discovered that it was definitely possible. Unfortunately, the GPS logging was not very successful, due to the carbon fibre wing spar, and aluminium tail spar blocking the signal. The rest of the data logging was successful however.
  2. Monitoring the receiver channel was quite straight forward, by simply connecting the channel to a PWM pin on the Arduino. Many failsafes were built into this section, reverting to manual mode if the wire became disconnected, or if the signal is weak.
  3. To control the attitude of the aircraft, accurate measurements of pitch and roll were required. To do this, data from the accelerometer and gyro were combined with a complementary filter. Pitch and roll data was then fed into 2 PID controllers, one for elevator angle and one for aileron angle. Tuning the PID loops correctly was very difficult given we only had one test flight. Luckily, I have some experience with PIDs from a previous project, and using my engineering intuition, guessed approximate tuning values.
In the test flight, the aircraft flew very well, and the autopilot was surprisingly effective. After the test flight, the pilot was clearly very happy with how well the autopilot performed. After receiving the marked work back, the autopilot was the best part of our work, and as far as I am aware, the best they have ever had for that project. Overall, everything worked, and the project was a complete success.

Flying UAV
In Flight