Cruise control circuit for bicycle/scooter with no dedicated wires

Vincenzo

1 W
Joined
Jun 12, 2022
Messages
61
Is there a circuit out there that if added between the throttle control and the motor controller/computer (that is to say, the wire between the two is cut near the handle bar and both ends connected to it) that adds some kind of button to add cruise control feature that the controller/computer has no dedicated wires for.

My understanding is that there are some "fancy" motor controllers that have dedicated wires/connectors that go to some handlebar cruise-control accessory that are available for purchase.

I understand, also, that throttle controls are basically variable resistors that a cruise control may keep it fixed at a certain value without putting strain on the hand/thumb and that should be an easy electronic circuit that I can design if none is available
 
There's some threads about the old Crystalyte cruise control module that does almost exactly what you describe, except that at least some versions of it also have an input for the ebrake line so that it will cancel the throttle output (so you don't end up with the controller at the same potentially high throttle input from a stop after braking). That module has an engage/disengage button and a +/- button to adjust the held-throttle level.

Some thoughts on design:

If you don't care about that potentially-hazardous condition, and only want a single-button control with no other inputs than the throttle signal, you can skip that part and just create a sample-and-hold circuit for the voltage on the throttle signal line that when the single button is pressed once it samples the input voltage and mirrors it on the output (cruise mode), and when the button is pressed again it continously samples the input voltage and passes it thru to the output (normal throttle control mode). An MCU could be used fairly simply for this (I think there is even a cruise module DIY like this somewhere on the forum, but I don't know if they ever posted their code).

Alternately the switch can, instead of changing modes of the S/H circuit, simply physically switch the output wire from the output of the S/H circuit to the input of the circuit for normal throttle mode. For cruise it would do the reverse. There are a couple ways the sample itself could occur in this case: a "simple" one still using a simple single-pole switch (SPDT) is to also switch the sample input itself at the same time, so it doesn't have access to the throttle signal to sample anymore, and is just sampling it's own output now. That might require some finesse on the sampling routine to ensure it doesn't get switching noise or otherwise get garbage to send as a cruise signal. Another way is to use a DPDT switch where the second pole is for the sample input trigger, and have the normal-mode contact on a pullup(or down) resistor to disable the SH circuit (so it stays disabled during switching to prevent any false sampling), and the cruise-mode contact to the enable voltage. As soon as the switch is in it's stable "cruise" position, the sampling has occured and output no longer varies, only following the throttle setting at that last instant.

A mutli-switch design adds other abilities, like the Crystalyte one has, for instance.

Depends on the way you want the whole system to work: define your specific functions and responses and user-input requirements, and then design the hardware/software around that. :)
 
Vincenzo said:
My understanding is that there are some "fancy" motor controllers that have dedicated wires/connectors that go to some handlebar cruise-control accessory that are available for purchase.
For those, the CC is just a button that tells the controller to engage cruise. Some might be fancy enough to also have a +/- to alter cruise speed without disengaging/reengaging.

Some don't have a separate CC, and simply engage cruise (whether you want it or not!) if the throttle input doesn't vary for a certain number of seconds. I think I still have an old version of the Grinfineon that did that; I didn't like the behavior but couldn't disable it. Dunno if any modern non-programmable controllers still do that, though there are probably programmable ones that can, so that you can turn the function on/off or change it's behavior.

There is also the Cycle Analyst v3 from Grin Tech that offers a lot of features including a CC function if you want to use it.

I understand, also, that throttle controls are basically variable resistors
For most of the common cheap controllers, they actually use a variable-voltage hall sensor rather than a potentiometer (variable resistor), but with higher-end controllers some have the option to use any input and configure the voltage range it responds to from that input as well.

But since the pot is usually used as a variable-votlage source (rather than the controller reading it's resistance), they effectively work the same, other than the voltage range they output (full range for the pot, around 1v to around 4v for a hall, depends on the specific throttle design).
 
amberwolf said:
There's some threads about the old Crystalyte cruise control module that does almost exactly what you describe, except that at least some versions of it also have an input for the ebrake line so that it will cancel the throttle output (so you don't end up with the controller at the same potentially high throttle input from a stop after braking). That module has an engage/disengage button and a +/- button to adjust the held-throttle level.

Some thoughts on design:

If you don't care about that potentially-hazardous condition, and only want a single-button control with no other inputs than the throttle signal, you can skip that part and just create a sample-and-hold circuit for the voltage on the throttle signal line that when the single button is pressed once it samples the input voltage and mirrors it on the output (cruise mode), and when the button is pressed again it continously samples the input voltage and passes it thru to the output (normal throttle control mode). An MCU could be used fairly simply for this (I think there is even a cruise module DIY like this somewhere on the forum, but I don't know if they ever posted their code).

Alternately the switch can, instead of changing modes of the S/H circuit, simply physically switch the output wire from the output of the S/H circuit to the input of the circuit for normal throttle mode. For cruise it would do the reverse. There are a couple ways the sample itself could occur in this case: a "simple" one still using a simple single-pole switch (SPDT) is to also switch the sample input itself at the same time, so it doesn't have access to the throttle signal to sample anymore, and is just sampling it's own output now. That might require some finesse on the sampling routine to ensure it doesn't get switching noise or otherwise get garbage to send as a cruise signal. Another way is to use a DPDT switch where the second pole is for the sample input trigger, and have the normal-mode contact on a pullup(or down) resistor to disable the SH circuit (so it stays disabled during switching to prevent any false sampling), and the cruise-mode contact to the enable voltage. As soon as the switch is in it's stable "cruise" position, the sampling has occured and output no longer varies, only following the throttle setting at that last instant.

A mutli-switch design adds other abilities, like the Crystalyte one has, for instance.

Depends on the way you want the whole system to work: define your specific functions and responses and user-input requirements, and then design the hardware/software around that. :)
Thank you
I image-googled the name " Crystalyte cruise control module " and the pics I saw are indeed exactly what I am looking for. As a matter of fact, I remember seeing this exact product somewhere recently and that is probably why I thought about asking now.

I first did multiple searches in google and the forum and on ebay using key words that included "bicyle", "cruise control", ... etc. Couldn't fund much except a cool looking mechanical tool just like the experiments of this youtuber that I enjoy watching:
https://www.youtube.com/watch?v=KIsbJh9y_QM

I could not find a seller or price for this Crystalyte cruise control module, though. I am having a tickling feeling that I found something so rare that only one flashy name business thought about it and is not in Alibaba or banggood or ebay!

The connection to the ebrakes is understandable and is not a big deal.

About your thoughts on the design:
1. To avoid any hazardous conditions, I am thinking of this operation scheme:
* The CC button is a simple touch and go button that when pressed the first time, remembers the throttle voltage and the effect of the original throttle control is neglected.
* To get out of the CC constant speed mode, either the brake is used or the button is hit again (just like in cars). After braking, cruise mode is off.
* Adding a + and - buttons is great if they do not complicate the design too much (I doubt that).
* The ideal location for an electronic board or PCB is next to the controller where all wires from throttle, brakes, and the new handle bar button(s) converge. The latter can be found dirt cheap on ebay as motorcycle multi-button handle bar fixtures. There are beautiful options for $2-$5 that are a lot more efficient and safer than the cheap membrane way they used.

2. For a microcontroller, it is super easy to implement with code, but I would love to make something out of jelly bean components, op-amps, comparators, transistors, ... etc. The lower part of your thoughts is close to my thinking, a relay can switch between the throttle input and the resistance provided by the circuit (or may be an analog switch).

Finally, waw!... did you make one for yourself, or you're just loving the idea like I do?
I was hoping that there was a ready made cheap ebay thing that does it, but it looks like this whole field is still very new and that is why every opportunist in the west is making up a weird brand name for chinese bikes and components and selling 20-50 times the Chinese prices.

I will update this post with a safe design (if I come up with one) with diagrams and pics, unless someone else had already come up with something useful that we find.
 
amberwolf said:
For those, the CC is just a button that tells the controller to engage cruise. Some might be fancy enough to also have a +/- to alter cruise speed without disengaging/reengaging.

Some don't have a separate CC, and simply engage cruise (whether you want it or not!) if the throttle input doesn't vary for a certain number of seconds. I think I still have an old version of the Grinfineon that did that; I didn't like the behavior but couldn't disable it. Dunno if any modern non-programmable controllers still do that, though there are probably programmable ones that can, so that you can turn the function on/off or change it's behavior.

There is also the Cycle Analyst v3 from Grin Tech that offers a lot of features including a CC function if you want to use it.

My controllers have one output (2 wires) that I disregard because I (probably mistakenly) believe that we still have more freedom than other places in the world and I live in a rural area that if you short together a maximum speed is applied that you can not pass. I thought I could find some overlap in the functionality to some cruise control scheme.
 
amberwolf said:
For most of the common cheap controllers, they actually use a variable-voltage hall sensor rather than a potentiometer (variable resistor), but with higher-end controllers some have the option to use any input and configure the voltage range it responds to from that input as well.

But since the pot is usually used as a variable-votlage source (rather than the controller reading it's resistance), they effectively work the same, other than the voltage range they output (full range for the pot, around 1v to around 4v for a hall, depends on the specific throttle design).
But, don't they both (voltage-divider POTs and Hall-effect transistor-looking sensor) operate the same by sending a voltage to the controller that is proportional to the angle of the throttle?

The max range of either (1v vs 4v) that you mentioned is interesting, thanks, I did not know that.
 
oh, and I forgot, for my build, the interaction between the throttle and the PAS is very cool. I, personally rarely use the PAS but always keep it connected as a backup to avoid getting stranded if any thing happens to the throttle or its wiring.

Pedaling has a higher precedence than throttle. The PAS wires can be fed from a simple 555 with a variable frequency fed through a rotary switch or an on/off button and a potentiometer, and that's one easy Cruise Control method.
 
Vincenzo said:
I could not find a seller or price for this Crystalyte cruise control module, though. I am having a tickling feeling that I found something so rare that only one flashy name business thought about it and is not in Alibaba or banggood or ebay!
Unless Crystalyte themselves still sell it from their main site (you can ask them) then I don't know anywhere to get them except used. Somewhere around here I have a couple of them, went digging for them some months back to get interior pics for someone else but didn't find them at the time.


2. For a microcontroller, it is super easy to implement with code, but I would love to make something out of jelly bean components, op-amps, comparators, transistors, ... etc. The lower part of your thoughts is close to my thinking, a relay can switch between the throttle input and the resistance provided by the circuit (or may be an analog switch).
If you're thinkng of op-amps, there are slightly simpler ways using an S&H chip; Maxim has made some interesting ones (they also make digipot chips useful for things like the very few controllers that actually require a potentiometer throttle because they use the resistance itself not just the voltage, such as for safety check to see if throttle is fully connected, etc. (IIRC 4QD brushed controllers do this) I think this is one
https://datasheets.maximintegrated.com/en/ds/DS1843.pdf
but only glanced at the datasheet.
a mouser search for 1ch s&H
https://www.mouser.com/c/semiconductors/amplifier-ics/sample-hold-amplifiers/?number%20of%20channels=1%20Channel

BTW, another consideration for this CC I forgot to mention before: do you want it to maintain the actual speed you are at? Or just the amount of throttle you'd last used?

If the former, it has to be significantly more complex, as the CC module needs to know the wheelspeed so it can monitor that and modulate it's output to maintain the speed. This is which is probably why it's nowadays usually a function of the controller, since the controller often has access to wheelspeed data.

The Cycle Analyst does it this way, for instance (though it doesn't access controller info, it gets this data from the motor hall sensor for DD hubmotors, or a separate wheelspeed sensor).

If the latter, it's simpler, but unless you're on flat paths with no winds, etc., it's potentially a lot less useful as it may have to be overridden or reset by the rider so often that it's more a hindrance than a help.




Finally, waw!... did you make one for yourself, or you're just loving the idea like I do?
Neither. I am just a problem-solver, and sometimes I already know of solutions or can easily see how something can work, and can pass that on.

CC is not useful to me because of those frequent speed changes in traffic, primarily. At one time I made long rides on the canal paths here, and CC was useful in many of those cases, but nowadays I only really ride my short work commute and occasional similarly-short grocery trips.

I was hoping that there was a ready made cheap ebay thing that does it, but it looks like this whole field is still very new and that is why every opportunist in the west is making up a weird brand name for chinese bikes and components and selling 20-50 times the Chinese prices.
The field of CC itself is actually very old, and CC is not a commonly used function for bicycle stuff-there is simply too little opportunity to safely use it because riding in traffic or on paths there are so many stops/starts and speed changes so often that CC is virtually useless for the majority of rides, and actively dangerous for some.

The field of ebikes is also not new (decades old at this point), just that they've become cheap enough for small businesses (that don't know anything about what they buy and sell) to buy containersful of cheap crap they can dump for enough profit to be worth doing.


Regarding existing items, there are some things that can do it that already exist. This search lists some relevant results, inlcuding some DIY projects; I don't know how many are readily available or if the DIY stuff has reached a buildable state:
https://www.google.com/search?q=ebike+cruise+control+module
 
Vincenzo said:
My controllers have one output (2 wires) that I disregard because I (probably mistakenly) believe that we still have more freedom than other places in the world and I live in a rural area that if you short together a maximum speed is applied that you can not pass. I thought I could find some overlap in the functionality to some cruise control scheme.
Sounds like you're referring to the speed limit function; this is not usually programmable or alteralbe in any way--it's etiher engaged or not, and is usualy just a loopback connector you plug the ends together for, or jumper the two pins of, and leave it that way, if you have to meet a legal speed limit requirement, for instance.

This function isn't useful for CC as such, however.
 
Vincenzo said:
But, don't they both (voltage-divider POTs and Hall-effect transistor-looking sensor) operate the same by sending a voltage to the controller that is proportional to the angle of the throttle?
Yes, and no...the proportionality depends on the design of the throttle. Some use linear progression makng them proportional, some don't (using logarithmic pots for instance, so you ahve fine control at low throttle amounts, but coarser control at the higher end where it takes so much more throttle input to change the speed due to power vs speed results, that it is still relatively easy to control.)

The hall throttles depend on the magnet placement and strength, and the way the magnets are magnetized, for how they respond vs movement. They can be just two equal magnets one at each end of the travel, or they can be different magnets, or a strip of magnet linearly magnetized, or magnetized in some other way, etc., each of which will give a different output pattern--and the sensor itself could be one that responds differently to the magnets depending on polarity, etc (though I have not seen anything ohter than the typical linear hall in the ones I've fixed or opened up; I have seen a number of magnet configurations).


There are also cable-operated versions of hall and pot, some of which use rotational control and some which are linearly-pulled in a straight line, and these can also have various configurations and responses.
 
Vincenzo said:
oh, and I forgot, for my build, the interaction between the throttle and the PAS is very cool. I, personally rarely use the PAS but always keep it connected as a backup to avoid getting stranded if any thing happens to the throttle or its wiring.

Pedaling has a higher precedence than throttle. The PAS wires can be fed from a simple 555 with a variable frequency fed through a rotary switch or an on/off button and a potentiometer, and that's one easy Cruise Control method.
Which controller system do you use? THere are a number of people here that would like one of them, because if your controller actually responds variably to the cadence, it's unusual.

Almost all PAS-capable controllers only respond to pedalling as on/off--if you pedal at all, you get full assist at whatever level you set in the display, otherwise you get no assist. The only way on those to get variable response is to use the throttle.

I use the Cycle Analyst v3 to do the vary-with-cadence PAS. I pedal to control the speed of the SB Cruiser trike, with throttle as backup. The CA priority is throttle overrides PAS, which in my case is usually preferable because I only use the throttle when there is some problem pedalling (usually with my legs but sometimes a mechanical / etc malfunction).
 
I'd use chips from manufacturers like Maxim when I'm making a product to sell. Thanks for the beautiful info.

I understand how CC can be a hindrance in more crowded areas (I always wonder why people live on top of each other :wink: ). I ride about 15 miles in hilly farm area one way to work where there is minimal traffic other than rush hour and about 20 miles for groceries. It is crazy cold in the winter here so I built a few heated clothing items powered by 20Ah battery packs that I make, and having CC is sometimes very useful.

Just made some measurements and found that my throttle is supplied by 5v and GND and gives .8 to 5 volts, so initially I'll just experiment with a pot that I only adjust by stopping (or never) that replaces the throttle by a switch (I already have an extra switch on the handle bar) and that can give about 15-20 miles/hr most of the time. Like this cool engineer https://www.youtube.com/watch?v=ojiMUh6DcZE

The annoying thing (especially up a hill) is when your hand gets tired/cold/numb and you release the throttle, the motor just stops abruptly. A large enough capacitor that causes a nice exponential speed decay is probably another good experiment to remedy the abruptness (that has nothing to do with braking and safety, because brake eliminates the throttle input from my experience).

Correction about what I mistakenly stated about the PAS (that does override the throttle). I am currently using a cheap 1k5 watt voilamart controller that you can get from china for 25$-50$ that comes with the SW900 display. No brands. And I think I got carried away with the misstatement of variable frequency 555 to replace the cadence magnetic sensor and replace pedaling. Apologies for that. What I meant was that the variable frequency there is to experiment the range that makes the assistance kick in which is just like you described on or off, but then there are + and - buttons for changing between the 6 levels of assistance that I have which will give me 6 speed cruise control with no need of an extra button/switch. We used to do similar things back when we were kids in cars to avoid replacing catalytic converters and o2 sensors which were very expensive back when they were new, and we put a simple 555 circuit hidden in the harness to give a car computer an o2 sensor that passes the test and then remove it afterwards :)
 
The Bafang BBS02 and BBHSD have cruise control as the basis of their pedal assist although most people don't perceive or use it this way. Unfortunately it can't be used on other systems. For each PAS level you can program the speed you want held (as a percent of maximum) and the maximum assist/power you want that level to have. I'm a country cruiser so I set my mid-level PAS 3 to 47% speed (15 mph) and 43% assist max (about 550 watts max). As I'm pedaling along and come to a rise/hill the PAS automatically brings on more power so I don't slow down going over the rise. As I pedal down the backside of that rise the PAS cuts back/off the assist and as I exceed 15 mph I pedal unassisted. My display has 5 levels of assist and each one is programmed with an increasing/higher speed and power level until the 5th level is 100%/100% (~37 mph and 1,200 watts). It's the best implementation of cruise control on an ebike I have found.
 
I know that diverdon55 was able to get a Crystalyte cruise control module fairly recently at a Hong Kong Crystalyte store, if you’re interested in that.
He decided wiring it in would be to much to take on, and may sell you the one he has, if he still has it.

For information on the control, it’s wiring and operation, see these threads…


https://electricbike.com/forum/for...gic-pie/154136-crystilyte-cruise-control-swap
https://electricbike.com/forum/for...-brake-release-and-slight-power-adjustability



Regards,
T.C.
 
Diggs,
When you use "Bafang BBS02 and BBHSD " or "Systems", is that a motor controller, a motor, a display, a software, or a complete kit?

I think you are talking about exactly what I have, except that, I almost never pedal.

There is something else you mentioned, does the PAS level change on its own when you're going uphill or downhill without you pressing the + and _ buttons over and under the on/off button? That is strange, I don't recall seeing that as a setting!

What I am trying to do is to replace the cadence magnetic sensor with a hand switch to switch on and off a ready generated frequency (the switch changes between the throttle and that circuit that is basically now cruise control of several speeds).

BTW, what is a "country cruiser", is it a fun thing? and can I become one? :)

My motor is 1500 watts and I barely get 33 miles/hr (you mentioned 37 mph and 1,200 watts) and in our steap hills in central PA, it sometimes barely moves. I guess it's all about the number of parallel batteries and their connection to controller and wires quality/thickness
 
TommyCat said:
I know that diverdon55 was able to get a Crystalyte cruise control module fairly recently at a Hong Kong Crystalyte store, if you’re interested in that.
He decided wiring it in would be to much to take on, and may sell you the one he has, if he still has it.

For information on the control, it’s wiring and operation, see these threads…


https://electricbike.com/forum/for...gic-pie/154136-crystilyte-cruise-control-swap
https://electricbike.com/forum/for...-brake-release-and-slight-power-adjustability



Regards,
T.C.
Thank you, for the links. That's exactly the device everybody is talking about.
I found a little motorcycle accessoryhttps://www.ebay.com/itm/4033865760...rentrq:7b3483761850a76840a462ddffffd49e|iid:1 that I think is revolutionary for it's simplicity and the way it works:
https://www.youtube.com/watch?v=iOVpjqqWSio

https://www.youtube.com/watch?v=3XawFVdI1do
 
Vincenzo said:
Diggs,
When you use "Bafang BBS02 and BBHSD " or "Systems", is that a motor controller, a motor, a display, a software, or a complete kit?

I think you are talking about exactly what I have, except that, I almost never pedal.

There is something else you mentioned, does the PAS level change on its own when you're going uphill or downhill without you pressing the + and _ buttons over and under the on/off button? That is strange, I don't recall seeing that as a setting!

What I am trying to do is to replace the cadence magnetic sensor with a hand switch to switch on and off a ready generated frequency (the switch changes between the throttle and that circuit that is basically now cruise control of several speeds).

BTW, what is a "country cruiser", is it a fun thing? and can I become one? :)

My motor is 1500 watts and I barely get 33 miles/hr (you mentioned 37 mph and 1,200 watts) and in our steap hills in central PA, it sometimes barely moves. I guess it's all about the number of parallel batteries and their connection to controller and wires quality/thickness

The Bafang system I refer to is motor and controller as they are integrated. I almost always pedal and just let the system add and take away power based on my speed (and PAS settings). The "cruise control" function will not work unless pedaling. The PAS level doesn't change unless I change it from the handlebar +/- control it's just that the Bafang programming allows the "system" to add power (up to the max of the pre-programmed PAS level) and take away power automatically on its own based on the speed I'm going. As I explained earlier, if I am pedaling in PAS level 3 once I hit 14.5 mph the assist starts tapering off and by the time I hit 15.5 mph there is no assist.

I'm from the Midwest so my rides are 50-70 miles long in the rolling countryside through farm fields and along rivers and creeks. Hence "country cruiser". No dirt, sand, rocks or gravel. (My ride is full upright with swept back handlebars.) Just 2-lane country roads. I was a proponent of "rail-to-trails" early on but now find them to be some of the most boring riding I have done. They are just an endless green tunnel that stretches forever.

I ride a BBHSD but have programmed the max amps back to 25 amps. I don't really need any more and suffer chain jump/stretch and other strangeness at very high amps. The 37 mph is the hard limit (60 kph) in the Bafang programming. I rarely approach the limit and only then on the long downhill stretches coming out of the bluffs along the rivers never by just leaning on the throttle. I run dual 52v battery packs in parallel but its for the distance, not the speed.

I should add that even my econo guest bike with a 1,000 watt rear hub motor and LCD-3 display has a cruise control feature but when activated it just locks the current output to the motor. So if you are cruising along at 500 watts that is what it will maintain. It's kind of worthless as the bike slows to nothing going up a hill and takes off faster than a novice rider wants to go downhill.
 
Another possible option would be to use a Cycle Analyst. I believe these have a cruise control function, but I have never used it.
 
by fechter » Jan 04 2023 12:04pm

Another possible option would be to use a Cycle Analyst. I believe these have a cruise control function, but I have never used it.

You believe correct, turn it on in the CA and hold the throttle >3sec it sets then use brakes, regen, cutoff or throttle to release it. Tried it few years ago but prefer to set a power limit when not using pas.
 
I left this tab in my browser open for over a month trying to go back to it (additional job, taking time to test what I used) and I finally could.

So, I got me one of those $.99 little plastic things that help with the hand and joints because you only rest your hand on it, and it was like magic. It is so useful that I wanted to recommend it to everyone I know.

Diggs, Rail-to-trails is a great thing if it doesn't require the involvement of the Robin Hoods of our time to make it cost a hundred times what it should. It is an awesome thing for long safe commutes and very long (probably, across the country travels/leisure). I even recently started researching the latter and found this guy who did it and started an app (didn't work on my devices) called cycleanywhere or something like that where users post pins/coordinates on a map of where they found and used a 110v outlet (I wonder if there is any input readers to this my have!). My work commute is all 2-lane country roads and I don't think it is safe/enjoyable enough (probably the flat and much less densely populated midwest where you're at in MN adds boredom and safety).

One last update, performing a detailed and frequent cell balancing and upgrading the wires/connectors and temperature rising are all factors that started getting me 40miles/h downhills recently.
 
Back
Top