VESC not allowing feathered braking when going downhill slowly

General topics and discussions about the VESC and its development.
hohungyi
Posts: 15
Joined: 03 Jun 2017, 12:19
Location: Singapore

Re: VESC not allowing feathered braking when going downhill slowly

Postby hohungyi » 06 Jun 2017, 09:24

I'll give that code change a try! Thanks for the advice!

I haven't had the opportunity to test extensively the difference when values for max ERPM is adjusted, but there are many times in crowded streets going downhill when I will need to hold onto the brakes going at very slow speeds. It's always a little sketchy transiting from braking to neutral because I won't know when it will "release" into coasting mode, which will cause me to just accelerate down the hill. :(

I'll make the changes and report back if it works!

Thanks!

hohungyi
Posts: 15
Joined: 03 Jun 2017, 12:19
Location: Singapore

Re: VESC not allowing feathered braking when going downhill slowly

Postby hohungyi » 06 Jun 2017, 09:28

pf26 wrote:I don't think this is a good idea. FOC implementation and control is very different, especially for braking..
I don't understand why changing max ERPM settings has no effect. Maybe you can try to change the following function :
static void full_brake_ll(void) {
return; // Will prevent full braking
...


Just to confirm the code should be adjusted from:

static void full_brake_ll(void) {
state = MC_STATE_FULL_BRAKE;
ignore_iterations = MCPWM_CMD_STOP_TIME;
full_brake_hw();
}

to this:

static void full_brake_ll(void) {
return; //
}

Appreciate it if you could let me know if I'm doing it wrong haha.

Cheers!

hohungyi
Posts: 15
Joined: 03 Jun 2017, 12:19
Location: Singapore

Re: VESC not allowing feathered braking when going downhill slowly

Postby hohungyi » 06 Jun 2017, 09:43

Sorry for the multiple posts but I was thinking this as well:

void mcpwm_set_brake_current(float current) {
if (fabsf(current) < conf->cc_min_current) {
control_mode = CONTROL_MODE_NONE;
stop_pwm_ll();
return;
}

skipping to the end...

} else {
if (fabsf(rpm_now) > conf->l_max_erpm_fbrake) {
state = MC_STATE_RUNNING;
} else {
full_brake_ll();
}
}
}
}

changed to this:

} else {
{
state = MC_STATE_RUNNING;
}
}
}
}
}

pf26
Posts: 309
Joined: 28 Mar 2016, 14:37
Location: FR Valence

Re: VESC not allowing feathered braking when going downhill slowly

Postby pf26 » 06 Jun 2017, 18:13

Yes, I was meaning :
static void full_brake_ll(void) {
return; //
}
Actually, I think you could leave the lines after the returns - they will be ignored.

As for the other mod you propose, I don't know - Actually, I really don't understand why playing on the MAX ERPM parameter has no effect, so I am not so sure what the code really does at this point.
I really encourage you to use a current controlled lab power supply for the tests when you change the code this way.. I know it is not easy to go down a hill while in the lab, but at least you should try with a motor having large inertia.
Pierre

hohungyi
Posts: 15
Joined: 03 Jun 2017, 12:19
Location: Singapore

Re: VESC not allowing feathered braking when going downhill slowly

Postby hohungyi » 06 Jun 2017, 21:06

Got it! I'll give it a shot. Thanks!

Hummie
Posts: 110
Joined: 10 May 2016, 04:05

Re: VESC not allowing feathered braking when going downhill slowly

Postby Hummie » 07 Jun 2017, 02:06

are you sure its not just the transmitter? I've used transmitters that had trouble modulating brakes going downhill, the steez remote for one. have you tried the mini trigger it seems to have the best modulation for me.

hohungyi
Posts: 15
Joined: 03 Jun 2017, 12:19
Location: Singapore

Re: VESC not allowing feathered braking when going downhill slowly

Postby hohungyi » 07 Jun 2017, 04:55

Have checked the transmitter signal and it does not seem to be the issue! Tracking the realtime pulsewidth when testing and there was no drop off or lag in the signal when the full brake happened.

Jacobbloy
Posts: 7
Joined: 05 Feb 2016, 05:38

Re: VESC not allowing feathered braking when going downhill slowly

Postby Jacobbloy » 10 Sep 2017, 23:43

Did
static void full_brake_ll(void) {
return; //
}

Work to allow and stop the vesc going into full break at such low rpm?

VescBuilder
Posts: 1
Joined: 22 Nov 2017, 21:54

Re: VESC not allowing feathered braking when going downhill slowly

Postby VescBuilder » 22 Nov 2017, 21:57

Hi,

I have the same problem. Did you solve it?


Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests