Condition Car Ignition Signal

automotiveavr

Background:

I'm working on a project that needs to accurately and quickly measure the rotational speed of the engine in my car. It is a MK3 Ford Focus, and each spark plug has a coil-on-plug that has three wires going to it from the ECU. They are signal, +12v, and ground. When the ECU wants to fire one of the plugs, it sends a +12v pulse on the signal line. The frequency of the pulse is going to be something between 0 and 100hz (ish).

Question:

What is a circuit that I can use to:

1) clean up the noise on the pulse, as it is pretty noisy.

2) Drop it to something that a) won't kill and b) can be detected by an AVR/Arduino/etc.

Is there any relatively simple way to do this?

Best Answer

This is galvanically isolated and will mimic the 12V signal at any* Vin.

schematic

simulate this circuit – Schematic created using CircuitLab

The camshaft position sensor (using any technology) outputs a pulse at EVERY firing.
CurrentWidthBetweenPulses = 1.0 / (RPM * NumberOfCylinders / 60.0)
RPM = ((1.0 / CurrentWidthBetweenPulses) * 60.0 / NumberOfCylinders)
RPM = ((1.0 / 0.015ms) * 60 / 8) = 500RPM
RPM = ((1.0 / 0.010ms) * 60 / 8) = 750RPM