I'm reading engine RPM for a project and haven't had any issues with the following.

- The 22pf cap is for RF suppression
- The 18V TVS is for transient protection above battery volts.
- The 10k and 10nF serve two functions, they form an RC filter to smooth the pulses so they're easier to read on the mcu and the resistor limits the possible current into the mcu input.
Note: For the make and model of car that this circuit was designed for the ECU RPM signals is always 0-5V.
If you need the circuit to work for all types of RPM signals from 3V to 12V you will have to deal with 3.3V logic which will require more components if your MCU is 5V.
You will also want a zener on the mcu input so 5V+ signals don't try and push the input above VCC
(I will probably be adding a 4V zener to my circuit in the next revision
The MCU code triggers an interrupt on the rising edge which stores the current count of a hardware timer.
On the next rising edge interrupt the pulse length is calculated from the previous and current count. If the length is too short to be a real pulse its ignored.
The pulse lengths are feed into a running average to smooth out any possible errors.
Keep in mind that i'm not saying this circuit is the best solution, its just what i'm doing currently and haven't had an issues in the 50 or so cars i've used it on.