Electrical – AC Switching Relay isolation with Optocoupler

opto-isolatorrelay

I am trying to do a schematic to switch a relay using my MCU. MCU GPIO works at 3.3V. I have come across the following schematic, but unable to calculate proper CTR and thus the value of Base Resistance of Q2.

The Forward Current Vs. CTR graph shows a CTR of 1 at 10mA (Vce 5V)

But I don't see the actually percentage of CTR in the Characeteristic table. The table has listed all the CTR at Vce 10V.

Please help.

enter image description here

enter image description here

enter image description here

Best Answer

The drive circuit as shown, if 'logic' might be TTL at 3.5V, is inadequate. The LED in the opto takes circa 1.2V, the visible light LED takes maybe 1.6, maybe 3 (depends on color), and the base-emitter drop takes 0.7V; that doesn't add up and give you a margin of operation. Try using the high gain of the transistor to drive parallel loads instead of stacking everything in series, like:

schematic

simulate this circuit – Schematic created using CircuitLab

As to the 'R3' value, with the mininum CTR of 4N35, 40%, and feeding circa 10 mA to the optoisolator, you get minimum of 4 mA base current. The 5V, 70ohm relay will take 71 mA, so a switch transistor with beta>100 and 200 mA capability (2N3904 or lots of others) will work fine. Figure on wasting one or two volts, with R3 * 4 mA = 1.5V and you get R3 = 360 ohms. At 5V that (if CTR is very high) limits the isolator transistor to 12mA, which won't hurt it or the base of Q2.

4N35 collector current maximum is 50mA continuous, 100mA peak.

Related Topic