You are here

Handbrake when activating brake standstill

17 posts / 0 new
Last post
Pimousse
Offline
Last seen: 2 months 11 hours ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 101
Handbrake when activating brake standstill

Hi Ben,

While standstill, if sensors are present and brake applied, is this possible to switch to PID_POS to apply kind of handbrake to the board ?

Could be very convenient when boots are strapped like on an eMTB and waiting for green light. Sometimes, the board still go slowly forward even with brake applied.

Let me know if it's an interesting fetaure to you or if it's already doable with some tweaks in VESC Tool.

Thanks for your work,

Clèment

Chad Austin
Offline
Last seen: 2 years 11 months ago
VESC Original
Joined: 2017-06-08 15:17
Posts: 4

YES PLEASE i have the same problem that would be great to have that fix !!!

benjamin
Offline
Last seen: 1 week 2 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

I agree that this would be useful. Added to todo list:

http://vesc-project.com/node/110

Implementing it with an encoder such as the AS5047 should work well, but even better would be if it also works with hall sensors only. Best is probably to go to speed control mode and set a 0 speed goal and use the I part to get rid of slow rolling.

Pedrodemio
Offline
Last seen: 2 years 2 months ago
VESC Original
Joined: 2017-08-02 00:38
Posts: 11

Would not to be possible to implement it in a non-sensored setup with an iterative approach? A current X is applied while the BEMF is monitored, if a voltage is detected the initial current X is increased until no voltage is measured, meaning that the motor has stopped. The board would first roll a bit until the VESC determines the current needed to remain stationary in given situation, but is better than nothing

Or the BEMF generate by such slow revolution is too small to be detectable?

Or the Handbrake current could be setup in VESC tool, full brake would apply a current set by the user. This would use more energy since in most situations more power than needed would be used, and maybe the motor would heat up too much

wdaehn
Offline
Last seen: 2 years 5 months ago
Joined: 2017-09-12 17:26
Posts: 65

I would like to vote for this as well, Hall Sensor Mode. 

As I wrote a while back, mine is a CableCam. At speed=0 (and with Speed Controller's Minimum ERPM set to 0) I would expect the Cablecam to stay put where it is, even if the rope is going uphill. 

https://www.youtube.com/watch?v=VLPpT_wAVdM

 

A poor man's solution and one that would work in all modes would be to energize one phase with a default amount of amps. If you guessed it right it will hold the position, if the value is too high you waste energy. The better approach is of course to blend in the positional logic at speed=0 to hold the current position with the energy required at of this moment. 

 

PS: Just bought a Vesc6 because of how nice it works with the 4.11 hardware. Good progress!

wdaehn
Offline
Last seen: 2 years 5 months ago
Joined: 2017-09-12 17:26
Posts: 65

The VESC tool has something like a Handbrake current to play with. Isn't that exactly what I look for as poor man's solution?

So as soon as the requested speed falls below the minERP value, I set the Handbrake instead. 

What does the handbrake actually do? As simple as I said to energize one phase? Or more advanced so it also checks if the motor is turning although handbrake is on? My fear is the transition from moving with minERPM. to standstill. If the handbrake current is not high enough to stop the motor immediately, it will turn. First decelerated by the magnetic field and once it went over the peak field level, it gets accelerated.

Any input?

wdaehn
Offline
Last seen: 2 years 5 months ago
Joined: 2017-09-12 17:26
Posts: 65

@bejamin: Here as well the question of how you would impement the handbrake logic you have in your TODO list. 

Goal is: when PID Speed = 0, the motor shall not move even when you are standing on a not-horizontal street. 

wdaehn
Offline
Last seen: 2 years 5 months ago
Joined: 2017-09-12 17:26
Posts: 65

An update on my current experiments and more questions....

 

For braking in general there are multiple options

  • regenerative braking - high speeds only
  • active braking, by energizing the "wrong" windings compared to driving the motor
  • short circuit all three motor phases - not zero speed but a strong brake momentum even at lower speeds
  • position control - controlling the magnetic vector
  • energize one winding to create a holding momentum - either with constant amps or dynamic adjustment on the amps to avoid energy waste - a poor many position control.

 

My current implementation:

I use the PID speed control mode of the VESC, have configured the min-eRPM to 100. As any value below that is considered a zero speed and that means free wheeling, at speeds lower than that the only option I have is to switch to other commands and actively stop the motor.

You could send a handbrake command for example. The result of that will be a constant amount of power is applied to one winding, creating a strong magnetic field and thus locking the motor at that position. Unless the kinetic energy of the skate board, the person riding it and the speed at 100eRPMs is greater than the magnetic field of the motor. It usually is. In that case the effect is zero, because the magnetic field decelerating the one pole is accelerating the next. You get an uneven movement but the braking momentum in average is zero.

 

At minute 1:24 you can see that in action, handbrake with 10A. 4 pole motor and 1:5 gear.

Hence I have built in the following strategy:

  1. Read the motor tacho/rpm and if the value is >40/sec then engage the current brake to reduce the speed to a crawling.
  2. Only once that low speed is achieved, then send a handbrake signal with 15A.
  3. If the braking was successful, reduce the amps of the handbrake down to 10A.
  4. If the tacho does change, increase the handbrake amps again up to 15A.

This is obviously not perfect. For once the transition from PID mode to braking to handbrake is uneven. You can see that in above video. But if the PID mode would allow min-eRPMs of zero and implement a logic like the above, this would be solved.

My main concern however is the power consumption. As you see in above's video, the 10A is not soo much. If the rope/street is not horizontal but steep, it would certainly not be enough. But a constant application of 10A means a 5000mAh battery is drained after 30 minutes of standing still. That's a lot of power wasted for doing essentially nothing. 

Position control should be the same as above because it essentially is. With finer resolution maybe and inbuilt adjustment of the amps but from a power consumption point of view it would suffer from the same problem.

 

My current thinking is, a PID=0 speed should result in an extremely slow movement, not a stand still. Slow enough so that it does not hurt. Enough hall sensor signals for the position control to work.

 

Do you have any insights that contradict my findings or better ideas? 

 

 

PS: Is there a command to short circuit all three motor phases? Would like to see how much brake momentum that generates.

 

 

wdaehn
Offline
Last seen: 2 years 5 months ago
Joined: 2017-09-12 17:26
Posts: 65

Any update on this enhancement request for Speed=0? I need to jump through a lot of hoops in order to workaround it.

Per my finding, the combination of tacho speed and handbrake is all you need. This would allow to set the minERPM to 0 and to get a decent brake force when setting s PID=0 speed.

 

Downsides of my current implementation are

  • Engaging the handbrake makes the motor jump by a few degrees as it powers one coil, the closest given the current rotor position but still.
  • There are three stages currently: speed>minERPM; speed<minERPM; handbrake. But you want two stages only, motor moving or not moving. Currently, as soon as the speed is below minERPM the VESC does brake but not stop. And then you engage the handbrake to stop. Therefore the transition from moving to stopping is not as smooth as it could be.
  • How much power to apply in order to hold the position cannot be dynamically adjusted.
  • If the handbrake is not strong enough, you need to transition back to regen braking. Not that smooth either.

 

 

 

 

photokopter
Offline
Last seen: 1 year 9 months ago
Joined: 2017-08-23 11:35
Posts: 4

@Benjamin
Can you tell me when the handbrake will be implemented?
We urgently need it for the Cablecam

willyfan
Offline
Last seen: 4 years 5 months ago
Joined: 2018-01-04 14:14
Posts: 7

@Benjamin
Any news about handbrake? It is very useful for many applications...

Chad Austin
Offline
Last seen: 2 years 11 months ago
VESC Original
Joined: 2017-06-08 15:17
Posts: 4

Handbrake mode PLEASE !!!!!!!!!!

photokopter
Offline
Last seen: 1 year 9 months ago
Joined: 2017-08-23 11:35
Posts: 4

@benjamin
please give us an answer.
We have been waiting for an answer for almost a year now.
If it should not work, no problem, but then at least I know about it.

Chad Austin
Offline
Last seen: 2 years 11 months ago
VESC Original
Joined: 2017-06-08 15:17
Posts: 4

Yes please I would really like the handbrake function for my trampa electric mountain board ! Me and everyone who has one needs it !

hans_maier
Offline
Last seen: 3 years 7 months ago
Joined: 2019-05-18 22:31
Posts: 21

This feature works now with the Wand remote.

Pimousse
Offline
Last seen: 2 months 11 hours ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 101

This is not really a handbrake but it may be enough for the most of us. :)

But in the case of Photokopter, I'm not sure it's satisfaying him.

frank
Offline
Last seen: 6 days 16 hours ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 846

The feature can be adjusted to very little RPM. You can find it in the APP settings. It is called smart reverse.