ESC32 V2 Calibrations
To use all AutoQuad ESC32v2 features calibrations are required. The calibration meassures and calculates drive characteristics and must therefore be performed for every different motor, propeller and voltage (LiPo cell count) combination.
On a ESC32 V2, there are two different calibrations, the current limiter calibration and the feed forward calibration.
The current limiter calibration is required for the virtual current limiter which performs better than the standard PI controller.
The feed forward calibration is required for the closed loop control modes (RPM and thrust).
You can find more info on ESC32 Current limiter calibration here
- Attach your motor with prop on a non movable surface and make sure the motor is attached so it can’t move.
- Use fresh lipo’s
- use the prop you intend to use otherwise the data will not be valid.
- Be careful!!! both calibrations will ramp up the motor output to max so use a wide open space without audience presence.
Calibration with QGroundControl
To set the maximum current to use in the calibrations you can adjust the default (20A) to any number.It will probably be good practice to start low and watch the first calibration. If you table, motor and room is still intact you can set a higher number.
The calibration will now start and take some time. The calibration sequence will ramp up the duty cycle in several steps and measure rpm, current, duty cycle and voltage.
It can produce output like this if you graph the data (next versions or if you use the linux version with plplot). In the current QGCS a comma separated file is generated in the QGCS directory that can be imported into a spreadsheet program.
|You have to manually enter the calibration data in your other esc32’s.|
Calibration via command line (Ubuntu)
When using the QGCS, the executables for calibration are in the software, but when using the commandline binaries on linux or OSx you need to compile them.
- ESC32 source on the google code page
- eigen3 development library for your distro
- plplot development library for your distro
Install the required packages
sudo apt-get install subversion build-essential libplplot-dev libeigen3-dev
Add the current user to the dialout group to run esc32Cal as normal user
sudo usermod -a -G dialout $USER
After the next login esc32Cal can be run as normal user.
Checkout the latest ESC32 code
svn checkout http://esc32.googlecode.com/svn/trunk/ esc32
Edit Makefile (esc32/ground) to adapt Eigen3 library path
esc32Cal.o: esc32Cal.cc esc32.h
$(CC) -c $(ALL_CFLAGS) esc32Cal.cc -I/opt/local/include -I/usr/include/eigen3
Note: The warnings can be ignored!
|–cl||Current Limiter calibration|
|–r2v||Feed Forward calibration (RPM to Voltage)|
|-a amps||Limits current during calibration|
|-p device||USB to TTL converter port|
|-b baud||Baud rate|
|-t file||Telemetry output file|
The device port (-p switch) must be set and depends on the used converter (“dmesg” can help to indetify the port). It’s important to limit the maximum current (-a switch) to match the drive combination (motor/propeller/voltage). A value to high can burn the motor or ESC! Ctrl+C can be used to terminate esc32Cal.
Current Limiter calibration
./esc32Cal --cl -p /dev/ttyUSB0 -a 15
At the end of the calibration the CLxTERM values are displayed:
#define DEFAULT_CL1TERM +3.358974e-01
#define DEFAULT_CL2TERM +1.124178e-03
#define DEFAULT_CL3TERM +3.390607e-02
#define DEFAULT_CL4TERM -3.829096e-05
#define DEFAULT_CL5TERM +1.367444e+00
Feed Forward calibration
./esc32Cal --r2v -p /dev/ttyUSB0 -a 15
At the end of the calibration the FFxTERM values are displayed:
#define DEFAULT_FF1TERM +8.008604e-08
#define DEFAULT_FF2TERM +1.249541e-03