How to Write your own Flight Controller Software — Part 9

ESC Arming and an Introduction to BLDC Motors

David Such
14 min readJul 7, 2022

Well that didn’t work! Following Part 8 we added a standard Arduino PID library, wrote the motor mixer, and stuck the drone on our Gyro test stand (Figure 1). The quadcopter was receiving the SBUS signals, but the propellers didn’t rotate.

In this part we will work out where the problem is and describe how we control the ESC and brushless motors to get the desired drone orientation. We will also cover a lot of other motor related information.

Figure 1. Magpie Drone mounted in Gyro Test Rig

Basic Motor Control

Whenever something doesn’t work the way we expect, we go back to basics. Let’s just get the throttle working before adding all the fancy PID stuff. Our high level flight loop looks like this:

--

--

David Such

Reefwing Software · Embedded Systems Engineer · iOS & AI Development · Robotics · Drones · Arduino · Raspberry Pi · Flight Control