Drone Project

Drone Project

From funding recieved from Cambridge University Engineering Society (CUED) I designed and built a drone to learn more about state estimation and control theory.

Design

Material Choice

I decided to make the drone out of wood even though a 3D printed frame would have been stronger and lighter. The main objective of the project is to learn as much as possible and so I’m starting from scratch where I can. This involves starting from only a microcontroller, so it seems fitting to build it out of a primitive material like wood. Early aircraft were made out of wood and so I also wanted my first flying device to be wooden too.

CAD

The design was initially based around reducing motor vibration to the IMU. This was going to be achieved by attaching the IMU to the high inertia battery, and putting dampers between the battery and the frame. However, as the project progressed the IMU was just fixed to the frame to allow for easy access for the battery.

Another compromise that was made later was laser cutting the wood in a weaker orientation due to trying to fit all the parts on purchased sheets of laser ply.

Prototype

PCB

Chris Li helped with the PCB design as this was something I had never done before.

Assembly

Firmware

The firmware was written in C++, however data collection tools were written in Python and Allan Variance analysis was done in MATLAB using modified code [1]. An extended Kalman filter is implemented in observer.cpp, for which tuned allen variance parameters are passed in from the main.cpp file. Modified libraries were used for the BMP280 and BNO055 sensors, which were interfaced using I2C. The firmware uses both Pi Pico’s cores, with the fast radio communications loop running on core 0 and the slower state observer running on core 1. When a new state estimate is caclulated it is pushed on to the FIFO queue, which is read by the mainloop, for which control will be updated.

[1] Jay A. Farrell et al. Inertial Error Modelling Tutorial. 2022