A summer project involving programming a PIC micro controller to measure my Honda Civic's MPH. The circuit I made measures the frequency of the pulses coming from the Vehicle Speed Sensor wire in my car, and calculates my speed based on that, and displays it. The speed displayed is a little jumpy, but the average of the numbers you see measure the speed well.
For a 2002 Honda Civic:
The Vehicle Speed Sensor wire is a white/green wire attached via the Connector-A (of A,B,C,E connectors) to the ECU, The ECU is behind the glove box.
The VSS wire sends 4104 pules every mile.
A frequency meter using a Programmable Interrupt Controller (PIC) was built, referencing this site: http://freenet-homepage.de/dl4yhf/freq_counter/freq_counter.html
The assembly code was modified to multiply the frequency measured by a scalar number less than one (which varies depending on the pulses per mile).
I have updated my projects page with more info:
See the sections: "PIC Digital Speedometer"
http://mcclanahoochie.com/blog/portfolio/pic-digital-speedometer/
and "MPGuino"
http://mcclanahoochie.com/blog/portfolio/mpguino/
listed there.
Enjoy!
Related video: http://www.youtube.com/watch?v=4lAbZnaws5E
Great, i wanna do something similiar. so can you give me a ratio for Vss frequency vs MPH
super3izzh 6 months ago
@super3izzh for my car, MPH=VssFreq*Scalar ; I believe I used 0.75 as the scalar after doing some manual tuning by comparison with a OBD2 port reader. Good luck!
mcclanahoochie 6 months ago
@mcclanahoochie Thanks for you quick response. I am little confused, because your blog said 8208 pulse per mile, and here you said 4104 pulses.
super3izzh 6 months ago
@super3izzh Indeed, good catch. The 8208 number is used in my MPGuino (and is accurate). The 4104 number was used to help estimate the scalar mentioned previously. The way I did it - simply measuring the frequency, then scaling it - doesn't rely on the 4104 number anyway. The differing 4,8 numbers come from whether you measure an entire rising/falling edge of the clock, as a single pulse, or count any change to clock pulse - so it's implementation dependent. Sorry for the confusion.
mcclanahoochie 6 months ago