• Hello ES! We could use some help to get us past the finish line on building the new knowledgebase for the forum.
    Can you donate? Please see our fundraising page. Thank you!

Controller recommendations for torque sensor and regen braking

?! I would prefer a standard bicycle thumb- or half grip throttle, or a break lever with linear output. Why do you want to use something strange, like shown in your link?!
Not everyone has the same usage or requirements for operation, or even the same physical capabilities.

Tose cable operated throttles (COT) are easy to operate with a standard brake lever (or anything else that can pull a cable, like an old friction shifter).

I do this for SB Cruiser, to control my variable regen on the Phaserunners. As long as whatever controller is used can be adjusted at the input port for the actual voltage range produced, it works fine.

I use a second one pulled by a metal ATV tab throttle, because every other tab or lever type throttle I've ever used has been broken by the irregular road surfaces we have in various places I have to ride, that are often in places where I also have to hold the thorttle at WOT to get full acceleration power for either getting started from a stop or going uphill, etc. Got tired of replacing them, so....


They have their own return-to-zero spring inside, and at least the ones I have here all operate very smoothly, are waterproof to rain, at least (probably not submersible)--but even if the one in use is not even water resistant, it doesn't matter--it can be installed inside a weatherproof casing with other sensitive electronics, batteries, etc.

Another thing going for them is that if you have a crash or anything else that breaks the operating device / lever / twist / etc, you only have to fix or replace that mechanical part, you don't have to deal with any electrical stuff at all--that's all at the COT itself, which can be installed anywhere the pulling cable can reach.


They do take up a fair bit of space (about 3/4" x 2" x 2" for the ones I have here) for what they do, but for any bike, trike, scooter, or other vehicle where that's not restricted by design, it's not much of an issue.
 
Because I want to actuate it with a thumb shifter that stays in place when I'm not holding it.
OK, you can connect anything, that provides approximately 0.7 to 4.0V to the input pin. That's the voltage range of usual EBike throttle.
You can remove the spring from a normal thumb throttle also, then it stays in position.
But then you will steadily brake, if you activate linear regen in the config.h
Or is your idea just to set the strength and activate the regen with the digital break switch?
It is not implemented that way recently, but would be easy to do, just one line of code. ;)
 
Last edited:
Since they're starting at the top of a long hill, I'd presume they want to use the regen as a drag brake, so their control type makes sense.

(as long as the motor, controller, and wiring don't overheat, and as long as the battery is discharged enough before they start to handle the recovered energy (or they're creating electronics to route the energy to a different load like a big heatsinked resistor, etc).
 
OK, you can connect anything, that provides approximately 0.7 to 4.0V to the input pin. That's the voltage range of usual EBike throttle.
There's this SP5V pin I wired the other throttle to, does that provide a lower voltage? Or just go with a 3,3V pad?
You can remove the spring from a normal thumb throttle also, then it stays in position.
I suspected that might be possible with regular throttle, but I'm fine with the cable actuated one.
Or is your idea just to set the strength and activate the regen with the digital break switch?
It is not implemented that way recently, but would be easy to do, just one line of code. ;)
Yes exactly. Do I need a digital switch additionally or can I just enable it when the throttle goes over a certain threshhold?

Since they're starting at the top of a long hill, I'd presume they want to use the regen as a drag brake, so their control type makes sense.

(as long as the motor, controller, and wiring don't overheat, and as long as the battery is discharged enough before they start to handle the recovered energy (or they're creating electronics to route the energy to a different load like a big heatsinked resistor, etc).
Yeah I have to carefully test these things. I did some work on the batteries and they had a separate port BMS that didn't like being fed over the discharge port. I also think it expects some CAN bus communication from the Specialized system that I can not provide, so I replaced the BMS with a common port one rated for 60A.
 
I didn't work on this for a while because I can't work on the bike inside, so didn't want to work outside in the winter. When I last worked on it, I compiled the firmware from github without any changes and flashed it to the controller. I now connected everything to the controller and it turns on but the speed indicator shows 30H. Is that normal if I didn't run autodetect yet? I tried to run it but either my brake sensor doesn't work or there's still something wrong with my wiring.
Yes, just try it.
But of course, it is possible, that.the recent hard coded hall angles doesn't fit to your setup. Then you have to disable the fixed angles and run the autodetect once. Good luck!(y)
Should I try that first and set autodetect to 1 in the config or does the number in the speed indicator indicate a different problem?
 
This is a communication error, you have to set the right display in the config.h
I changed the DISPLAY_TYPE in Inc/config.h to DISPLAY_TYPE_NO2, which should be correct for the S2 display I got from Phoebelui EV Parts, if I'm not mistaken? I flashed the resulting hex file and it still starts blinking with 30H shortly after powering on.
Could it also be a problem with my wiring? If so, I'd check that again
 
The display type is OK for the 5s protocol. But it makes no sense to set autodetect to 1, when the 5s is set for display. Autodetect on startup only works, if the display type is debug.
I set it to 0 now and kept the display type but it still shows the same. Should the motor have tried to move when autodetect was set to 1?
 
Hm, check your throttle offset.
What do you mean exactly by checking it?
Do you think it's more worthwhile to get the display communication working first or to get the motor to move at all? I'm only in my workshop 2 times a week usually so there's always some delay until I can try something that you suggest
 
What do you mean exactly by checking it?
the recent throttle input should not be higher than the throttle offset, otherwise the code sticks at startup. This would cause exactly your symptoms. E30 and no autodetect, as the main code is never started...

But in the master branch, this safety measure is disabled, as the throttle offset is set automatically at startup....
 
Last edited:
the recent throttle input should not be higher than the throttle offset, otherwise the code sticks at startup. This would cause exactly your symptoms. E30 and no autodetect, as the main code is never started...

But in the master branch, this safety measure is disabled, as the throttle offset is set automatically at startup....
Does it make sense to add in this line or to set the throttle offset unreasonably high?
I tried to build the repository add the commit you linked and also the NewGeneration12FET branch but they don't build on my system due to a linker error
 
Back
Top