Skip to content

Getting Off the Line Quicker (maybe)

Adrian Blakey edited this page May 25, 2024 · 6 revisions

If you are looking for an advantage, then perhaps you might like to try and tune some values to give yourself a faster launch - but be careful.

When a motor spins up, maximum duty cycle is limited to 10% by default before a full synchronized revolution is reached, i.e. 6 sync'ed commutations have commenced. The currently recommended version of the firmware sets this at 25%.

If you want to give the motor more power to get going - increase duty_spup. Increases up to about 20-25% might have an effect.

But be careful - as a stuck rotor will lead to instant motor overheating.

It's important that increased duty_spup has much less effect under load.

When you do this - ask yourself: Why do you want to override duty_spup? Is it not alright for a motor to sync on moderate power?

Higher values also degrade smooth spinup most of the time because the motor tends to desync right away and stutters longer. Another option is freq_min which is 24kHz by default. Setting freq_max to 48 can help reduce current ripple.

The default acceleration ramp, duty_rate value is 25 (conservative 2.5%/ms) which leads to 100/2.5=40ms from 0% to 100% throttle. This can be easily increased. The maximum value is 100, i.e. 10%/ms.

In a real life situation, a motor with a relatively significant load simply can't reach maximum RPM in just 40ms. Increased acceleration ramping might speed it up a bit, but with a progressively diminishing effect, so care must be taken. On the other hand, too rapid a power increase often leads to desyncs in some bigger motors (not our case). That is why the default value of 2.5%/ms is a conservative as a one size fits all value.

Why and how would you want to override duty_rate? Isn't it alright for a motor to reach its maximum RPM in 40ms (with no load)? If it's not, then what time is okay? 30ms, 20ms? Do the calculation and go from there.

This blog post is a good primer and might provide some more insight.

Clone this wiki locally