Vehicle Speed Sensor: Will this work?

I’m going to be attempting to make a sensor arrangement on a project car where I can generate my own vehicle speed signal for the cluster and ECU.

The plan is to mount a magnet on the driveshaft and use this hall-effect sensor:

I purchased an Arduino Uno and was going to connect the sensor to an interrupt, incrementing a value every time the sensor triggers. Every 100ms or so I would simply do the math out to calculate RPM and generate the appropriate speed signal.

Does this sound like it should work? I’m pretty new to playing around with electronics and sensors, so I thought I’d poll you guys to see if I’m missing something obvious.



That might work, though with one click per rotation you will not be getting very fast updates. Also, you should probably use at least two sensors, so that if the car happens to stop at a critical point you don’t get a lot of transitions just from noise. As a bonus, you will then know whether you are going forward or backward.



Thanks for the advice. After checking out the gear ratios for my project, indeed I will likely need to add magnets to the shaft (at least 2-3) in order to get a reasonably accurate measure of speed for my chosen update rate (I think I’m leaning toward 250ms). The second Hall-effect sensor is a great idea to allow me to filter out noise.

It occurred to me in thinking about affixing the magnets to the drivetrain that something like a flexible strip with magnets embedded in it, or even something like a ziptie with magnets embedded in it with even spacings would be great for a lot of hobby projects. Does anyone know of something like this?

Try searching for “refrigerator magnet sheet” or something like that. I believe that large refrigerator magnets (e.g. magnetic business cards) use strips of alternating polarity that could be exactly what you want, and you might have some at home already!