I am planning to convert this pulse to a digital signal (apx. 5 V for MCU input) based on voltage level. The maximum voltage of this pulse is 12 V when the injector nozzle is closed and 0 V otherwise. Also, the smallest pulse width is 2 μs.

I don't know which components to use. Is it an optocoupler and an N-type MOSFET? Any recommendation of series or other components and method to use?


1 Answer 1


You could use a logic-output optoisolator and connect the output directly to the MCU. For example, this one, which is inexpensive and switches typically in well under 100ns, and should do the job for 5V MCU supply voltage.

Note that the isolation is not adequate to protect against ignition wire voltages. If you need to protect against accidental discharge then more parts would be required.

Input circuit could just be a 2K series resistor and a reverse-biased 1N4148 across the LED to protect it.

enter image description here


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ I'm a little concerned about the LED. The maximum input forward voltage is 1.65V. Meanwhile, the injector pulse is up to 12V. \$\endgroup\$
    – Ktray
    Jan 3 at 8:37
  • \$\begingroup\$ That's why the 2kΩ series resistor.. it will limit the current to around 5mA with 12V in. The threshold will be around 4.4V. \$\endgroup\$ Jan 3 at 8:39
  • \$\begingroup\$ I'm sorry for still not understanding what it means. What calculations are done to be able to determine the threshold is 4.4V when the input is 12V and the current is 5mA for the LED input? Or is it in the datasheet? As far as I understand it is Vf and If as variable/pin that connected to injector wire. \$\endgroup\$
    – Ktray
    Jan 3 at 8:59
  • \$\begingroup\$ The current is approximately (Vin - 1.55)/R1, so for 12V it is ~5.2mA. The 1.55V is the Vf of the LED at 3mA. At 5mA it will typically be a bit higher. The threshold current is 1.6mA max (from the datasheet), so Vin = 4.8V (I used 1.2V for Vf which is a bit lower than the datasheet but at 1.6mA Vf will be lower). \$\endgroup\$ Jan 3 at 9:32
  • \$\begingroup\$ The optocoupler responds to LED current, just like current through a visible LED.The resistor turns the input voltage into an appropriate level of current. If you connect 12V to the LED directly, it will be destroyed. Also you should not put more than 5V reverse voltage across the LED so the 1N4148 (+ R1) protects the LED against that, in case of transients or wrong connection. \$\endgroup\$ Jan 3 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.