Speed sensor output from a controller

Get all your technical information about electric bikes here.
Post Reply
User avatar
geoff57
10 kW
10 kW
Posts: 827
Joined: Apr 25, 2007 5:32 pm
Location: England

Speed sensor output from a controller

Post by geoff57 » Jan 07, 2018 5:12 pm

Hi
I have a problem with a standard cycle computer and the sensor, try as I might I cannot get the sensor and magnet to work reliably. I’ve decided to use the speed output from the controller in the same way as a cycle analyst does, since the controller output is governed by the number of magnets I thought of putting a attiny85 in line to give a single pulse per revolution I could decide the cercumfernce of the wheel by the number of magnets but I have a feeling the number will be too small and the direct pulse from the output may not be compatible. What I need to know is what is the exact output from this wire does it mimic one of the hall sensors in the bike this would give an outputbetween close to 0v and close to 5v, once I know what type of output it is I can start programming my last resort is to put the motor in a vice connect a controller with power and mesure what comes from the speed output wire, this is not something I am looking forward to.
Geoff

User avatar
amberwolf
100 GW
100 GW
Posts: 24228
Joined: Aug 17, 2009 6:43 am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: Speed sensor output from a controller

Post by amberwolf » Jan 08, 2018 2:31 am

FWIW, your posts would be a lot easier to read if you broke them up into separate ideas/sentences/etc., without the run-on unpunctuated sentences.

Typing it out as a step-by-step may also help you work out what you can do and cant' do, too, and perhaps how to do it, by forcing you to think about each step/idea. ;)

geoff57 wrote:
Jan 07, 2018 5:12 pm
I have a problem with a standard cycle computer and the sensor, try as I might I cannot get the sensor and magnet to work reliably.
What does "work reliably" mean in this case?


I’ve decided to use the speed output from the controller
I don't know of any "speed output" on any of the controllers I've ever had. But there are three "hall sensor inputs" on most of them (except for the sensorless ones).

If yours has an actual "speed output" you'll have to test to see what that output actually is, compared to one of the hall sensor outputs from the motor (as measured at the controller's hall sensor inputs).


I could decide the cercumfernce of the wheel by the number of magnets
You can't determine the circumference of the wheel in any way other than directly measuring it, or doing an assumption based on "standard" wheel diameter sizes (which wouldn't account for actual tire sizes or inflation).

If you already knew the speed at which you were travelling, you could measure the time it took for one rotation to occur, and that would give you the distance travelled (and thus the circumference), but only if the speed were perfectly constant. Unless you already know the circumference of at least one wheel, and have a second sensor on that wheel, so you can measure it's speed (distance over time), to use that reading in comparison with the other wheel you're trying to measure with it's own separate sensor, you can't get all the info you need to determine a wheel's circumference from a wheel speed/rotation sensor.



What I need to know is what is the exact output from this wire does it mimic one of the hall sensors in the bike
You should test that for your particular controller, for the reasons I gave a couple steps above.

my last resort is to put the motor in a vice connect a controller with power and mesure what comes from the speed output wire, this is not something I am looking forward to.
Or stick the motor in an upside down bike, and spin the wheel by hand?

There's certainly no need to power the motor to read the hall sensor output as a speed sensor.

Unless, of course, you have a geared hubmotor or middrive motor, in which case you can't use it's hall sensors as a wheel speed sensor anyway, because they only sense motor speed (the wheel freewheels when motor is not powered to spin at least as fast as the wheel, and so the hall sensors cannot give the wheel speed).

Post Reply