I hurt myself ebiking today (fixed problem with a CA hack)

General Discussion about electric bicycles.
jdevo2004
100 W
100 W
Posts: 158
Joined: Apr 13, 2014 8:26 pm

Re: I hurt myself ebiking today

Post by jdevo2004 » Mar 15, 2015 11:49 pm

justin_le wrote:
jdevo2004 wrote: Hi Justin. I was just out in my garage checking everything over. The brake cut off is going to the CA, not the controller. I own a CA3. I was checking the throttle out voltage to the controller. If I quickly go full throttle with my twist grip, the throttle voltage slowly goes from 1.3 volts to 3.25 volts which is normal. When I touch the brakes the throttle out voltage goes to 0 volts. When I let go of my brakes while still having the throttle at full the voltage goes from 0 to 3.25 volts instantly. What is missing is the nice controlled ramp up to 3.25 volts.
That is strange, it should ramp up exactly the same way (based on your FastRamp V/sec setting) regardless of whether you release the ebrake with the throttle on or just suddenly twist the throttle. To doublecheck I just confirmed this with the Prelim6 and the more recent Prelim9 firmware in all the main throttle modes (pass-thru, amps, and watts). And after releasing the ebrake the output voltage would jump from 0V to 1V (the min output voltage) and then ramp up steadily to 3.6V, full throttle. It never went from 0 to full instantly.

Could you let me know what firmware version you have, and if it's the Prelim6 or later could you use the CA setup utility to save your settings to a .hex file post that here? Or just list your main throttle input and throttle output settings. The behavior that you are describing is certainly not what it's supposed to be.
OK. I am using Prelim6. I am also using current mode for my throttle in. I actually removed the usb port to clean up the wiring. I will have to resolder it and then send you the hex file in a couple of days. I am glad to hear that this is not normal for the CA. Hopefully we can figure out what is going on with mine.
If it helps any, I puchased my CA3 from EM3EV.

givitago
1 W
1 W
Posts: 55
Joined: Jun 20, 2012 11:32 pm
Location: North Vancouver, BC

Re: I hurt myself ebiking today

Post by givitago » Mar 17, 2015 10:50 am

chilledoutuk wrote:There won't be any surge of power unless you have a very fast ramp rate and a poorly setup throttle control mode.
I get a jolt when I release the throttle and do have the e-brake going through the CA and have been nearly bucked off the bike a number of times. I've tried to make more deadband in the throttle to to compensate.

I have prelim 8 and the brake going to the CA and not directly to the controller.

Sounds like my diagnosis of why there is a jolt is misinformed and likely I do have a poorly setup throttle. I've struggled to get the CA to a point where there is ramping while still having enough torque quickly enough to start on a hill and reasonable acceleration. With the level of throttle I have (barely open) it seems like a disproportionate jolt but it could just be my perception because I am not expecting it.

The e-brake has saved me a bunch of times and I wouldn't consider dumping it because of this.

jdevo2004
100 W
100 W
Posts: 158
Joined: Apr 13, 2014 8:26 pm

Re: I hurt myself ebiking today

Post by jdevo2004 » Mar 23, 2015 5:51 pm

OK so after talking with Justin I found out that the Cycle Analyst does indeed have a feature that controls torque if you mistakenly let go of the brakes with the throttle on. The feature is the Throttle Out Up Rate. After letting go of the ebrake the CA uses the Throttle Out Up Rate to get back up to speed if you still have throttle on. If you set this rate low to about 2v/s it controls the torque nicely. Unfortunately I had mine set high at 20v/s and that is why when I let to of the brake with throttle on the bike blasted off from under me. Going from 1.25v to 3.55v at 20v/s is pretty much instantaneous.

The way I had my CA set up was to use current as the control mode for my throttle in. I was using the PLim AGain setting to control torque in a nice smooth way. I just found that allowing the AGain setting to control torque instead of the Thottle Up setting gave me the smoothest and most responsive throttle. Unfortunately the CA does not use the AGain or PGain settings in any way to control torque after letting go of the brakes if you mistakenly have your throttle on.

After asking Justin if there were future plans to allow the CA to also use the gain settings after letting go of the brake he said it may be something he will do in the future but he would have to think about it. I decided to take things into my own hands and came up with a hack. All I did was resolder the ebrake wire to the throttle in wire on the CA circuit board. All this does is ground the throttle in wire to zero volts when the ebrake is engaged. By tricking the CA into thinking that the throttle is zero when my ebrakes are engaged I was able to get the CA to use the Gain setting when letting go of the brake with my throttle still on.
DSC_0563.jpg
DSC_0563.jpg (150.62 KiB) Viewed 467 times
I made a short video of the hack in progress. I show how the throttle responds when I quickly go full power. The CA uses the PLim AGain setting to slowly and smoothly ramp up power because I have the thottle up rate very high. I depress the brake with throttle still on to show that the throttle voltage goes to zero and that the throttle smoothly ramps up when I let go. It works great! I am slightly concerned that the screen gets brighter when I hit the brakes. It means that the CA is not entirely happy with the hack, some voltage and current on the CA circuit board is not doing what it should. I hope Justin sees this video and maybe can chime in on the long term effects of this hack (since he has the board schematics) and if I might be able to add a resistor so I am not stressing the CA circuit board too much. Either way, I am happy. I am willing to stress a CA so I do not get hurt in the future.


givitago
1 W
1 W
Posts: 55
Joined: Jun 20, 2012 11:32 pm
Location: North Vancouver, BC

Re: I hurt myself ebiking today (fixed problem with a CA hac

Post by givitago » Mar 29, 2015 6:30 pm

Thanks for posting this jdevo. I too have the ramp rate set very fast so I can get more immediate response, but much prefer the current based throttle and have been using the gain setting to modulate the jerkiness/oscillations. I paid a bit more attention to it and I definitely get a much different response when I just drop the ebrake with the throttle slightly open vs cranking the throttle open with no brake. Your hack looks creative, but I'm not sure if I want to risk it. Some sort of firmware fix where you can get fast response with a current/power based mode without big power spikes when you drop the e-brake would be fantastic!

itchynackers
100 kW
100 kW
Posts: 1211
Joined: Dec 27, 2009 11:11 am
Location: Janesville, WI

Re: I hurt myself ebiking today (fixed problem with a CA hac

Post by itchynackers » Mar 30, 2015 6:06 am

Thumb throttle seems the obvious solution. You won't be worried about hanging on tight (around a corner) while inadvertently twisting the throttle (hopefully not).
Doing "neutral drops" on an ebike is not recommended (unless you are drag racing).
9c 9x7f w/ 12awg phases
9c 8x8r w/ 10awg phases, temp sensor, vented
9c 6x10r w/ 10awg phases, temp sensor, liquid cooled, 3rd Place Pikes Peak 2012!

"Don't argue with the galactically stupid...they drag you down to their level and beat you with experience"

User avatar
justin_le
1 MW
1 MW
Posts: 1999
Joined: May 28, 2007 3:27 am
Location: Vancouver
Contact:

Re: I hurt myself ebiking today

Post by justin_le » Apr 04, 2015 2:37 am

jdevo2004 wrote: It works great! I am slightly concerned that the screen gets brighter when I hit the brakes. It means that the CA is not entirely happy with the hack, some voltage and current on the CA circuit board is not doing what it should.
What's happening there is that when you short the throttle output signal to ground with the ebrake cutoffs, then the throttle ends up drawing a lot more power from the 5V rail and this makes the CA's backlight become brighter. And you are correct that simply putting like a 2-3 kOhm resistor inline with your throttle signal would make this effect pretty much go away. So snip the green wire that goes to ThI and put a resistor in series with it, and then the LED brightess will stay the same and you won't be stressing your throttle or the CA's 5V regulator.

A much better approach for this hack would be to leave the ebrake cutoff going to the EBK pad, and then join it to the throttle input signal with a Diode instead. Like so:
DiodeHack.jpg
DiodeHack.jpg (124.18 KiB) Viewed 373 times
Then the CA will still know that you are applying the ebrakes, and it will look like whenver you apply the brakes you are also releasing the throttle since the throttle signal voltage will be pulled down to about 0.7-0.8V via the Diode.
Big Dummy Frame (yes This One, thanks ES!) with prototype 26" Grin all-axle front hub, Phaserunner controller, and 52V 11Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

jdevo2004
100 W
100 W
Posts: 158
Joined: Apr 13, 2014 8:26 pm

Re: I hurt myself ebiking today

Post by jdevo2004 » Apr 17, 2015 1:25 am

justin_le wrote:
jdevo2004 wrote: It works great! I am slightly concerned that the screen gets brighter when I hit the brakes. It means that the CA is not entirely happy with the hack, some voltage and current on the CA circuit board is not doing what it should.
What's happening there is that when you short the throttle output signal to ground with the ebrake cutoffs, then the throttle ends up drawing a lot more power from the 5V rail and this makes the CA's backlight become brighter. And you are correct that simply putting like a 2-3 kOhm resistor inline with your throttle signal would make this effect pretty much go away. So snip the green wire that goes to ThI and put a resistor in series with it, and then the LED brightess will stay the same and you won't be stressing your throttle or the CA's 5V regulator.

A much better approach for this hack would be to leave the ebrake cutoff going to the EBK pad, and then join it to the throttle input signal with a Diode instead. Like so:
DiodeHack.jpg
Then the CA will still know that you are applying the ebrakes, and it will look like whenver you apply the brakes you are also releasing the throttle since the throttle signal voltage will be pulled down to about 0.7-0.8V via the Diode.
Just noticed you replied. I am going to try adding that resistor from the green wire to THI.
I am wondering how adding that diode could work. The way I understand it is as soon as EBK goes low it overrides anything that THI says and inputs the low throttle out voltage that the user programs into it.
I can see how adding the diode from THI straight to the blue wire without involving the EBK pad would work since it would pull the THI pad down to about 0.7 volts when the ebrake is engaged.
Thanks for the help.

Post Reply