There are many Ideas when it comes to the speed sensors.
1- Variable reluctance magnetic pick up (like automotive ABS sensors)
2- IR LEDs & IR detectors
3- Hall effect sensor
3- In my case, a stepper motor as a generator
I took this motor from my old ink-jet printer. It had two stepper motors, this is the stronger one in terms of size, weight, sensitivity & output voltage
As you rotate the shaft of a stepper motor, it generates AC "alternating current", You may add a simple rectifier diode bridge to get DC "direct current" from its output.
The most challenging step is to mount the motor to the car transmission where the old speedometer cable used to be. So that the motor gets driven as the car move.
There should be:
1- Mechanical linkage between the motor head (gear) & the rotating speedometer rod inside the transmission
This was achieved using a small peice of copper folded upon itself. one end being rotated by the transmission, the second end to be inserted in a groove I made in the center of motor head (gear)
no welding needed :)
2- Good method for mounting the motor centrally in place. No shaking or to & fro movement is accepted
At my mechanic's, I drilled a 4mm hole in the transmission body, passed a screw & nut. Later on, I filled the gaps with epoxy resin glue. That was enough for good fixation.
Now I have a speed sensor with a 4 wires cable :)
This motor has 2 coils, each of which has two terminal wires. I took wire No 1 as a signal, wire No 2 as a ground
This motor can generate up to 48 Volts as I tested it. But When mount to my car's transmission, it rotates at near top speed generating 28 Volts. This is good. The relation betweed the car speed & voltage increase is linear. This is great.