KOEBELT
All projects
Projects

Stabilized quadcopter

A quadcopter built end to end, from part selection and PCB design to flight-control firmware, that holds a stable attitude in manual flight.

Personal projectEmbedded systemsPCB design
Props: each spins up or down as the loop asksFlight controller: IMU and STM32 on a hand-wired boardThe attitude loop runs 1,000 times a second: it fuses gyroscope and accelerometer into one estimate, compares it with the lean you ask for, and speeds up the props on the side that has to rise. A gust tips the frame; the loop has it back where you asked in about a third of a second.
RoleSole designer and engineer
StackC · C++ · KiCad · STM32 · IMU sensor fusion
The problem

A quadcopter is unstable by construction: it has four actuators, six degrees of freedom, and no passive tendency to stay level. Keeping it in the air means closing a control loop faster than the airframe can fall out of one.

Constraints
  • Every part selected and sourced individually, no kit
  • Custom PCB, designed and populated by hand
  • Attitude loop running at about 1 kHz on an STM32, fast enough to correct before divergence
  • Total mass budget fixed by the motors and props chosen first
Decisions

Build the board rather than buy a flight controller

An off-the-shelf controller would have flown sooner, but the point was to understand the whole stack: power, sensing, actuation and the loop between them. Designing the PCB forced every one of those decisions to be explicit.

Sensor fusion over a single sensor

The accelerometer is trustworthy over long spans and noisy over short ones; the gyroscope is the reverse. Fusing them gives an attitude estimate that is neither jittery nor drifting, which is what the control loop actually needs.

Tune the inner loop before adding anything outer

Attitude hold had to be solid on its own before position or navigation could mean anything. Each outer loop was only added once the one beneath it stopped fighting back.

What I'd change

I would instrument the loop from the first day instead of the first crash. Logging attitude estimate and motor output to look at afterwards turned tuning from guesswork into reading a graph, and I only started doing it late.