Optocoupler Operation as Switch Tutorials with Design Sample

The optocoupler operation as switch is similar on how to configure BJT as switch. For a BJT to operate as switch it must be set to function in saturation and cut-off. Optocoupler as well. However in BJT circuit the base current must be high enough to drive the transistor into saturation; but in Optocoupler it is the forward current. In BJT the base and collector currents are link to each other by the current gain of the transistor or simply beta. In Optocoupler circuit, the forward and the collector current are link to each other with the current transfer ratio or simply CTR.

CTR=\frac{Ic}{If}\times 100%

To set optocoupler operation as switch; it must be driven into saturation. To saturate, the forward current must be big enough compared to the collector current. But is this possible? The collector current is always a function of the forward current and the device CTR.

Going back to BJT circuit; at saturation the transistor is no longer gaining thus the dependency of the collector current to the base current is no longer valid. It is the same scenario in Optocoupler. At saturation the circuit collector current is no longer link to the forward current through the device CTR. So in determining the collector current at saturation the above equation is no longer valid. Take note on this.

Optocoupler operation as switch is can be checked or set correctly by comparing the circuit CTR and the device CTR (CTR method). Circuit CTR is the ratio of the circuit collector to forward current.

CTRcircuit=\frac{Iccircuit}{Ifcircuit}\times 100%

The device CTR is the current transfer ratio of the device specified in the datasheet. At linear operation the circuit CTR is always following the device CTR. However, at saturation, the CTR demand of the circuit is very low compared to the CTR that can be provided by the device; thus the circuit will saturate. Just like you are asking a glass of water but someone gives you a jar of it; you cannot intake all of it.

Therefore at saturation the circuit CTR must be less than the device CTR.




Another way of checking an Optocoupler operation as switch is by computing the collector-emitter voltage (VCE method). At saturation its level is always zero or equal to the device VCEsat.


Therefore collector-emitter voltage below this level is making the optocoupler operates in saturation. In this technique you can still use the device CTR. Do not be shocked if you can get a negative VCE level despite the circuit supply has no negative value. It’s only implying that the device is operating at saturation. Then compute for actual collector current without using the device CTR value.

Design Example

Verify the circuit below if it can operate as a switch. Vdd and Vcc are both 5V. Consider 80% device CTR and the forward voltage of the diode is 1V.

Optocoupler Circuit
Figure 1

For Optocoupler operation as switch the collector-emitter voltage must be zero or just equal to the maximum saturation voltage specified in the datasheet. So in above circuit the node Vout must be zero since no specified VCEsat value.

Proving Optocoupler Operation as Switch using CTR Method

Solving for the forward current

KVL at loop 1

If=\frac{Vdd-Vf}{R1}=\frac{5V-1V}{500\Omega }=8mA
Optocoupler Operation as Switch
Figure 2


Solving for the collector current

The maximum collector current is

Ic=\frac{Vcc}{R2}=\frac{5V}{3k\Omega }=1.67mA


Solve for the circuit CTR


Comparing circuit CTR to device CTR

CTRcircuit is less than CTR device. No doubt the Optocoupler will saturate.


Proving Optocoupler Operation as Switch using VCE Method

No need to solve for the forward current, it’s the same with above result.

Solving for the collector current

Ic=CTRdevice\times If=80%\times 8mA=6.4mA

Solving for collector-emitter voltage

From loop 2

VCE=Vcc-IcR2=5V-6.4mA\times 3k\Omega =-14.2V

The computed VCE is -14.2V. How come it becomes negative that the supply has no negative? Do not be confused, the negative sign means that the Optocoupler is at saturation. This is also indicating that the device CTR is no longer valid in solving for the collector current. The true collector current is only dependent to the collector resistor.

One comment

  1. Thank you for this great article and your other ones on optocouplers. I learned a lot about this great device and the important values in the datasheet and the graphs. The information you are sharing is very valuable. Practical quality material is hard to find. Most articles on the internet are very brief and devoid of any in-depth information. Electronic books are extremely impractical and boring. I am an electrical engineer by education, many years ago, but never learned practical useful information in those books to build fun educative circuits to tinker with.

    Please keep up your great work and thank you again for sharing your experience with the world.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.