Vesc duty cycle issue

thomasrtg

1 mW
Joined
Sep 17, 2020
Messages
10
Hi everyone,

I am using a vesc on two of my projects with the same issue.

I use the throttle in duty cycle as I feel it more natural and also because it has more torque on startup than in current mode at full throttle.

By doing so, when I stop accelerating, the vesc understand "0 rpm" command, and thus brake with the maximum motor current set.

I tried to set the current to 0, however by doing so the motor is behaving ultra weirdly and try to spins the wheel backwards at extremely low rpm. It is very noisy and does not make a good sound, like when you invert hall sensors wires for example.

Do you have any suggestions on how to properly set the throttle?
 
I use the throttle in duty cycle as I feel it more natural and also because it has more torque on startup than in current mode at full throttle.

This cannot be right - there should be no difference provided max phase current is the same... except maybe less less of a 'soft start'? You can simply play in the settings.

By doing so, when I stop accelerating, the vesc understand "0 rpm" command, and thus brake with the maximum motor current set.

Also, duty cycle mode desigend to behave exactly like you describe. 'This is not a bug, this is a feature'.
Basically, Duty cycle mode is like your typical 'voltage throttle', but with automatic braking when you back off the throttle. It is designed for e-boards, not e-bikes. Also, great for pedal generators and works wonderfully as 'smart cruise control' as a toggle.

You just using it wrong.
 
BalorNG said:
I use the throttle in duty cycle as I feel it more natural and also because it has more torque on startup than in current mode at full throttle.

This cannot be right - there should be no difference provided max phase current is the same... except maybe less less of a 'soft start'? You can simply play in the settings.

By doing so, when I stop accelerating, the vesc understand "0 rpm" command, and thus brake with the maximum motor current set.

Also, duty cycle mode desigend to behave exactly like you describe. 'This is not a bug, this is a feature'.
Basically, Duty cycle mode is like your typical 'voltage throttle', but with automatic braking when you back off the throttle. It is designed for e-boards, not e-bikes. Also, great for pedal generators and works wonderfully as 'smart cruise control' as a toggle.

You just using it wrong.


HI, and thanks for your reply,

I didn't say it was a bug, I understand that I'm not using it the right way.
However when I set the regen current to 0 in duty cycle, why the motor is behaving so weirdly? I need to set it to -20A otherwise it behaves extremely weirdly.

Ok I will play with the settings then, you're right, it doesn't have less torque but the start is softer in current mode than in duty cycle.

I tried current mode, exponential curve a +100%, accelerating ramp 0 ms. It is better, but still feels softer than the duty cycle mode.
 
thomasrtg said:
BalorNG said:
I use the throttle in duty cycle as I feel it more natural and also because it has more torque on startup than in current mode at full throttle.

This cannot be right - there should be no difference provided max phase current is the same... except maybe less less of a 'soft start'? You can simply play in the settings.

By doing so, when I stop accelerating, the vesc understand "0 rpm" command, and thus brake with the maximum motor current set.

Also, duty cycle mode desigend to behave exactly like you describe. 'This is not a bug, this is a feature'.
Basically, Duty cycle mode is like your typical 'voltage throttle', but with automatic braking when you back off the throttle. It is designed for e-boards, not e-bikes. Also, great for pedal generators and works wonderfully as 'smart cruise control' as a toggle.

You just using it wrong.


HI, and thanks for your reply,

I didn't say it was a bug, I understand that I'm not using it the right way.
However when I set the regen current to 0 in duty cycle, why the motor is behaving so weirdly? I need to set it to -20A otherwise it behaves extremely weirdly.

Ok I will play with the settings then, you're right, it doesn't have less torque but the start is softer in current mode than in duty cycle.

I tried current mode, exponential curve a +100%, accelerating ramp 0 ms. It is better, but still feels softer than the duty cycle mode.

Well, because you are asking impossible from a motor - braking with zero current. It gets crazy trying to implement this :)
Unless you are willing to dig into the code yourself, just use more conventional controls... in theory, duty cycle should NOT behave differently so far as torque delivery is concerned, maybe you've missed some setting after all?
 
scianiac said:
I'm curious if there is a way to switch between throttle modes on the fly or even have two different throttles set to different modes, I can see situations where this could be useful.

Absolutely possible with UART control. I have such a setup, in fact... not two throttles though (I don't have even one), but a two-position switch, one with duty cycle cruise mode, and other 'virtual freewheel' that feeds the motor low current to compensate for cogging during pedalling.
 
ferret said:
BalorNG,
sound very interesting.
Can you explain how to set up a virtual freewheel on a VESC?

Thanks,
Avner.

Just command constant current with UART, as much as want basically, but preferably around 1A that is usually around what typical motors draw. Above that is basically assist :)
 
BalorNG said:
thomasrtg said:
BalorNG said:
I use the throttle in duty cycle as I feel it more natural and also because it has more torque on startup than in current mode at full throttle.

This cannot be right - there should be no difference provided max phase current is the same... except maybe less less of a 'soft start'? You can simply play in the settings.

By doing so, when I stop accelerating, the vesc understand "0 rpm" command, and thus brake with the maximum motor current set.

Also, duty cycle mode desigend to behave exactly like you describe. 'This is not a bug, this is a feature'.
Basically, Duty cycle mode is like your typical 'voltage throttle', but with automatic braking when you back off the throttle. It is designed for e-boards, not e-bikes. Also, great for pedal generators and works wonderfully as 'smart cruise control' as a toggle.

You just using it wrong.


HI, and thanks for your reply,

I didn't say it was a bug, I understand that I'm not using it the right way.
However when I set the regen current to 0 in duty cycle, why the motor is behaving so weirdly? I need to set it to -20A otherwise it behaves extremely weirdly.

Ok I will play with the settings then, you're right, it doesn't have less torque but the start is softer in current mode than in duty cycle.

I tried current mode, exponential curve a +100%, accelerating ramp 0 ms. It is better, but still feels softer than the duty cycle mode.

Well, because you are asking impossible from a motor - braking with zero current. It gets crazy trying to implement this :)
Unless you are willing to dig into the code yourself, just use more conventional controls... in theory, duty cycle should NOT behave differently so far as torque delivery is concerned, maybe you've missed some setting after all?

In fact I would like the motor to be controlled in duty cycle when accelerating and as far as let go the throttle then I would like it to react a current controlled.
If it's not possible then that's too bad for me but what can I do about it 😅?
 
thomasrtg said:
In fact I would like the motor to be controlled in duty cycle when accelerating and as far as let go the throttle then I would like it to react a current controlled.
If it's not possible then that's too bad for me but what can I do about it 😅?

Well, and I would have loved to have it brake at certain RPM, but otherwise *draw* zero amps, but that would require getting into the source code and recompiling binearies, and I'm not ready for that yet.
If you find yourself doing just that, I'd love you send me binaries that do above as well, that would be trivial in comparison to setting up the coding environment :)
 
BalorNG said:
thomasrtg said:
In fact I would like the motor to be controlled in duty cycle when accelerating and as far as let go the throttle then I would like it to react a current controlled.
If it's not possible then that's too bad for me but what can I do about it 😅?

Well, and I would have loved to have it brake at certain RPM, but otherwise *draw* zero amps, but that would require getting into the source code and recompiling binearies, and I'm not ready for that yet.
If you find yourself doing just that, I'd love you send me binaries that do above as well, that would be trivial in comparison to setting up the coding environment :)

Unfortunately, I'm a mechanical engineer with no understanding in coding or real electronics 😢. I understand how stuff works, but not enough to code something for the vesc 😬..

Vba coding is my max (for some pretty badly coded excel's macro haha)
 
Back
Top