Re: Speed sensor
Two choices, both simple algoritmes, not so simple to implemente.
RPM = rotation per minute or RPS = rotation per second
Choice one:
mesure the time between pulses (T in mili seconds), you already know the perimeter of the wheel (L in centimeters) so
Velocity = L / T in cm/ms, for km/h just do the conversion
Choise two (in my opinion better):
count the number of pulses in one second (C in rps, assuming just one sensor), again you already know the perimeter of the wheel (L in centimeters) so
Velocity = C*L in cm/s, for km/h just do the conversion
dont forget that if you are using more that one hall sensor in the same wheel then
rpm = number of pulses / number of sensors per minute
rps = number of pulses / number of sensors per second