This project provides an Arduino sketch to calibrate up to 4 Electrical Speed Controllers (ESC) at the same time. Feel free to update this sketch if you need to calibrate more than 4 ESCs.
ESC are used to control brushless motors. This sketch is based on the Servo library that allows controling servo-motors sending them a 50Hz servo-control signal (a particular kind of PWM). Generated pulses length are about 1000µs to 2000µs. Feel free to edit pulses length according to your needs.
This sketch was written according to the HobbyKing ESC documentation
A detailed tutorial is available here (in french).
Connect each motor (3 wires) to its ESC. The way of wiring doesn't matter : brushless motors are like 3-phased motors, thus it only affects the direction of rotation. For calibration step, direction of rotation is not important.
Connect each ESC's ground to the Arduino's ground to make all having common ground. Most of the time, ESC's command wire is white, then connect them as following :
- ESC1 to Arduino's digital pin #4
- ESC2 to Arduino's digital pin #5
- ESC3 to Arduino's digital pin #6
- ESC4 to Arduino's digital pin #7
ℹ️ If you don't want to calibrate all ESCs at the time, you're free to connect them one by one and run the Arduino sketch, it doesn't make any difference.
After having uploaded sketch on your Arduino and having ESCs not powered up yet :
- Plug your Arduino to your computer with USB cable, open terminal, then type 1️⃣. This will send max throttle to each ESC in order to make them enter programming mode.
- Power up your ESCs. You must hear "beep1 beep2 beep3" tones meaning the power supply is OK.
- After 2sec, "beep beep" tone emits, meaning the throttle highest point has been correctly confirmed.
- Then, type 0️⃣ to send 0 throttle. This will set the lowest throttle level for each ESC.
- Several "beep" tones emits, wich means the quantity of the lithium battery cells (3 beeps for a 3 cells LiPo).
- A long beep tone emits meaning the throttle lowest point has been correctly confirmed. Your ESC's are now well calibrated and ready for test.
- Type 2️⃣ to launch test function. This will send 0 to max throttle to ESCs : you must see your motors starting to run with increasing speed, then stop when maximum speed is reached.