Speed signal comparison? (traction control)

rocwandrer

100 W
Joined
Oct 28, 2011
Messages
286
Location
Northeast USA
I can handle the electrical basics and mechanical systems of my projects, but I'm reaching out for help on how to get the control input signals for this project. I figure someone here is as "electrical" as I am "mechanical", and knows off the top of their head exactly how to achieve what I'm going for

What:

I'd like to be able to in some way compare the speed of one wheel to the speed of another, and get an output that I could use (directly or indirectly) to apply a throttle signal to a controller.

I have no clue how to make something like that happen. I don't need to know the speeds, or the difference between them. I basically want one output (nothing) when wheel A is at the same or less speed compared to wheel B, and I want an output when wheel A is turning faster.

Why:

Mostly because I think it would be a cool project, not for any necessity. This is more "thrill of the project and result" than it is "practical". There are two times I think this would be useful:

1.) When pedaling in snow, I could have FWD engage only momentarily at any time when the rear tire spins. This would waste less of my pedaling energy, prevent me from digging a hole and coming to a stop, and generally improve my mood when pedaling in marginal conditions. I'm hoping for a response time that would be better than mine (which would be about 1/2 second at best).

2.)My winter commuter bike runs around 3 psi in the tires. On a steep uphill, when I transition from spinning to mashing (and start hurting my knees), the rear tire becomes substantially smaller in effective radius because of the rearward load transfer. I could potentially have a completely automated engagement of assist on steep uphills, and with some instant on, delayed off (capacitor on the throttle signal or something?) magic, it could even be roughly proportionate to my knee strain.
 
There are some threads discussing two or three wheel drive on trikes that bring this up, and there are some solutions discussed in a few of those--but you'll have to poke around the various trike threads to find them, as I am not sure what terms would be good to search on.


Basically all you are looking for is a comparator circuit (or a pair of htem, actually). Most (all?) of this can be done with op-amps. If you don't know electronics, you will probably have to google around for the circuits. http://alllaboutcircuits.com likely has enough info, and there's lots of other sites.

If you put a tachometer on each wheel, (any kind of pulsing speed sensor), then you can use one op-amp on each one to integrate that into a voltage.The voltage will be higher the faster the wheel spins, if the circuit is setup correctly. It might be necessary to use a monostable multivibrator (retriggerable one-shot, 555 timer can do this) between the tachs and the integrator, depending on the pulse length the tachs put out.

Then use both of those votlages as inputs to another op-amp as a comparator, whcih will have an output that toggles to a higher voltage when one input is higher than the other, and lower when that same input is lower than the other. (when one wheel is faster than the other)


I'm sure there are a number of robotics projects out on the web that already have thsi all worked out, too.


Regarding pedal assist that is proportional to the torque you're pedalling with, you may wish to look up the Cycle Analyst v3 beta thread, or visit the http://ebikes.ca homepage, as that new CA v3 can use a specific type of BB sensor to determine pedal torque, and control your throttle based on that.
 
Thank you for that post. I did search here already a bit, and again after your post, but haven't yet come up with much. Forgive that I haven't done a lot more research YET based on your excellent reply, but would a pair of the voltage output type pedelec sensors like discussed here: http://endless-sphere.com/forums/viewtopic.php?f=2&t=22686 work as the tachometers and the also have the advantage of putting out a voltage straight away, instead of a pulse pattern?

I'm thinking this isn't so tough after all. Supply a voltage input to the two pedelec sensors, run their signals into a comparator, and run the output voltage to the throttle signal input to the controller?

Looks like I might be able to get BMSbattery to add a couple of those to my order: http://www.bmsbattery.com/ebike-parts/504-pas-pulse-padel-assistant-sensor.html

If these will work, I can't see an outdoor environment capable tach getting any cheaper... especially with the bonus of having a built in signal converter/voltage integrator?
 
rocwandrer said:
What:

I'd like to be able to in some way compare the speed of one wheel to the speed of another, and get an output that I could use (directly or indirectly) to apply a throttle signal to a controller.

I have no clue how to make something like that happen. I don't need to know the speeds, or the difference between them. I basically want one output (nothing) when wheel A is at the same or less speed compared to wheel B, and I want an output when wheel A is turning faster.
How about using 2 identical bicycle speedometers? One for each wheel. Then compare the signal values received. Of course, you'd have to find out the protocol used by the speedometers and the data format.

Anyway, sounds like a fun project.
 
SamTexas said:
rocwandrer said:
What:

I'd like to be able to in some way compare the speed of one wheel to the speed of another, and get an output that I could use (directly or indirectly) to apply a throttle signal to a controller.

I have no clue how to make something like that happen. I don't need to know the speeds, or the difference between them. I basically want one output (nothing) when wheel A is at the same or less speed compared to wheel B, and I want an output when wheel A is turning faster.
How about using 2 identical bicycle speedometers? One for each wheel. Then compare the signal values received. Of course, you'd have to find out the protocol used by the speedometers and the data format.

Anyway, sounds like a fun project.


A bicycle speedometer has a reaction time of greater than 1 cycle. I can go 8 feet before it has figured out that the speed of the wheel has changed. I could do that with a magnet on every other spoke, but that seems like a lot more money than these pedelec sensors...?
 
Amberwolf's way will be better than a constant voltage from the pedelec sensors, although the theory is sound.

The problem with a voltage level based comparitor comes from fact that nothing is perfect. no two sensors are going to put out exactly the same voltage at the same RPM under real world conditions. Wires will be diffrent lengths and diffrent resistances, sensors will have diffrent outputs within the same range, andthe ring will be diffrent distances from the magnets. You may be able to spend hours tuning the system to get the exaqct same output at a given RPM, and then find the sensors opperate on slightly diffrent vectors, so one gets slightly higher voltage at higher RPM. And if by some mirical you get 2 sensors that opperate exactly the same over their entire RPM range, you have external factors that will affect the output. Rain, snow, mud, bug impacts, vibration, wind, tempature, ect. all of those will affect the output some, and cause the sensors to be out of balance. And the voltages will tend to float.


A pulse based comparitor eliminates those problems. 8 pulses per Revolution from a sensor is 8 pulses per Revolution no matter what happens. The sensor either works, or is broken. It works forever or it fails. Either / or. no tuning, no adjusting, no problems. It will be stable in the wind, rain, mud, snow, plague of locus, Or even remain stable after a weekend with the inlaws.


This is basicly Analog VS Digital.
 
I think I understood all of that :D

So do I need magnets, or can I use something like an inductive prox sensor, and just target the spokes? Is their a ready made device for this approach of converting the pulse signals to a voltage?
 
As long as you use DD motors, you can just use the hall sensors. Thats what the direct plugin Cycle Analyst does to get a singal for it's Speedometer. The halls trigger on the ring of magnets, so you'll get plenty of pulses per revolution.

Depending on the controller, there may already be a speedometer tap that is doing exactly that, so no extra wires, no extra sensors needed,
 
Drunkskunk said:
As long as you use DD motors, you can just use the hall sensors. Thats what the direct plugin Cycle Analyst does to get a singal for it's Speedometer. The halls trigger on the ring of magnets, so you'll get plenty of pulses per revolution.

Depending on the controller, there may already be a speedometer tap that is doing exactly that, so no extra wires, no extra sensors needed,

I'll only have the one rear hub mounted in the front fork, and it will be a geared Q100.... The controller will either be a KU63 or KU123 with the shunt resister modded for about 9-11 amps.
 
What you use for a tach sensor depends on the resolution of change you need. If you need it to determine speed changes "instantly", you could put a magnet on every spoke and a simple reed switch (or hall sensor) just like a bike speedo uses on the frame/fork, or use an optical strip on the rim or tire (or hub) with radial lines as fine as you like (depending on the reaction time of the optical sensor you pick), with the sensor (perhaps an IR LED and receiver sensor) on the frame or fork, mounted so it is extremely close to the optical strip.
 
Usually making a system more complex than it needs to be causes problems, doesn't cure them. In my opinion rider skills will always outmatch a traction control type system on a cycle. That being said, I would just make it full time 2wd with studded tires if traversing snow & ice. My 2cents.
 
amberwolf said:
What you use for a tach sensor depends on the resolution of change you need. If you need it to determine speed changes "instantly", you could put a magnet on every spoke and a simple reed switch (or hall sensor) just like a bike speedo uses on the frame/fork, or use an optical strip on the rim or tire (or hub) with radial lines as fine as you like (depending on the reaction time of the optical sensor you pick), with the sensor (perhaps an IR LED and receiver sensor) on the frame or fork, mounted so it is extremely close to the optical strip.


With snow, salt, ice, mud, etc I don't think an optical sensor will work. My experience with mounting sensors to spokes leads me to believe that that sort of system wouldn't be reliable enough either, though it might still be a fun project.

shock said:
Usually making a system more complex than it needs to be causes problems, doesn't cure them. In my opinion rider skills will always outmatch a traction control type system on a cycle. That being said, I would just make it full time 2wd with studded tires if traversing snow & ice. My 2cents.

We are on the same page. Simple and robust is good. When I disabled the ABS, my race car got faster, because I'm enough smarter than the ABS computer that I can still beat it for performance, even with my poorer reaction times.

This is a bicycle that I am adding a little assist to (9 amps/36v/54% efficient or so at 10 mph -> 175w to the ground), not really an electric bike. As I said before, the purpose of this contemplated project is mostly project, not practical.

Since my parts haven't even been shipped yet, I guess I probably should get it up and running before digging into stuff like this. I've got another more practical issue to deal with first anyway, but I'll start a new topic for that.
 
I would use a signal from the hall sensors for wheel speed. This will give a much better resolution to work with.
 
gwhy! said:
I would use a signal from the hall sensors for wheel speed. This will give a much better resolution to work with.


I'll only have that on the front wheel, as the rear is a standard xt hub wheel.
 
It's probably going to harder than you think, especially since you are not using a hub motor on the back. If you are serious about this, I think you should use a micro controller and yes, probably 8 magnets on your rear wheel with sensor. It's going to be hard to program the timing how you want it without some lag.

Maybe rename the post, building a traction control system.
 
rocwandrer said:
gwhy! said:
I would use a signal from the hall sensors for wheel speed. This will give a much better resolution to work with.


I'll only have that on the front wheel, as the rear is a standard xt hub wheel.

oops thought you had a hub on front and rear, so is your rear motor sensorless then ?
 
gwhy! said:
rocwandrer said:
gwhy! said:
I would use a signal from the hall sensors for wheel speed. This will give a much better resolution to work with.


I'll only have that on the front wheel, as the rear is a standard xt hub wheel.

oops thought you had a hub on front and rear, so is your rear motor sensorless then ?

The rear motor (mounted up front) is a Q100, with hall sensors.
 
gwhy! said:
so you can use the hall sensor signal from that motor for the rear wheel speed.


front wheel you mean? :D
 
Back
Top