Electronic – Why do optocouplers require a resistor at the collector

opto-isolatorresistor-transistor-logicresistors

Optocoupler Circuit

In this circuit, if the resistor in the collector R1 is 0 Ohms, the circuit doesn't work. That is, the output will be 12V DC signal as it is from the battery. And if R1 is non-zero, then the circuit works and produces expected output. Can someone explain me why that resistance (R1) is required in this circuit?

Best Answer

Imagine an optocoupler's output as a device which is willing to pass through a light-dependent amount of current whenever the collector voltage is higher than the emitter voltage (in practice, the amount of current is a complicated function of the amount of light and the amount by which the collector voltage exceeds the emitter voltage). With no light, it will pass 10 microamps, and its current-passing capacity will "peg" at 100mA. If the current limit of the opto is I, the voltage at the collector will be 12V-IR or zero volts, whichever is less.

If the resistor were e.g. 1 meg, the amount of volt dropped by the resistor would be a minimum of 10 volts, meaning the collector voltage would never get above 2 volts. Cutting that resistor to 500K would reduce its minimum voltage drop to 5 volts, allowing the collector up to 7. Cutting it to 100K would reduce the voltage drop to 1 volt, allowing the collector up to 11 volts. The smaller the resistor, the higher the voltage when the opto is "off", approaching but not quite reaching a limit of the full 12 volts.

On the flip side, when the opto is on, the voltage drop across the resistor will be 100mA times the resistance or 12 volts, whichever is lower. If the resistor value is 120 ohms or less, the 12 volt supply will me the limiting factor. If the resistor were e.g. 100 ohms, the resistor voltage would be limited to 10 volts, meaning the collector voltage would only get down to 2 volts. Note that if the resistor is large enough, further improvements won't affect the voltage, but if it's too small, the output voltage will be quite sensitive to resistance.