Actually, Optocoupler circuit design is not that difficult as some thought. It’s just like you are designing a BJT circuit. If a BJT has its beta or current gain, optocoupler has its CTR or current transfer ratio. Once you know what a CTR is and learn how to use it, then Optocoupler circuit design is that easy.
Current transfer ratio or just CTR is the ratio of the collector to the forward current which is expressed in percent.
Collector current is the current that will flow to the collector of the transistor side of the optocoupler. On the other hand, the forward current is the current that flow to the diode side of the optocoupler.
Basically the diode side is linked to the transistor side by the device current transfer ratio. Apart from this information, Optocoupler circuit design is just like designing ordinary circuit wherein you are using KVL, KCL, ohms law and so on.
Optocoupler Circuit Design Steps
1. Select a Circuit Structure
Do not complicate your circuit. The lesser the parts count the better in two different ways. First reason is of course a lesser cost. The other reason is that with a lesser parts, the lower the total failure rate and the higher the circuit reliability.
Supposing you are only interested to
transmit signal from primary side controller to the secondary controller, your circuit must be simple as below.
Above circuit configuration is an inverter. If you want a non-inverting signal, you can use below structure.
The first circuit is normally an inverting one if you are going to saturate the transistor. However if you bias the circuit to operate in the linear region, you can get a voltage higher than zero at Vout node. The second circuit is a non-inverting configuration which is comparable to a common collector configuration of a BJT. But BJT common collector is more complicated than this circuit with the presence of the base current.
2. Select an Optocoupler Part
The next step in Optocoupler circuit design is to select an optocoupler part. In doing so, you must consider your application. If your application is a switch, you must select a device with a higher minimum CTR. If your application is linear, you can consider using the one with a tight CTR range. A tight CTR will correspond to a smaller variation.
If the design is to be exposed in high surrounding temperatures,
you better select an optocoupler with a CTR that will not much affected with the ambient temperature. Optocoupler CTR will decrease with increasing temperatures. For example in below graph, the relative CTR will decrease much at 100’C ambient temperature.
For long term product operation, you better consider also the life expectancy curve. As you see in the graph below, CTR will decrease as the device got aged.
3. Set Circuit Operation
This time you have to set the operating point of the circuit. To make this more informative, we are going to refer to the circuit below.
Define Output Level
The above circuit is can be configured to operate at linear or saturation regions. At saturation the Vout node is zero ideally while above zero but lower than Vcc in linear. When there is no bias in the diode side the level of Vout is simply the same to Vcc. So if you design the circuit as a switch, you must ideally assume a zero VCE or Vout when the Optocoupler is conducting. If the application is linear, you must define a particular level in the Vout node to be used in the design.
Define Rf Value
You can freely choose this value. However, in some applications you need to be careful. Most of the times, Vdd is derived from a digital circuit or device such as MCU or DSP. If so, set the value of Rf in such a way the current rating of the digital circuit or device is not exceeded. For MCU and DSP the sink and source currents are usually ranging from 4mA to 9mA (some other may reach higher than 9mA, you can always check in the datasheet). Supposing the current rating is only 4mA maximum, set actual forward current to at most 80% of it. So Rf would be
Applying the Optocoupler circuit design steps above will make the discussion more informative. Now, let us provide values for the circuit below. The output should provide logic low and logic high level. A logic low level is any voltage below 0.8V while a logic high level is equal to Vcc. The supply Vcc is 5V provided by an MCU with a source and sink current capability of 4mA. The optocoupler CTR is 80% and the diode drop is 0.7V. Consider Vcc of 5V.
Select Rf Value