You are here

Independent Throttle on ADC1 and Brake on ADC2?

5 posts / 0 new
Last post
striderkent
Offline
Last seen: 1 month 4 weeks ago
VESC Free
Joined: 2018-12-17 22:56
Posts: 8
Independent Throttle on ADC1 and Brake on ADC2?

Hello,

Just getting started with the VESC. Working great!

 

I have configured an analog throttle on ADC1 and analog brake on ADC2.

The "issue" I'm seeing is that if the throttle is on the brake turns the throttle into a reverse variable brake. (Essentially acting like a brake button would).

I would like the brake on ADC2 to "cut" the throttle when the brake is activated and go into pure braking "mode".

In other words always have the brake act like a brake, regardless of what the throttle is doing. But with the condition that if the brake is on at all the throttle does not activate.

 

I don't think this is possible in the stock VESC tool controls?

 

If it's not...where do I start in modifying the firmware to create this configuration?

 

Thanks!

sam.vanratt
Offline
Last seen: 7 months 2 weeks ago
Joined: 2018-11-18 14:09
Posts: 83

Hi striderkent

what Mode did you chose in the settings and what are your brake values and what did you define under the trigger values.

I'm using a digital brake on ADC2, but it's working in analoge brake mode. Everything is working (just as you wish for), even when it took a lot of weeks to get to hardware problems out and understand what the modes really do.

I'm using a 1-4V HALL throttle which downsize the input voltage to 0,65-3,1V. As trigger values I'm using 0,7V-3,0V and as setting "Current no reverse brake ADC2". My ADC2 is (when triggered at 0V and without at 3,3V), so I inverted the input and used a pull up resistor so the trigger is not autotriggered by doing nothing (that took some time to understand). As trigger Values I have 0,5V and 3V for 0 action. Depending on your analog brake values you must trim the values so they fit. I'd not tell when the "stop anything on ADC1 when ADC2 gets active" is triggered (10% or 50% or 90%), but it works as it should.

Cheers

Sam

 

P.S.:I'm not really happy with the mode settings (Current no.....) as there's no real RPM control as I was used to before I changed to the VESC. I'll surely try further when I next  program the VESC

Pedelec usage in combination with a GoldenMotor MagicPie3 BLDC

striderkent
Offline
Last seen: 1 month 4 weeks ago
VESC Free
Joined: 2018-12-17 22:56
Posts: 8

Hello, I'm using Current No Reverse ADC2 Braking.

I have two analog (ADC) inputs driven by a hall effect brake control and hall effect throttle control.

"Trim" setup is easy using the wizard.

 

What I've figured out is that for a Direct Drive motor and two ADC controls the signal to the motor is the aggregate of the throttle and brake %. In other words if the brake is at -50% and the throttle is at 50% the motor is at 0% forward.

If the brake is at -80% and the throttle at 20% the net effect is -60% braking.

It's really not possible to brake and throttle at the same time when using regenerative braking.

What I've ended up doing is creating an external circuit to create the effects of brake cut or throttle cut where I want them to occur, based of the output voltage of the brake or the throttle.

Thanks!

sam.vanratt
Offline
Last seen: 7 months 2 weeks ago
Joined: 2018-11-18 14:09
Posts: 83

Hi striderkent

that sounds possible. As often mentioned (by me): the VESC is not build with ebikes in mind, so a few bugs are still there.

A fast way out is to use an inverted OPamp and use the ADC2 signal level (~1V) to stop the input of ADC1 (by pulling the input of ADC1 to ground). Five devices (a C, a diode, two Rs and the Opamp) and that should it be. The best way would be to modify the programming and correct the bug with the software mechanic from the line before.

Thanks for finding out that bug; I was very tempted to use an analoge brake as well in the future.

Cheers

Sam

Pedelec usage in combination with a GoldenMotor MagicPie3 BLDC

striderkent
Offline
Last seen: 1 month 4 weeks ago
VESC Free
Joined: 2018-12-17 22:56
Posts: 8

That's exactly what I did, created an external circuit to "force" it.

Thanks!