Configuring an ESC with BLHeli firmware using an Arduino Uno

The Importance of Motor Direction

David Such
7 min readFeb 26, 2021

In order to stop our drone spinning like a top, it is important that the four motors turn in a particular direction. As shown in figure 1, we want the motors to alternate spinning clock wise and counter clockwise. This arrangement causes the torque from the spinning motors to cancel out and the quad only yaws when we want it to.

Figure 1. Required Motor Directions for the Magpie Drone.

We wired up all our motors to the RacerStar Quad ESC in the same way as we assumed that the default arrangement would give us the correct spin direction. It doesn’t. Two diagonally opposed motors are spinning in the wrong direction (M1 and M3). We could fix this by swapping any two wires from the ESC to the motor but it is easier to do this in software.

ESC Firmware

In the beginning, ESC’s came with firmware from the manufacturers, and they were rubbish. So 3rd party firmware came to be. The two originals were SimonK and BLHeli. SimonK is no longer supported so BLHeli has become the defacto (Open Source?) standard.

BLHeli has continue to evolve and now comes in BLHeli_S and BLHeli_32 flavours. As you can guess, BLHeli_32 is targeted at 32 bit ESC hardware and performs better than its predecessors.

--

--

David Such
David Such

Written by David Such

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

Responses (2)