Apart from tuning PID, you should also tune BLHeli settings on your ESC to achieve better flight performance with your FPV drone. In this article I will share my BLHeli_32 configurations that I use which give me the best results, and explain what they do.
If you don’t want to read the long article, here is the summary. However stock settings or a fixed set of settings might not work on every build, you should really “tune” it.
- PWM Frequency: 48KHz for freestyle; Default (or higher) for racing
- Motor Timing: 22 or Auto for freestyle; 25 (or higher) for racing
- ESC Protocol: DShot600 for 8K/8K, or DShot300 for 4K/4K (Looptime in Betaflight)
- If you have ESC desync, try to set Demag to High, high Motor Timing, lower Rampup Power
If you are using the latest firmware (32.8 or newer), you can try Variable PWM frequency by setting PWM Frequency Low to minimum (as low as it can go), while setting PWM Frequency High to maximum (as high as it can go).
I will go into a bit more detail what each setting means.
The “PWM Frequency” setting in BLHeli_32 changes how often the microcontroller (MCU) in the ESC sends updates to the MOSFET. This basically means how often the ESC drives the motor. This PWM setting is entirely unrelated to ESC protocol, FC looptime or the PWM frequency setting in Betaflight.
The default value for PWM Frequency in BLHeli_32 is 24KHz. By raising it to 48KHz you should notice an improvement in the smoothness of your flight performance right away.
When you increase the PWM frequency, the motors should run smoother and tend to generate less noise. It solves “mid throttle oscillations” in many cases, some even claim their motors come down cooler as well as getting longer flight time thanks to the improved efficiency.
96KHz is also possible in certain ESC’s.
Why does higher PWM Frequency help reduce vibrations?
At lower PWM frequencies, there can be some aliasing/conflicts between the commutation rate and the PWM update rate.
Commutation rate is the time it takes to detect a zero crossing and switch through one feedback cycle, there are 6 commutations per one eRPM, so it is tied directly to RPM
This can result in some odd vibrations or roughness at certain throttle positions. Raising the PWM frequency to the FETs can move the harmonics where this happens outside the range of the commutation rate.
Downsides of Higher PWM Frequency
So why is the default not 48KHz then? Well, because there is no free lunch!
Higher PWM frequency gives you smoother flying experience at the expense of a little power loss (just a few percent). Because of this, higher PWM can reduce peak current draw slightly too, which isn’t necessarily a bad thing for the longevity of the ESC.
At higher PWM Frequency, the torque at low RPM can also be reduced slightly and so your low end throttle might feel softer and less responsive. It can also slightly decrease prop wash handling.
For racers who want to have all the power and responsiveness available, might actually prefer lower PWM frequency such as 24KHz. Lower than 24KHz is not recommended.
If you are a perfectionist, you can give 48KHz a try, then slowly back it down to find the perfect middle ground between power and smoothness. Every setup is different.
Variable PWM Frequency
Since version 32.8, Variable PWM Frequency is now possible, it changes with the throttle position, i.e. it uses lower PWM Frequency when throttle is low, and uses a higher PWM Frequency when throttle is high.
This gives you the best of both worlds. When your throttle is low, it gives you higher torque and better stability. As you increase throttle it gives you better smoothness. The minimum and maximum PWM frequency depends on your particular ESC. For example with the Tekko32 F3, the range is between 48KHz and 96KHz.
You may want to retune PID after setting this.
By setting both low and high to the same value basically disables it, and you have a fixed PWM frequency.
The default Motor Timing in BLHeli_32 is “16 Deg”, which seems to work just fine for the majority of builds. However I always increase it when I am configuring my ESC.
Generally speaking, a higher motor timing is less likely to have “desync” issues. Increasing motor timing also increases the power of your motor at the expense of efficiency.
If you set Demag to high, setting motor timing higher is great as it helps to gain some of the performance back.
If you’re after raw power, you can try setting motor timing to around 25, or maybe even slightly higher. I don’t recommend using max settings just in case of unexpected problems. When the timing is set too high for a motor, it will tend to run hotter, this increases the likelihood of burning out a motor in a crash, or when something stops your motors from spinning freely.
For a good balance between power and efficiency, 22 seems to be a good value to get started. For a mini quad, it’s unnecessary to set motor timing lower than the default, unless you are driving a huge motor and propeller (e.g. 10″).
The optimal motor timing value can actually change with motor RPM, so if you are unsure you can just use the “Auto” option, which lets the ESC decide what motor timing to use on the fly. Generally, the auto option provides a good middle ground between efficiency and power through the whole throttle range.
Personally I haven’t seen a huge difference when swapping motor timing settings between Auto and 22, but give it a try and let me know in the comment which setting works best for your setup.
Regardless of the differences in performance, DShot is indeed more CPU intensive. This has been the reason for some to opt for Multishot, to allow more processing power to run the “ultimate” 32K/32K Gyro sampling and looptime.
Anyway, give both protocols a try if you want to experiment. Personally I feel very minimal difference in performance between the 2 protocols, but when using DShot:
- I don’t have to worry about ESC calibration (calibration doesn’t do anything when running DShot)
- I use ESC beacon which relies on DShot command
- You need DShot in order to use ESC Telemetry
- Betaflight 4.1 recommends DShot300 for RPM Filter when running 4K looptime, or DShot600 for 8K/8K
This setting can help reduce “desync”. Just leave the setting at default unless you have desync issues, otherwise change it to high. (what is ESC desync)
High power builds (e.g. 6S or hexacopters) that suffer from electrical noise may benefit from setting demag to High, but in most cases Medium is fine.
You might experience performance losses by setting it to high, as it’s basically backing down acceleration in order to reduce current spikes and noise.
Rampup Power can be used to reduce current spikes due to the sudden increases in throttle by limiting the change of power. It’s previously known as Startup Power in older BLHeli version.
If the motors are pushing close to the limit of your ESC’s, current spikes from punch-outs could inflict damage, reducing Rampup Power can lessen this risk.
Leave it at default if you are unsure, but you can tune it and make your quad fly better, but note that setting it too low can lead to slower motor response, and too high can lead to noisier quad and hotter motors. Personally I don’t normally touch this unless I have ESC desync issues, or excessive electrical noise.
Larger quads (e.g. 7 inch or bigger) might benefit from slightly higher rampup power as it pushes the motor harder when it’s trying to gain RPM, giving you more responsive and powerful feel. However note that high rampup power can make your motors run hotter too, so you should keep an eye on motor temp when increasing it.
For smaller builds (e.g. 3″ or smaller), if you are suffering from too much noise and there is no other solution, you can try decreasing rampup power. Lower it just a little each time, until you notice a difference in performance, then back off. For most builds it’s not even noticeable when you lower it to 25% (50% is the default).
On long range builds, you probably want to lower it for better efficiency if you don’t need all that motor responsiveness.
Current protection limits the amperage passing through the ESC. The purpose is similar to Rampup Power, but the Current Protection setting is more specific on current limit.
I recommend leaving this setting to off (default), unless you know what you are doing.
Potentially this can be used to protect your ESC from “burning” due to current spikes, crashing and desyncs. But as long as the current rating of your ESC meets the requirement, you shouldn’t need to worry about it.
Dead time in BLHeli is the time interval between each PWM pulse that the ESC will just shut off power to the coil. Dead time is to make sure there’s no overlap when trying to push current to the coil so it can get discharged before the next pulse.
If dead time is too short your motor will get really hot, however if it’s too long it reduces braking torque (especially in higher throttle level), results in less responsive performance.
How about the Rest of the Settings?
For mini quad? Just leave them to default :) A lot of these settings are for fixed wings and planes.
- Jun 2018 – Article created
- Nov 2018 – Added Demag Compensation
- Feb 2019 – Updated Rampup Power and Current Protection
- Jan 2020 – Revised
- May 2021 – Added info regarding new feature, variable PWM Frequency