How to reduce the rate of Hall Effect sensor signal

Thread Starter

MikeBike

Joined Mar 9, 2023
6
Hi, I'd like to take the output from a hall effect sensor and reduce the rate of the signal.

The application: A magnetic sensor, on my bicycle, is used to indicate the speed of the bike. The signal is derived from the rate of wheel revolutions. I'd like to convert that rate, by modifying the signal so that it reads a lower rate.

Whilst the true signal may be 100 pulses per minute, I'd like the signal to suggest only 75 ppm.

What would I need to introduce into the signal wire to achieve this outcome?

Thanks wizards!
 

Thread Starter

MikeBike

Joined Mar 9, 2023
6
Hi, I'd like to take the output from a hall effect sensor and reduce the rate of the signal.

The application: A magnetic sensor, on my bicycle, is used to indicate the speed of the bike. The signal is derived from the rate of wheel revolutions. I'd like to convert that rate, by modifying the signal so that it reads a lower rate.

Whilst the true signal may be 100 pulses per minute, I'd like the signal to suggest only 75 ppm.

What would I need to introduce into the signal wire to achieve this outcome?

Thanks wizards!
And on further thought; if the sensor is actually a simple reed switch, how could I achieve the same reduction in the indicated signal pulse rate?
 

Thread Starter

MikeBike

Joined Mar 9, 2023
6
Why do you want to do this?
I want to do this in order to allow my bike to be assisted up to a maximum speed of 20mph when I take it to the US. In the UK electric bike speeds are restricted to 15.5mph, and this prevents me from enjoying the different speed assistance when I tour in the USA
 

Ya’akov

Joined Jan 27, 2019
9,070
So the signal is going to the bicycle’s controller, just altered. Well, if 50% works then a simple digital circuit that counts two and then sends one should work. I can’t help too much with that but there are certainly plenty of prolific circuit folks here who can.

I would do it with a small microcontroller like an ATTiny85 or the like. It’s just a little 8 pin chip that needs only 3 components to operate. The solution then becomes a simple program and the ratio can be arbitrary.

My immediate concern is one of safety and reliability. I have no idea what protection the motor controller has should the new rate allow it to assist to much higher than normal levels. Also, should the circuit fail, you could be stranded in a bad place, or have to pedal your much-too-heavy unassisted bike some distance.
 

MrAl

Joined Jun 17, 2014
11,389
Fixed rate. I'd be happy with a simple reduction to, say 50%, or 75% without any need for variation
Hi,

75% is harder to do but 50% is fairly easy you use a Flip Flop for a divide by 2.

You also have to match the logic levels too though, do you know what they are?
Also, what power supply voltage(s) is/are available?
 

Attachments

Thread Starter

MikeBike

Joined Mar 9, 2023
6
Hi,

75% is harder to do but 50% is fairly easy you use a Flip Flop for a divide by 2.

You also have to match the logic levels too though, do you know what they are?
Also, what power supply voltage(s) is/are available?
Thank you, 50% would be ideal, so that’s good news. I think the voltage is 36v in this case, with a 250Wh battery and a 50Nm pin ring geared motor.

I’m not sure about the logic levels. I’m not a circuit/control guy, but keen to learn more.
 

panic mode

Joined Oct 10, 2011
2,715
you will be touring USA... on a bicycle? i hope you know where you are going and what distances are involved or you may end up like hitchBOT o_O

dividing by 2 is trivial, single FF can do the job but you need to see what the level from sensor is to match it.
 

nsaspook

Joined Aug 27, 2009
13,082
I'd be very careful with these types of mods when used around the general public on public road, trails, paths, etc ... If you get into an accident in the US with a modified (allowing speeds above the manufactured limit) e-bike your personal liability for having a done a modification may result in severe monetary and legal fines.
This is just a sea-lawyer talking but in the US people will sue at the drop of a penny.

https://en.brujulabike.com/modify-e-bike-unlock-speed-limit/
 
Last edited:

MrAl

Joined Jun 17, 2014
11,389
Thank you, 50% would be ideal, so that’s good news. I think the voltage is 36v in this case, with a 250Wh battery and a 50Nm pin ring geared motor.

I’m not sure about the logic levels. I’m not a circuit/control guy, but keen to learn more.

See attachment.

You have to either measure the H (high) and L (low) levels as shown or you have to find that in a manual or something from the manufacturer.
This is necessary in order to design a circuit that can do what you need it to do. Without this information it will probably be impossible to construct anything that will work because the circuit will have to not only know what level signal it has to work with (ORIGINAL wave) but also what it has to put out (50% wave).

Many logic circuits are 5v, but some are 1.8v, 3.3v, 10v, 12v, 15v and some are current operated. This means it is imperative to find out what levels your circuit is using now.

I take it you do not have an oscilloscope. That would be the instrument normally used to measure these things.

Note there is a chance we can "fake" the input levels but i dont think there is any way to fake the output signals. Maybe trial and error, but you could end up blowing out the circuit.
 

Attachments

Sensacell

Joined Jun 19, 2012
3,432
Any scheme that can convert the frequency of the incoming signal will typically introduce phase delays.
It's highly possible that this would make the motor controller unstable.
 

MrAl

Joined Jun 17, 2014
11,389
Hi,

Yes, there is always the chance this won't work for a number of reasons.
It is best to have the schematic for the entire system before any modifications are made.
 

Irving

Joined Jan 30, 2016
3,843
Any scheme that can convert the frequency of the incoming signal will typically introduce phase delays.
It's highly possible that this would make the motor controller unstable.
A simple divide by two shouldn't have any significant impact, but a fractional relationship phase-locked loop (PLL) where output is 2/3 input could well do so, while its trying to track sudden changes...
 

MrAl

Joined Jun 17, 2014
11,389
I think the most important thing now is to find out what the signal levels are. Without that we are dead in the water.
 
Top