Projects / Servo and ESC tester

Servo and ESC tester

Beginner45 minGuided buildReviewed

Build it step by step

0 of 7 done
  1. NANO19.9 mASSD1306

    Wire the knob and OLED

    Show the pulse number.

  2. NANO

    Add the button

    Cycle through three modes.

  3. NANO59°

    Power a servo from its own pack

    Join the grounds.

  4. NANO

    Test centre

    Horn sits at the middle.

  5. NANO

    Test sweep

    Smooth travel.

  6. NANO

    Check the end points

    Back off if it hums.

  7. NANO

    Test an ESC with no propeller

    Knob at the bottom first.

In short

How do you build a servo and ESC tester?

A knob sweeps any servo or ESC through its range and an OLED shows the pulse width in microseconds, a handy RC bench tool. You need Arduino Nano, Potentiometer 10 kΩ, SSD1306 OLED Display, Tactile push button 6 mm, SG90 Micro Servo, Battery holder 4 × AA with switch and AA alkaline battery × 4. It takes 7 steps and about 45 minutes.

Level
Beginner
Time
About 45 min
Parts
7

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Pot outer legsNano 5V and GNDReference
Pot middle legNano A0Knob position
OLED SDA and SCLNano A4 and A5I2C display (address 0x3C)
OLED VCC and GNDNano 5V and GNDPower
Mode buttonNano D2 and GNDCycles manual, centre and sweep (internal pull-up)
Servo signalNano D9Pulse output
Servo plus4xAA holder plusServo power from its own pack, not the Nano
Servo minusBattery minus joined to Nano GNDCommon ground

Code

A servo is told where to go by a pulse every twenty milliseconds: about 1000 microseconds means one end, 1500 the middle and 2000 the other end. An ESC for a brushless motor reads the same kind of pulse, but as throttle. The tester turns the knob into that pulse with writeMicroseconds(), shows the number on the OLED, and has a button that cycles between the knob, a fixed centre and an automatic sweep. Power matters: a servo can draw an amp when it moves, so give it its own battery pack and join only the grounds. Do not run a servo from the Nano's 5 V pin. For an ESC, take the propeller off the motor first and keep hands, hair and loose clothing away, and be careful with throttle, because a motor can start at once. Many ESCs want a low throttle for a moment to arm, so start with the knob at the bottom. Servo end limits differ, so watch for a servo that hums at one end and back off. Arduino IDE, board "Arduino Nano" (try the Old Bootloader option if the upload fails).

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

// Servo and ESC tester: knob, centre and sweep modes with the pulse width shown on an OLED.
// Libraries: Servo (built in), Adafruit SSD1306, Adafruit GFX. Board: Arduino Nano.
#include <Servo.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
Servo out;
const uint8_t PIN_OUT = 9, PIN_BTN = 2;
int mode = 0;                              // 0 manual, 1 centre, 2 sweep
int sweepUs = 1000, dir = 10;
bool lastBtn = HIGH;
void setup() {
  pinMode(PIN_BTN, INPUT_PULLUP);
  out.attach(PIN_OUT, 500, 2500);          // widest limits so writeMicroseconds works as given
  oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  oled.setTextColor(SSD1306_WHITE);
}
void loop() {
  bool b = digitalRead(PIN_BTN);
  if (lastBtn == HIGH && b == LOW) { mode = (mode + 1) % 3; delay(40); }
  lastBtn = b;
  int us;
  if (mode == 0) us = map(analogRead(A0), 0, 1023, 1000, 2000);
  else if (mode == 1) us = 1500;
  else {
    sweepUs += dir;
    if (sweepUs >= 2000 || sweepUs <= 1000) dir = -dir;
    us = sweepUs;
  }
  out.writeMicroseconds(us);
  oled.clearDisplay();
  oled.setTextSize(1); oled.setCursor(0, 0);
  oled.print(mode == 0 ? "MANUAL" : mode == 1 ? "CENTRE" : "SWEEP");
  oled.setTextSize(3); oled.setCursor(0, 24);
  oled.print(us); oled.setTextSize(1); oled.print(" us");
  oled.display();
  delay(20);
}

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Knob fully leftDisplay near 1000 us
Centre mode1500 us, horn at the middle
SweepMoves smoothly between the ends
Servo on its own packNo Nano resets

If it does not work

Nano resets when the servo moves

Power the servo from its own pack.

Servo twitches

Check the common ground.

OLED blank

Try address 0x3D and check SDA and SCL.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the servo and ESC tester?

Arduino Nano, Potentiometer 10 kΩ, SSD1306 OLED Display, Tactile push button 6 mm, SG90 Micro Servo, Battery holder 4 × AA with switch and AA alkaline battery × 4.

How long does the servo and ESC tester take to build?

About 45 minutes for a beginner maker, in 7 steps.

How do I know the servo and ESC tester works?

Knob fully left: Display near 1000 us. Centre mode: 1500 us, horn at the middle. Sweep: Moves smoothly between the ends.

Nano resets when the servo moves: what should I check?

Power the servo from its own pack.

Servo twitches: what should I check?

Check the common ground.

OLED blank: what should I check?

Try address 0x3D and check SDA and SCL.