I am trying to design a circuit to measure the RPM of a small internal combustion engine.
The ignition on the engine is a simple magneto style ignition. These ignitions are switched off by grounding a wire. When not grounded, the wire carries a signal that pulses once per revolution from 0V to up to 270V. The pulse length is typically 5 micro seconds.
Because the engine drives a remote controlled vehicle, it is important to isolate the ignition from the rest of the electronics, to reduce RF noise. Thus, I was thinking about using an optocoupler to take the pulse as input, with a suitable resistor in series to limit the current. On the output side, I am thinking about connecting the source to a pull-down resistor, and the drain to +Vcc of the Arduino.
The idea is to turn the input pulse (the yellow curve in the below image) into a square wave, and that is why I am thinking about a MOSFET-based optocoupler. The source would be connected to an input pin on the Arduino, programmed to work as a pulse counter (I have that part already done). The square wave does not have to have the same width of the pulse. In fact, I would like the square wave to overlap the portion of the pulse above 50V.
So my question is: What is the best optocoupler to use, and what is the best way to apply the 50V threshold?
Figure 1: The yellow pulse is the one that is fed to the optocoupler. Note that here it is inverted