Skip to content

Actuators · Motor

Brushless Motor (BLDC) with ESC

How a 30A ESC drives an A2212 brushless motor: wiring, the 1000–2000 µs throttle signal, arming, calibration and sizing.

Updated November 16, 2026 2 board guides
Brushless Motor (BLDC) with ESC

A brushless DC (BLDC) motor has no brushes, so it can't run from a plain DC supply. It needs an ESC (electronic speed controller): a small board that switches the battery current through the motor's three wires in the right order, thousands of times a second. Your Arduino or ESP32 never powers the motor. It only sends the ESC a small throttle signal saying how fast to go.

This page uses the kit most makers start with: an A2212 1000KV motor, a 30A ESC and a 3S LiPo, as used on F450 quadcopters, RC planes and test rigs. You'll learn what each wire does, how the throttle signal works, why ESCs need arming and calibration, and how to size an ESC and battery. To drive one from a board, follow the Arduino Uno guide or the ESP32 guide.

BLDC ESC at a glance

At a glance. Battery → ESC (thick red/black leads). ESC → motor (three wires, any order: swap two to reverse). Board → ESC (signal + ground only; leave the red BEC wire off if the board has its own power). Send 1000 µs to arm, 1000–2000 µs to set throttle, and calibrate once so the ESC knows that range.

Example kit specifications

Example kit
A2212 1000KV outrunner + 30A ESC + 3S 2200 mAh LiPo
ESC continuous / burst current
30 A / 40 A for 10 s (Hobbywing Skywalker 30A)
ESC input
2–3S LiPo (7.4–11.1 V nominal, 12.6 V full)
BEC output
5 V, 2 A linear (Skywalker 30A); many generic 30A ESCs list 5 V 3 A
Control signal
Servo-style PWM: 1000–2000 µs pulse at 50 Hz (after calibration)
Hobbywing default range
1100–1940 µs until you calibrate
Motor KV
1000 rpm per volt (no load): about 11,100 rpm on 11.1 V
Motor current
12 A for 60 s; best efficiency at 4–10 A
Motor no-load current
0.5 A at 10 V
Thrust (3S, 1045 prop)
About 700–800 g
Motor wires
3 phase wires, 3.5 mm bullet connectors

ESC figures from the Hobbywing Skywalker V2 manual; motor figures are the common A2212 1000KV listing. Check your own ESC's label: current, cell count and BEC rating vary by model.

How a brushless motor and ESC work

An outrunner like the A2212 has its magnets on the spinning outer bell and copper coils on the fixed centre. To make it turn, the coils must be energised in a rotating pattern that stays just ahead of the magnets. A brushed motor does this mechanically with brushes; a brushless motor needs the ESC to do it electronically.

The ESC has six MOSFETs, two per motor wire. It connects one wire to battery +, one to battery −, and leaves the third floating, then moves to the next of six steps to push the rotor round. The floating wire is useful: as the magnets sweep past it, it produces a small voltage (back-EMF) that tells the ESC where the rotor is. That's why hobby ESCs are sensorless and why the motor sometimes stutters at very low speed, where that signal is weak.

KV is the motor's speed per volt with no load: a 1000KV motor on 11.1 V spins at about 11,100 rpm with nothing attached. A propeller pulls that down, and the ESC's throttle sets how much of the battery voltage the motor effectively sees.

ESC wires and where they go

  • Thick red (BAT+)

    Goes to
    LiPo + via XT60 or Deans
    Notes
    Check polarity before plugging in: reversed polarity can destroy the ESC
  • Thick black (BAT−)

    Goes to
    LiPo −
  • 3 motor wires

    Goes to
    The 3 motor wires (bullet connectors)
    Notes
    Any order works. Swap any two to reverse direction, with the LiPo unplugged
  • Signal (white, yellow or orange)

    Goes to
    Board PWM pin
    Notes
    Servo-style throttle pulse
  • Ground (black or brown, thin)

    Goes to
    Board GND
    Notes
    Required: the signal is measured against this ground
  • Red, thin (BEC +5 V)

    Goes to
    Leave unconnected if the board has USB or its own supply
    Notes
    Can power a receiver or a board on its own; never in parallel with USB

The throttle signal

The ESC reads a servo-style pulse: a HIGH pulse every 20 ms (50 Hz), where only the pulse width matters. About 1000 µs means stop, 2000 µs means full throttle. In Arduino code that is simply esc.writeMicroseconds(1000…2000).

The exact endpoints depend on the ESC. A Hobbywing Skywalker ships set to 1100–1940 µs and its manual tells you to calibrate it to your transmitter. BLHeli ESCs accept a calibrated range anywhere from 1000 to 2000 µs. After a calibration with 1000 and 2000 µs, your code and the ESC agree exactly.

Servo-style ESC throttle pulses: 1000 µs for stop, 1500 µs for half and 2000 µs for full throttle, repeated every 20 ms.

Arming and calibration

Arming is a safety check the ESC runs at every power-up: it won't drive the motor until it has seen a valid signal at minimum throttle. That stops a motor leaping to life because a stick or a sketch was left at full throttle. You'll hear the steps: the motor itself is the speaker. Hobbywing ESCs beep once per LiPo cell and then give a long "ready" beep; BLHeli ESCs play three tones at power-up, one low beep when they detect a signal and one high beep when they're armed.

Calibration is done once per ESC: power it up while the signal is at maximum, wait for the "max stored" beeps, then drop to minimum and wait for "min stored". Both board guides include a calibration sketch that does this for you. If a motor won't start, or full throttle arrives before the end of your slider, calibration is usually the fix.

Two sequences: normal arming at minimum throttle every power-up, and the one-time calibration from 2000 µs to 1000 µs.

Warning

Full throttle at power-up has a second meaning. If your sketch outputs maximum when the LiPo is connected, the ESC enters calibration (or its programming menu) instead of arming. That's useful when you want it, and confusing when you don't. Always make the sketch send 1000 µs before the battery goes in.

Sizing the ESC and battery

  • ESC current: pick an ESC rated 20–50 % above the motor's maximum current. The A2212 draws up to 12 A, so an 18 A ESC is the minimum and a 30 A ESC is the usual choice with headroom for heat.
  • Cell count: the ESC, motor and battery must all support it. Everything in this kit is rated 2–3S; a 4S pack (16.8 V full) would exceed the ESC and over-spin the motor.
  • Battery discharge (C rating): maximum current = capacity × C. A 2200 mAh 25C pack can deliver 2.2 × 25 = 55 A, plenty for one or even four A2212 motors at full throttle (about 48 A).
  • Run time: roughly capacity ÷ average current. At an average 8 A, a 2200 mAh pack lasts about 2.2 ÷ 8 × 60 ≈ 16 minutes, less in practice because you shouldn't drain a LiPo below about 3.5 V per cell under load.

Quick ESC sizing

Motor's max currentESC to chooseExample
Up to 10 A12–15 ASmall 1806/2204 motors
Up to 15 A20 AA2212 on 2S
Up to 20 A30 AA2212 1000KV on 3S, 1045 prop
Up to 30 A40 A2216/2826 motors on larger props

Powering the board: the BEC wire

Most hobby ESCs include a BEC (battery eliminator circuit): a 5 V regulator whose output comes out on the thin red wire. It exists to power an RC receiver and servos from the flight battery.

  • Board on USB or its own supply: leave the red BEC wire unconnected, and tape its pin. Connecting it as well puts two supplies in parallel.
  • Board powered from the ESC: connect the BEC to the Uno's 5V pin (not VIN, not 3.3 V) and remove USB. A linear BEC gets hot on 3S, so keep the load light: an Uno plus a few sensors is fine.
  • OPTO ESCs have no BEC at all; power the board separately.

Danger

Propeller OFF for every test on this page. An A2212 on 3S spins at roughly 11,000 rpm with no load and can pull about 800 g of thrust with a 10-inch prop: enough to cut fingers. Clamp the motor down, keep hands clear, and unplug the LiPo before touching any wire.

Troubleshooting

What happensLikely causeFix
No beeps at allLiPo flat, polarity, or bad connectorCheck the pack voltage (above 11 V for 3S) and the XT60
Beeps repeat, never armsSignal not at minimum, or no common groundSend 1000 µs before connecting the LiPo; connect ESC ground to the board's GND
Arms, but motor only twitchesA loose phase wire, or throttle too lowPush the bullets fully home; raise throttle a little above minimum
Full speed long before full sliderESC not calibratedRun the calibration sketch
Spins the wrong wayPhase orderUnplug the LiPo and swap any two motor wires
Board resets when the motor startsBEC and USB both connected, or a weak groundDisconnect the red BEC wire; use a solid ground wire
ESC or motor hotProp too big, wrong cell count, or no airflowSmaller prop, check the rating, add airflow

Frequently asked questions

Can I connect a brushless motor straight to an Arduino? No. It needs an ESC to switch its three phases at high current. The Arduino only sends the throttle signal.

Do I need the Servo library? On an Uno, yes: Servo.writeMicroseconds() produces the exact pulse the ESC expects. On an ESP32, use ESP32Servo.

Does the order of the three motor wires matter? Only for direction. Any order spins the motor; swapping two reverses it.

Can an ESP32 drive an ESC with 3.3 V signals? Usually yes: ESC inputs are made for RC receivers, many of which use 3.3 V logic. If yours doesn't respond, add a simple level shifter.

Why does my motor stutter at low throttle? Sensorless ESCs find the rotor position from back-EMF, which is weak at low speed. A little more throttle, or a lighter load at start-up, fixes it.

Can I use a 12 V power supply instead of a LiPo? For a no-prop bench test, a supply that can deliver several amps works. With a prop, the motor needs more current than most bench supplies give; use a LiPo.

Wiring & code

Board integration

Library

Servo by Arduino

Included with the Arduino IDE

In this guide you'll control a brushless motor from an Arduino Uno: a potentiometer becomes the throttle, the sketch arms the ESC safely, ramps the speed smoothly and caps it for bench testing. You'll also run a one-time calibration sketch so the ESC uses the full 1000–2000 µs range.

It takes about 30 minutes. The motor never starts on its own: the sketch waits until the knob is at zero.

Danger

Propeller OFF for every test on this page. An A2212 on 3S spins at roughly 11,000 rpm with no load and can pull about 800 g of thrust with a 10-inch prop: enough to cut fingers. Clamp the motor down, keep hands clear, and unplug the LiPo before touching any wire.

What you need

  • Arduino Uno R3

    Qty
    1
    Notes
    Powered from USB
  • A2212 1000KV brushless motor

    Qty
    1
    Notes
    Or any 2–3S outrunner
  • 30A brushless ESC

    Qty
    1
    Notes
    SimonK, BLHeli or Hobbywing Skywalker
  • 3S LiPo, 2200 mAh, XT60

    Qty
    1
    Notes
    Charged with a proper balance charger
  • 10 kΩ potentiometer

    Qty
    1
    Notes
    The throttle knob
  • Jumper wires

    Qty
    5
    Notes
    Male-female for the ESC's servo plug
  • Clamp or motor mount

    Qty
    1
    Notes
    The motor must not move

How it fits together

There are two separate circuits, joined only by the signal and its ground:

  • Power circuit: LiPo → ESC → motor. Tens of amps, thick wires. The Arduino Uno never touches it.
  • Control circuit: USB → Arduino Uno → signal pin → ESC. A few milliamps.

The ESC's servo plug has three wires. Signal goes to D9, the thin ground goes to GND, and the thin red wire (the ESC's 5 V BEC output) stays unconnected, because the Arduino Uno already has power from USB.

Wiring: ESC and potentiometer to Arduino Uno

  • ESC signal (white/yellow/orange)Arduino Uno D9

    Why
    Throttle pulse
  • ESC ground (thin black/brown)Arduino Uno GND

    Why
    Shared reference for the signal
  • ESC thin red (BEC 5 V)Not connected: tape it

    Why
    The Arduino Uno is on USB
  • Potentiometer ends5V and GND

    Why
    Throttle knob supply
  • Potentiometer middle pinArduino Uno A0

    Why
    Knob position
  • ESC 3 motor wiresMotor's 3 wires

    Why
    Any order; swap two to reverse
  • ESC thick red/blackLiPo XT60

    Why
    Connected last, in step 6

Wire it up, step by step

  1. 1Remove the propeller and clamp the motor down.
  2. 2Plug the ESC's three motor wires into the motor's bullet connectors.
  3. 3Connect the ESC signal wire to D9 and the thin ground wire to GND. Tape the thin red wire's pin.
  4. 4Wire the potentiometer: outer pins to 5V and GND, middle pin to A0.
  5. 5Connect the Arduino Uno to your computer by USB. Leave the LiPo unplugged.
  6. 6Run the calibration sketch below (once per ESC), then upload the throttle sketch. Connect the LiPo only when the sketch tells you to.

Upload and calibrate (once per ESC)

The Servo library comes with the Arduino IDE; nothing to install. Choose Tools → Board → Arduino Uno, select the port, and upload this sketch with the LiPo unplugged:

sketch.ino
// ESC throttle calibration (run ONCE per ESC). PROPELLER OFF.
// 1. Upload with the LiPo DISCONNECTED. 2. Open Serial Monitor (9600).
// 3. Follow the prompts. Sets the ESC range to 1000-2000 us.
#include <Servo.h>
Servo esc;

void waitForEnter() {
  while (Serial.available()) Serial.read();
  while (!Serial.available()) {}
  delay(50);
  while (Serial.available()) Serial.read();
}

void setup() {
  Serial.begin(9600);
  esc.attach(9, 1000, 2000);
  esc.writeMicroseconds(2000);                      // MAXIMUM first
  Serial.println(F("Sending 2000 us (max). Connect the LiPo to the ESC now."));
  Serial.println(F("When the ESC beeps to say max is stored, press Enter."));
  waitForEnter();
  esc.writeMicroseconds(1000);                      // then MINIMUM
  Serial.println(F("Sending 1000 us (min). Wait for the confirmation beeps."));
  delay(4000);
  Serial.println(F("Done. Unplug the LiPo. Upload the throttle sketch."));
}

void loop() {}

Open the Serial Monitor at 9600 baud and follow the prompts: plug in the LiPo while the sketch sends 2000 µs, press Enter after the "max stored" beeps, then wait for the "min stored" beeps. Unplug the LiPo. The exact tones depend on your ESC; the main page explains arming and calibration.

Arming at minimum throttle every power-up, and the one-time calibration from 2000 µs to 1000 µs.

The throttle sketch

sketch.ino
// BLDC motor + 30A ESC + Arduino Uno: potentiometer throttle with safe start
// PROPELLER OFF while testing. ESC signal -> D9, ESC signal ground -> GND,
// ESC red BEC wire NOT connected (the Uno runs from USB). Pot: 5V / A0 / GND.
#include <Servo.h>

const byte ESC_PIN = 9;
const byte POT_PIN = A0;
const int  MIN_US  = 1000;   // after calibration: 0 % throttle
const int  MAX_US  = 2000;   // after calibration: 100 % throttle
const int  LIMIT_US = 1500;  // bench-test cap: change only when you are ready
const int  STEP_US  = 10;    // max change per 20 ms: smooth ramp, no sudden jumps

Servo esc;
int outUs = MIN_US;

void setup() {
  Serial.begin(9600);
  esc.attach(ESC_PIN, MIN_US, MAX_US);
  esc.writeMicroseconds(MIN_US);           // minimum throttle from the very start

  Serial.println(F("Turn the pot fully DOWN, then connect the LiPo to the ESC."));
  while (analogRead(POT_PIN) > 20) {        // refuse to start with the knob up
    delay(100);
  }
  Serial.println(F("Pot at zero. Waiting 5 s for the ESC to arm..."));
  delay(5000);
  Serial.println(F("Armed. Turn the pot slowly."));
}

void loop() {
  int target = map(analogRead(POT_PIN), 0, 1023, MIN_US, LIMIT_US);
  if (target < MIN_US + 20) target = MIN_US;          // small dead zone = clean stop

  if (target > outUs)      outUs = min(outUs + STEP_US, target);  // ramp up gently
  else if (target < outUs) outUs = target;                        // stop at once

  esc.writeMicroseconds(outUs);

  static unsigned long lastPrint = 0;
  if (millis() - lastPrint > 250) {
    lastPrint = millis();
    Serial.print(F("Pulse: "));
    Serial.print(outUs);
    Serial.print(F(" us  Throttle: "));
    Serial.print((outUs - MIN_US) / 10);
    Serial.println(F(" %"));
  }
  delay(20);
}

How the code works

  • Minimum first. esc.writeMicroseconds(1000) runs before anything else, so the ESC sees minimum throttle the moment the LiPo is connected and arms instead of entering calibration.
  • Knob must be at zero. The while loop refuses to continue until the potentiometer is turned fully down. A knob left halfway can't start the motor by surprise.
  • Ramp up, stop at once. The output rises by at most 10 µs every 20 ms (0 to 50 % takes about a second) but drops to minimum instantly when you turn the knob down.
  • LIMIT_US = 1500 caps the bench test at half throttle. Raise it towards 2000 only when the motor is mounted properly and you need full power.
  • Dead zone. Readings within 20 µs of minimum become exactly 1000 µs, so the motor stops cleanly instead of twitching.

What you should see

With the LiPo unplugged, open the Serial Monitor (9600 baud), turn the knob fully down, then connect the LiPo:

Output
Turn the pot fully DOWN, then connect the LiPo to the ESC.
Pot at zero. Waiting 5 s for the ESC to arm...
Armed. Turn the pot slowly.
Pulse: 1000 us  Throttle: 0 %
Pulse: 1180 us  Throttle: 18 %
Pulse: 1340 us  Throttle: 34 %
Pulse: 1000 us  Throttle: 0 %

Troubleshooting

Common problems and fixes

  • ESC keeps beeping, never arms

    Likely cause
    Signal not at minimum, or no common ground
    Fix
    Make sure the ESC ground goes to Arduino Uno GND; the sketch sends 1000 µs before the LiPo goes in
  • Sketch stuck at 'Turn the pot fully DOWN'

    Likely cause
    Knob not at zero, or pot wired backwards
    Fix
    Turn it the other way, or swap the pot's outer wires
  • Motor reaches full speed at a quarter of the knob

    Likely cause
    ESC not calibrated
    Fix
    Run the calibration sketch
  • Motor only twitches

    Likely cause
    Loose bullet connector or throttle too low
    Fix
    Push the bullets home; turn the knob a little further
  • Spins the wrong way

    Likely cause
    Phase order
    Fix
    Unplug the LiPo, swap any two motor wires
  • Arduino Uno resets when the motor starts

    Likely cause
    BEC red wire connected while on USB
    Fix
    Disconnect and tape the thin red wire

Frequently asked questions

Why not use analogWrite()? It makes 490 Hz PWM with a duty cycle, not the 50 Hz, 1000–2000 µs pulse the ESC expects. Use the Servo library.

Can I power the Arduino Uno from the ESC's BEC instead of USB? Yes: connect the thin red wire to the Uno's 5V pin and remove USB. Never both at once.

How do I control more than one ESC? Attach another Servo object to another pin. Each ESC needs its own signal wire; the grounds all join.

Can I use a different signal pin? Yes, any digital pin works with the Servo library. Note that it disables PWM on pins 9 and 10 while in use.

What to build next

  • Thrust stand: mount the motor on an HX711 load cell and measure grams of thrust against throttle.
  • Battery monitor: read the LiPo voltage through a divider and stop the motor below 3.5 V per cell.
  • Two-motor drive: a second ESC on another pin for a hovercraft or boat.
  • Wireless throttle: the ESP32 guide adds a phone slider with a failsafe.

Step-by-step

Board guides