My Toyota Pickup's speedometer has been reading incorrectly for quite some time. It shows a much higher speed than it should. As an example, next to construction projects on freeways there are radar-equipped LED signs which show speed readings of vehicles passing by. I will often see readings between 60-65 mph when I drive by, but my speedometer will read 105-110 mph. And I have driven this truck enough to know at the high end of 1st gear this truck is going about 15 mph, yet the speedometer is showing 25 mph.

I also damaged the trip odometer previously. It has a plastic shaft that comes out of the dash that you'd press to reset the trip odometer. On one particular day it required more force to press than normal, and like the fool I am, I pressed with more force to reset it. Except I heard and felt a crunch, and the odometer wouldn't reset to zero anymore. In fact the numbers on the trip odometer wouldn't spin anymore. Curiously the main odometer still tracked the mileage accurately, with occasional clicking of what I assume is gears jumping because a support piece is not allowing gears to mesh.

So like the curious lad I am, I took out the combination speedometer/odometer from this truck.

I'd sure like to keep this truck running past half a million miles.

People have documented this speedometer well enough. There are two versions of this speedometer, either mechanically or electronically driven. My truck is late enough to use the electronic version. There are 4 screws which hold the gauge in place, and also provide electrical connections. Three of these connections are important. The gauge needs 12V, GND, and a signal that comes from a sensor on the transmission.

The speed sensor is mounted at the rear end of the transmission, and sends pulses as the driveshaft rotates. It doesn't matter which way the driveshaft rotates, the output of the sensor are pulses. I did not disassemble the speed sensor, but I assume there is a rotating magnet that causes a hall effect sensor to short the output to ground. All that needs to happen to interface with this is to use a pullup resistor and detect every falling edge or rising edge as a fixed distance traveled. Assuming the use of the stock differential and stock size tires, the sensor is geared in such a way that every 4000 pulses/falling edges as a mile traveled.

The following image is one person's findings, but I did spend some time driving a known distance several times and tracking pulses, and I am getting closer to 4000 pulses per mile rather than their claimed 4038 pulses per mile. Do note that I am using 205/70/R14 tires inflated to 35psi, which comes out to about 201.9cm circumference instead of their given 239cm.

If all that's needed is an odometer, we could simply keep track of pulses and divide that by 4000 to get mileage. If we store two sets of counted pulses where one is reset to 0 by pressing a button, we get a trip odometer too.
To get an indication of speed, we also need to keep a fairly accurate time base. Since there are 3600 seconds in an hour, we have a factor of 4000 "pulses per mile" over 3600 "seconds per hour". Shifting units around, we arrive at 4000/3600 "pulses per second per mph".

With this calculated factor, I created a circuit that output a series of pulses, a square wave generator with adjustable frequency. I used the classic 555 timer for this.

With the given 10k potentiometer, I could generate square waves from about 12Hz to 125Hz. When this frequency range is fed into the speedometer, we should be seeing the needle move between 11mph and 112mph.

I was hoping that this speedometer was okay, but when I gave it an input signal with frequency of 31.2Hz, the needle moved to roughly 45mph instead of a proper 28mph reading. This lines up with the previous observation of 60-65mph actual speed being displayed as 105-110mph.

So something is definitely wrong with this speedometer. So let's look at the speedometer in more detail. Here is the backside of it.

Well this doesn't look great. It looks burnt, but it's actually corrosion. Some traces are corroded through, particularly the trace directly above the DIP IC is open in one spot. On the other side of the PCB are two electrolytic capacitors that have leaked. They are nichicon branded and 105C rated, a good brand but they are 29 years old now and have been subject to vehicle interior temps in the California sun. Other people may experience this issue in the near future, those capacitors may as well be ticking time bombs...

I took a bit of time studying how this circuit worked. The input power is fed through a diode for reverse polarity protection, then one electrolytic capacitor for decoupling. Instead of an IC like an LM7808 to generate 8V, there is a 9V zener diode with emitter follower to generate 8.4V. The discrete construction should provide a slightly higher sense of ruggedness to the electrical crud that vehicles can generate, compared to an IC regulator.

I did the best that I can to bridge any gaps in traces. The board was scrubbed and sprayed down first with acetone, then with 99% isopropyl alcohol. The black coating was scratched away and solder applied to bare copper traces. Some single strand wire was added to the long ground trace. The 9V zener diode looks like crap but it tested fine. The BJT that formed the emitter follower tested just fine as well.

I replaced the electrolytic capacitors with some no-name versions that I had on hand. The factory capacitor values were both 25V rated, 100uF for the input side of the voltage regulator, and a 10uF on the output. I replaced both with 100uF 25V. If they last only 10 years, fine by me. It doesn't take that much time to rip the dash apart :P

After removing the PCB, I looked into the trip odometer now that it was more visible. I noticed a broken plastic bar. This is likely what was causing the odometer to not work correctly. I applied some JB Weld plastic 2-part epoxy and held it together in the proper position for about a half hour. After some cleanup the mechanism did work correctly.

In my next post I will put it all back together and do some testing.

P.S. - Try to keep your greasy fingers off the front face, or clean with IPA. Or that fingerprint/smear is all you'll notice when driving once it's put back together.