I think it would help if you posted the car you had
I'm looking into doing something with the speedometer in the car I'm working on. (The gauge no longer works).
The speedometer cable still spins when the car is moving, and I'm hoping to build a sensor I can use to read the spin rate of the cable as a voltage.
Trouble is, I don't really know what kind of sensor I can use.
I know there are plenty of hardware savy people in the forums, and thought someone might be able to point me in the right direction.
What I'm hoping to do is connect the spindle of the speedometer cable to a yet unknown sensor that would translate the speed the spindle is rotating at into a measurable voltage.
Using a microcontroler to poll the voltage level, I hope to translate the voltage read into a human readable display of speed via an lcd.
Any help out there?
If you have OBDII, it would be easier to tap into the car. If not, here's how I did it back in 1986.
My speedo used something called the Hall effect. The speedo cable spun a 'U' shaped metal piece around a cup. The needle was attached to the cup and a spring. The electrical impulse pushed the speedo around to the right spot.
To convert the spinning motion into a digital signal, I used an infrared emitter and detector that bounced the light off of each side of the 'U' and circuitry counted the number of times it did that. We calculated that each pulse was worth 2.6 feet and polled the circuitry every now and then to see how many pulses had accumulated, compared that to the time it was last checked, and converted that to speed.
Here's the circuit but it was designed for the Atari 1200XL parallel port. That may or may not correspond to a parallel port on today's computers. I have to admit a friend of mine who was an EE did this for me.
Anyhow, that's one way to do it.
You raise a good point.
The car I'm working on is a 1990 VW Fox.
The spedo cable interlocks with the spedo, the gauge translates the revolutions of the inner spindle into the vehicle speed.
If I could measure the spin speed or the number of revolutions over a given period, I could calculate speed and distance traveled and display the numerics on some 7-segment leds.
Here's a quick overview of the connection.
You could get a square drive that fits the cable end or epoxy a flat rectangular piece of metal to the cable end. Use an emitter/detector and let the rectangular piece cut the beam twice per turn.
So I did some more thinking after reading your post BugByte, and I hatched an idea. I've run across several ball-type mice that used optical pickups to measure distance. If you've ever taken one apart you'll know what I mean.
The ball rests against two rollers, one for the x-axis, one for the y-axis. As the ball moves, it spins the rollers. Each roller is connected to a plastic slotted disc that is wedged between an ir transmitter and an ir reciever. The slots in the disc are spaced evenly, creating a pulse signal the mouse (and associated driver) use to calculate distance traved and move the mouse pointer.
My idea would be to salvage an old ball-type mouse. Drilling a small hole in the protruding square drive from the speedo cable, I'd attach the shaft and slotted disc and essentually turn the speedo cable into a single axis mouse.
Then I could read the pulse (or trap every pulse with a single slot disc) to count revolutions over time. With some measurements on the car itself, I should be able to accurately measure speed and distance using a picaxe or similar controler.
Interfacing to the display isn't a problem, but the only question I have is would the circuit be sensitive enough at higher speeds?
I dont think your going to get the speeds out of that at least at higher RPM's slow speeds would propbably work ok, most the time for a application like what your trying to do they use hall sensors. There are plenty of hall effect sensors that are I2C that you could interface with a PIC microcontroller. Nice part is they only use 2 to 3 wires to interface with and all you need on the end of the speedo cable is a magant.
Most after market cruse controls use a coil and rotating magnet, generates a few mv AC, also taxi meters.
another common one is hall effect transistor and spinning magnet.
I had to replace sensor on my taxi meter when I changed cars, cost me 26ukp / 50$ for it, was a plastic box, hall effect transistor and ....... a magnet..
You cut the cable, outer only, in two places and peeled off about 2cm of outer. lower half of box had clamps to hold the two ends of outer so they did not close back together in use.
The magnet was two halfs of a round wheel, and it was screwed onto cable inner like a wheel with the cable inner being a spindle. this wheel had a magneton one side.
As cable inner rotated, so did the magnet wheel.
You clipped on the top half of the box to protect it from hitting anything as it spun, the hall effect transistor was in top half of box so it was now near the magnet wheel.
Really basic, really simple, really reliable. (well you would not want a dodgy pickup to give out cheap fares would you......)
@Phoneboi - I really like the ball mouse idea because it is simple and home made. It's exactly the method I was talking about in my second post but the electronics are already built for you.
The question is whether or not the mouse circuitry will work at higher speeds. When I installed the infrared emitter/detector pair on my speedo, we didn't know if it would work at very high speeds. It did, to our surprise.
Test it by mounting the disc on the end of a dremel or a drill. Run it and see. If it doesn't work, go with the excellent suggestions from jcdillon and lez.
It would be helpful if you knew how fast the cable was going to spin. I had the repair manual to the car and it told the actual gear ratios that drove the cable so we were able to test at the right rpms up to 130 mph before putting it in the car. Later, we tested it between mile markers to ensure it was correct.
Of course, as 0.l33l pointed out, solving this using GPS is a snap. But it's not instantaneous and can vary in accuracy slightly.