VESC Brakes grabbing coming to stop

Still hate this “handbrake” thing.

Just set up my first FOC build and am joining this club. If anyone has any resources on exporting, editing and reloading an XML file with the VESC tool I would appreciate seeing them before I give it a shot.

In the PID Controllers section, reduce the value of “Minimum ERPM” and see if this fixes the problem. This value is used while braking, and if the current erpm is lower than this value, it switches to “duty cycle” mode and sets the duty cycle to 0 which I think causes this sudden sticky stop while doing low speed braking… Anyway, made it a lot better for me when i reduced this from 900 to 300, so you might wanna give it a try

2 Likes

Where does it switch to duty cycle mode?

image

Doesn’t that just switch according to some hard coded 0.03? s_pid_min_erpm doesn’t get touched unless you’re in speed control.

Still no solution to this?

Mine was slightly lessened when I changed from a 15T to 18T pinion… But it’s definitely still there.

8" wheels on dual focboxes.

This was also being discussed over here. @Deodand said he was going to look into it but I am sure he will be way too busy for while.

1 Like

I wonder if you could just lower the hard coded value in @tsr 's codeblock. If the controller isn’t actually losing sync, then brakes would be fine.

anyone willing to test? risk of losing brakes at low speeds

Hey! Thanks so much for the advice. I have been messing with that value and it a lot better. Still not perfect, but I feel a lot more comfortable coming to a dead stop now. Thanks for taking the time to reply and share your knowledge.

For anyone else looking in on this, I run 100mm wheels and have set it to 450.

This is on my todo list, FYI in FOC the setting described doesn’t do anything it is used in BLDC only. That hard coded value of 0.03 is a percent duty cycle (3%) and when your motors get there the controller in braking switch from current control to duty cycle control and this causes the dramatic transition

I know the problem and am working on a fix but with everything going on it will prob be a few weeks out.

7 Likes

Man, too much beer. Don’t mind me!

You are right about the 0.03% stuff. Actually checked this months ago and was in a hurry when I wrote my last reply. Anyway, maybe this value doesn’t change anything meaningful (or maybe only in speed control mode), but:its used in FOC as well:

We are talking about this field:

Right?

And here it is used:

Funny thing in my opinion is that, according to my understanding of the code, this should only affect speed control mode, because otherwise m_speed_pid_set_rpm is always 0 (only set to different values in mcpwm_foc_set_pid_speed) and I am running all my boards only on current control mode. Nevertheless braking behaviour seemed to change at low speed when I changed this value… Maybe I was mistaken and actually nothing changed, but I can’t test it currently because its too freaking cold outside - and testing braking behaviour on snow might also not be the best idea;)

Maybe this will help a little bit when you work on the fix.

2 Likes

Commenting to subscribe to this thread.

Bro, just click the thing in the bottom left to subscribe. :wink: :grinning:

image

1 Like

TIL

10char

I think this might be a placebo, but I will definitely investigate, as you say this parameter should only take effect in speed control mode so if it is effecting current control I would consider that a bug.

The normal behavior with the change in brake force is less of a bug and more of a poorly switched control strategy to handle very slow speed braking. Abruptly switched control strategies causes an abrubt change in braking force, amplified with certain motor/gearing systems. One solution I’ve been mulling over is a soft transition, start switching to duty control around 10% instead and compute both current control and duty control then linear map between the two as you go from 10 to 2 percent say. Need to look more into it all to see if such a thing would be possible.

3 Likes

How I imagine that riding sounds amazing. If you could acomplish what you describe, it would be like you coding free buckets of ice cream for the entire FOC community.

I can confirm that lowering it to 100 improved quite a bit the issue. I also reduced the deadband to 2% and now the dead stop is almost gone. I’m running 90mm wheels 6355 200kv motors on 11s3p. 40/-40 30/-7 motor/battery

I can confirm aswell! it does help a lot!