ESC calibration help
-
Hi, we're trying to calibrate the ESCs per the calibration instructions, but we're running into some challenges and the calibration results do not look correct (at least when compared against the reference in the calibration documentation).
Here's some info on our setup:
- Custom quadrotor frame
- VOXL 2 running v1.4.5 of the VOXL SDK
- VOXL ESC FPV 4-in-1 (M0138)
- Lumenier Zip V2 Cinematic Motors (1050KV)
- HQProp 8x4x3 3-blade Propeller
- 6s battery
We're using v1.5.2 of the voxl-esc-tools directly running on the VOXL 2 to do the ESC calibration. The ESC's were running v39.00 FW, but when I upgraded to v39.20 FW today, I noticed the same behavior.
For the starting calibration file, we've use both the Starling 2 MAX calibration parameters (see
/usr/share/modalai/voxl-esc-params/D0012_Starling_MAX/esc_params_m0129_f2203_5_1500kv_7x3.7x3.xml
) and the low KV calibration parameters as starting points (see/usr/share/modalai/voxl-esc-params/low_kv/mn4006_m0134_6_low_kv.xml
) as starting points but made sure the following fields were changed to match our motors and battery:vbat_nominal_mv
= 22200num_cycles_per_rev
= 7 (the Lumenier is a 14 pole so 7 pole pairs)motor_kv
= 1050
We calibrate from 10% - 95% per the instructions, but no matter the ESC/motor, the calibration process maxes out at around 60 - 70% power (11k - 13k RPM).
Here's a link to the calibration results on ESC 2 when using the Starling 2 MAX cal params as a starting point (with the mentioned changes to match the motors and battery):
cal results (Starling 2 MAX)And here's a link to the calibration results on ESC 2 when using the low-KV cal params as a starting point (with the mentioned changes to match the motors and battery):
cal results (low KV)You'll need to download the HMTL files to view them locally.
As stated earlier, it looks like the power only goes up to 60 - 70%. It also looks like the voltage command inputs are "overlapping" leading to the same resulting RPM output and there's not as many distinct RPM values as seen in the reference in the documentation. We notice this on all 4 ESCs. I shared the calibration results for ESC 2 since it provides the current output as well.
Does anyone know what might be happening here and what needs to be done differently? Let me know if the calibration parameter files we used initially are needed. Thanks!.
-
@victochen , can you please tell me the exact calibration command you are running on voxl2?
From the following plot, i see an issue that looks like the clock is being stretched and the intervals between the calibration steps are getting longer and longer. I will double check this to make sure it still runs fine on my test setups.
Alex
-
@Alex-Kushleyev We're using the calibration example command referenced in the documentation:
./voxl-esc-calibrate.py --id 0 --pwm-min 10 --pwm-max 95
-
@victochen , i just did a quick test using the
voxl-esc
tools from thedev
branch (latest) and the results look good (although this is a different motor/prop). My test was running on a Linux PC, not VOXL2. I am going to try running it on VOXL2, however, do you have ability to try the calibration on a linux PC? Initially, i would still limit the max power to like 60-70% until you can get the tool actually working properly. I am not sure what's going on. You should only see one set of green dots in the RPM vs Time plot (one set per transition). Like you see in my plot. In your plot, there are multiple groups of green dots at the same power / rpm level, which suggest the test script is not working as intended. The green dots represent the values at the end of the transition, which are used for the data analysis (to avoid the transients).https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/tree/dev/
-
@Alex-Kushleyev I'll work on trying out the calibration script running from a Linux PC instead of directly in the VOXL this afternoon.
In the meantime, do you have any feedback regarding the starting calibration file? We followed the instructions as close as possible:
- specifically, make sure that num_cycles_per_rev is correct (usually 6 or 7 corresponding to number of pole pairs), otherwise RPM will not be calculated correctly
- set vbat_nomival_mv to nominal battery voltage
- leave other parameters the same, as they may not be known
We set the
num_cycles_per_rev
based on the 14-poles of our motor and thevbat_nominal_mv
for the 6s battery that we're using, but we also set themotor_kv
value to match the value of the motors.Does the
motor_kv
value make any difference if just using the calibration script?We've reviewed other forum posts regarding ESC calibration as well as the instructions for the low KV ESC calibration (even though our motors aren't necessarily low KV). Both the posts and the low KV instructions mention setting the
kp
andki
to 0 and even setting thepwm_vs_rpm_curve_a...
values to 0 to disable the RPM control. Does this matter when just doing calibration with the calibration scripts?Thanks, I'll provide an update once we're able to run the calibration scripts on a Linux machine instead of directly on the VOXL.
-
@Alex-Kushleyev We were able to change our setup to calibrate with a Linux PC directly connected to the ESC. The calibration results look much better.
Here's the calibration results for ESC 2 with the current output as well:
https://drive.google.com/file/d/1jXxyAO6eBfVzh6qAuWCJVFvE2Dsa1sZX/view?usp=drive_link
For reference, the Linux PC has Python 3.12.3 (it's actually a Windows PC running Ubuntu 24.04 via WSL).
The VOXL2 has Python 3.6.9 on it. Do you think this difference in behavior is because of the Python version or possibly the VOXL CPUs being too bogged down when running the calibration script directly on it or possibly something else.
Appreciate the help on this. I'll follow up if we have issues with flying our drone with the updated calibration.
-
@victochen , your latest calibration curve looks good! 62A steady state at full power (single motor), not to mess with!
If you are going to push the ESC hard, you should watch the ESC temps (reported in PX4
esc_status
topic). Depending on your average current draw, you may need significant cooling of the ESC (the ESC may be thermally limited, not limited by current capacity). technically speaking if your ESC runs hotter than 120C, that is a red flag (the MCUs on ESC are technically rated for 125C, and will likely run fine at higher temps, but that is just not a good practice to run them this hot). I typically recommend keeping the ESC below 90C in steady-state for good practice. Personally, my preferred temps are much lower (60-70C max), but that is way below the rated specs and obviously depends on the application.Also, did you calibration using the suggestions for the low-kv motors, or not? I would not consider 1000kV low, necessarily. Increasing the commutation advance per those instructions can reduce the efficiency (and heat up the motor a bit more).
Also, i am not sure if you have changed the RPM controller gains at all - i would suggest starting soft first, maybe even set kp and ki to 0. Setting the RPM controller feedback gains too high could create issues if you have IMU noise from vibration, so it's good to start off with less aggressive RPM control and then increase the gains as you gain more confidence (which will allow to do better attitude control of the drone with updated attitude controller gains). Starling 2 MAX ESC gains were pretty soft, so you could start with that as well.
When you update the PX4 params (assuming you are using PX4), make sure that you update the ESC RPM limits for the
voxl_esc
px4 driver.Regarding running the script on VOXL2, i did not yet get a chance to try it, but it should work the same.. it was previously tested. I will test it out and will report back..
Alex
-
@Alex-Kushleyev Appreciate the suggestions and recommendations, especially about the ESC temps. I saw the >60A current draw in the calibration results and informed the team last night so we're going to be cautious on the first flight.
I did use the low KV initial calibration params but I'll likely use the Starling 2 MAX ESC gains as a starting point per your recommendation.
If I have any additional questions or updates, I'll post here.
Thanks again for the help!
-
@victochen , sounds good, feel free to ask more questions.
The 62A current draw (1.3KW!) for one motor is probably OK for motor to sustain for a short period of time, but my guess is that the motor itself would overheat pretty quickly. Unfortunately I could not find any test data about this particular motor, which is unusual.
If we knew the propeller's thrust vs rpm, you could estimate your hover power draw right from this calibration plot (knowing the weight of your drone).
In any case, after you do a short first flight, you should analyse the log data, if you are using PX4, you can use
flight-review
to view the PX4 logs. Additionally, we maintain our own version of the flight review analysis tool, which includes some VOXL2 specific updates including all the ESC data (commanded and actual rpms, etc). You can find the fork offlight-review
and instructions how to use it locally on your machine here : https://github.com/modalai/px4-flight-reviewThe total current (as the FPV ESC does not measure the individual motor current), will be reported in the
battery_status
message in the PX4 log and is viewable using flight-review (there is a section for battery voltage / current).Also just to give you an idea of M0138 performance (and you can reproduce these tests), here is a test of 4 2207 motors with 5x4x3 props, 6S battery, spinning at 25K RPM (in closed loop RPM control mode) with full airflow cooling of the ESC. You can see the the ESC temp(s) go up pretty quickly, but this particular test was pretty short, i think i did not want to cook the motors, since ESC temps were still fine. The ESC is pulling around 125-130A total in this test and the performance is stable. You will notice two temperature bands in the 4 temperature measurements because these temps are reported from different locations (the higher temps are from the MCU's built-in temp sensors, which run a bit hotter due to MCU power consumption) and the lower two temperature measurements are from dedicated temperature sensors located next to the Mosfets (top and bottom of board).
voxl-esc
tools provide the tools to perform this analysis on the bench pretty easily and find out how your propulsion system is stressed under different conditions. You can also get similar logs from flights / px4-logs for real use case analysis.Finally, our ESC driver in px4 supports warning and critical temperature limits, which will send out warnings to QGC if those limits are reached. The limits are disabled by default, but you can enable them with params: https://github.com/modalai/px4-firmware/blob/voxl-dev/src/drivers/actuators/voxl_esc/voxl_esc_params.c#L238 . However, i am not 100% sure of the behavior of PX4 if ESC reports critical temps, it could enter some failsafe mode, or something like that - you should double check that, if you enable these warnings.
Alex