Speed Data Logger

I had been toying with the idea of reading the Rovers speed transducer with a computer for a while, and when the Trax'99 day came up (driving on the racetrack at Silverstone) it prompted me into action. After the useful advice from several Rover list members (Thanks Andrew, Tony and Nigel) I set about a few trials.

DISCLAIMER - if you try any of this and it kills your car electrics don't blame me. I know the risk I am taking, make sure you do too ... I am in no way implying that any of the circuitry shown will not cause damage to your car.

Hardware Setup

I have an old 486-66 portable running in the car, with a parallel port connection using an opto-isolator connected to the speed transducer. The exact circuit is -
Speed Logger Circuit
This basically draws the select pin (13) to ground through the 570 Ohm resistor and the opto-isolator activates every time the speed transducer sends a pulse. This switches the 5v signal (from a data line, I couldn't get a 5v signal from the parallel port any other way) to the select pin and lets it go high again. This works reliably within the 4000 pulses per mile specification of the speed transducer, and the parallel port detects the level change. I built the whole circuit in the hood of the parallel connector I took apart to use to connect to the PC.

Software

I set about writing some simple code in C to poll the port as fast as it could and record the time for level changes in the select pin. Apart from problems with accurate timing it was fairly straight-forward to implement. I ended up using a variety of different timers and timing the pulses in blocks of 50 until I found a relatively reliable method. I am still working on this too, but the current versions which I tested today can be downloaded here. Instructions are inside the archive.

And here is the graph generated for a 2 mile stretch of my drive to work this morning -
Speed Graph
The start is a slow crawl onto a roundabout, then a bit of power until I caught someone up. Slowing down to the next roundabout and then about 40 along the next stretch.

Even better though are the graphs recorded from Silverstone during Trax'99.

They are not actually exact laps, but 3 mile segments whereas the circuit is approx 2.5 miles.