0
\$\begingroup\$

I have looked at the schematics of a few 5V power relays and noticed different designs. Some use just a transistor to draw the higher current to switch the coil and some use optocoupler (surge protection) with a phototransistor.

Regarding this schematic: opto_relay Why do I need an extra transistor to switch the relay? Can I not just switch with the relay with the transistor of the optocoupler.

\$\endgroup\$
5
  • \$\begingroup\$ What part number for the opto coupler? Answer that is helpful \$\endgroup\$
    – Andy aka
    Jan 28 '20 at 11:32
  • \$\begingroup\$ common 4N25 vishay.com/docs/83725/4n25.pdf \$\endgroup\$
    – v3xX
    Jan 28 '20 at 11:35
  • \$\begingroup\$ And the relay data sheet? \$\endgroup\$
    – Andy aka
    Jan 28 '20 at 11:40
  • \$\begingroup\$ mycomkits.com/reference/Songle_SRD(T73)_Relay.pdf \$\endgroup\$
    – v3xX
    Jan 28 '20 at 11:45
  • \$\begingroup\$ just an aside: it's nice to put an LED in series (where DS1 is) so you get visual feedback when output is enabled. (So long as Vcc is enough for the LED and the optocoupler LED.) \$\endgroup\$
    – jonathanjo
    Jan 28 '20 at 14:46
2
\$\begingroup\$

Why do I need an extra transistor to switch the relay? Can I not just switch with the relay with the transistor of the optocoupler.

The 4N25 has a minimum current transfer ratio of 20% and that means that if you push the absolute limit of continuous current into the photodiode (60 mA), the photo-transistor might pull 12 mA through the relay coil.

enter image description here

And, for most 5 volt relays that won't be enough current.

You might have noticed that the absolute maximum figure for continuous collector current is 50 mA and, you might wonder how that can that be achieved given the minimum CTR and maximum diode current. Answer: the typical CTR may be around 50 % but it might be higher in some cases so, it's important to design around minimum and maximum figures.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ The 4N25 has a current transfer ratio of 20% ... not complete true .. the CTR is bigger than 20%. So, typically, it might (just) work, but worst case, it will not work \$\endgroup\$
    – Huisman
    Jan 28 '20 at 11:43
  • 1
    \$\begingroup\$ @Huisman oops yes, I forgot the word minimum. Fixed. \$\endgroup\$
    – Andy aka
    Jan 28 '20 at 11:45
  • \$\begingroup\$ thanks for clearing this up. I found some design notes where the opto characteristics are explained in more detail. \$\endgroup\$
    – v3xX
    Jan 28 '20 at 11:54
  • \$\begingroup\$ " it's important to design around minimum and maximum figures." Exactly. I have not been on this site very long, but a recurring problem seems to be users designing to data sheet typicals rather than worst case values. Oh, and not being able to read a data ahset properly. \$\endgroup\$
    – SteveSh
    Jan 28 '20 at 15:43
2
\$\begingroup\$

I have looked at the schematics of a few 5V power relays and noticed different designs. Some use just a transistor to draw the higher current to switch the coil and some use optocoupler (surge protection) with a phototransistor.
[...]
Why do I need an extra transistor to switch the relay?

  • Some optocouplers cannot provide with the current requried to operate the relay. An additional (power) transistor is needed to control the relay.
  • Some cheap optocouplers have bad (current ransfer ratio) CTR or a too wide spread in CTR. Using the optocoupler to control the next (power) transistor solves this.
\$\endgroup\$

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.