Electric Motors

How to Connect a Brushless Motor to an ESC: Three Wires Explained

Connect a brushless motor's three wires to an ESC, wire the signal and power leads, reverse the direction by swapping two wires, and arm safely.

On this page
  1. The short version
  2. Know your wires
  3. Before you start
  4. Wiring step by step
  5. Reversing the motor
  6. Arduino and the ESC signal
  7. Power: do not assume the ESC can power your Arduino
  8. Safety

A brushless motor has three wires, and an ESC has a few sets of connections that matter: three motor leads, two battery leads and a three-pin signal lead. Wiring them correctly takes only a few minutes. This article explains what each wire does, how to connect them, how to arm the ESC and how to reverse the motor.

The short version

  1. Connect the motor’s three wires to the ESC’s three motor leads. For a sensorless motor, any order works to start.
  2. Connect the ESC’s signal lead to your controller, which is an Arduino pin or a receiver channel. Join the grounds.
  3. Connect the battery to the ESC’s battery leads, with the correct polarity.
  4. Arm the ESC at minimum throttle, then increase the throttle slowly.
  5. If the motor spins the wrong way, disconnect the battery and swap any two motor wires.

Know your wires

  • Motor wires (three): thick wires with no polarity. Each one connects to one of the ESC’s motor leads. Which wire goes to which lead sets the direction.
  • Battery leads (two): the thick red (+) and black (−) leads from the ESC go to the battery. Polarity matters. Reversing them can destroy the ESC.
  • Signal lead (three pins): usually signal, positive and ground. Colours vary. The signal wire is often white or yellow, the positive is often red, and the ground is often black or brown. Some ESCs send 5 V out on the red wire, and others do not.

Before you start

  • Remove the propeller and anything else attached to the motor.
  • Check the ESC’s voltage and current ratings against your battery and motor.
  • Secure the motor and ESC, and keep the wires away from moving parts.
  • Use bullet connectors or solder for the motor joints. Insulate every joint with heat-shrink or tape.

Wiring step by step

1. Connect the motor

Connect the three motor wires to the ESC’s motor leads. For a sensorless motor, any order works to start. If the direction is wrong, you can swap two wires later.

A sensored motor has a Hall sensor cable, and the phase order matters for it. Match the phase labels, A to A, B to B and C to C, or follow the ESC’s manual, and plug the sensor cable into the ESC’s sensor port.

2. Connect the signal

Connect the signal lead to a PWM output on the Arduino, or to the receiver’s throttle channel. Connect the ESC’s ground to the Arduino’s ground. A shared ground is needed, or the signal has no reference.

3. Connect the battery

Connect the battery last. Check the polarity: red is positive and black is negative. Some ESC battery connectors fit only one way. Do not force one.

4. Arm and test

Many ESCs need the throttle at zero for a few seconds before they arm, and some beep to confirm. Power the controller first, then the ESC, and send the minimum throttle. Increase the throttle slowly, and keep the motor secured while you test.

Reversing the motor

  • With the power off, swap any two of the three motor wires. The direction changes.
  • Some ESCs also have a direction setting in their programming. Check the ESC’s manual before you use it.

Arduino and the ESC signal

An ESC reads a servo-style signal: a pulse about every 20 ms, with the pulse width setting the throttle. The usual range is about 1000 µs (off) to 2000 µs (full), though some ESCs use a different range. The Arduino Servo library generates this signal.

#include <Servo.h>
Servo esc;

void setup() {
  esc.attach(9, 1000, 2000);   // pulse range in microseconds
  esc.write(0);                // lowest throttle, to arm the ESC
  delay(3000);                 // wait for the arming beeps
}

void loop() {
  esc.write(30);               // gentle throttle; raise it slowly
}

Remove the propeller before you run this sketch. The motor starts as soon as the sketch reaches the loop() throttle.

Power: do not assume the ESC can power your Arduino

Some ESCs have a built-in battery eliminator circuit (BEC) that outputs 5 V on the red wire. The current it can supply varies, and many small ESCs have none. Use the BEC to power an Arduino or receiver only if the ESC’s specification says it can supply that load. Otherwise, use a separate regulated 5 V supply with a shared ground.

Safety

  • Keep the propeller off during testing, and keep clear of the spinning motor.
  • LiPo batteries can catch fire if they are damaged, overcharged or shorted. Use a balance charger set to the correct cell count, and charge and store batteries in a fire-safe place.
  • Disconnect the battery before you change any wiring.

For the speed and KV side of motor choice, see brushless motor KV vs turns. For how the windings and controller work together, see brushless DC motors explained.

The complete guide to electric motors

Types of Electric Motors: DC, Servo and Stepper Compared
Read the guide

Keep exploring

Guides from other topics

All topics →