0

I will start building a relay based on this answer:

https://electronics.stackexchange.com/a/464345/56969

Why is T1 needed? Every other component has an important purpose. But does T1 has an important purpose as well? Can I just remove it?

enter image description here

What would happen if I remove that transistor?


Edit

I know Arduino cannot supply more than 40mA on each pin and that is the reason why there is a separate power supply to turn on the relay. I guess my question should have been "Can the optocoupler supply 100mA of current?" If so, that means I can remove the transistor and have fewer components.

JYelton
  • 32,302
  • 33
  • 134
  • 249
Tono Nam
  • 557
  • 2
  • 5
  • 14

4 Answers4

7

Image from linked question: -

enter image description here

Basically the opto-coupler cannot provide enough current at low enough voltage drop to turn on the relay coil shown. The transistor acts as a power buffer and it "delivers the goods" with a small input signal power from the opto-isolator.

Addition

You may be able to replace the opto, the transistor and the relay by using Panasonic's PhotoMOS product range: -

enter image description here

Pick the DC/AC contact rating you need and the isolation voltage and if it fits your application then you're good to go.

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • This looks to be the best low cost solution as long as Opto leakage cannot trigger T1 to be amplifed by hFE to pull in relay to be easily bumped ON. Then add R3 across Vbe to shunt leakage. – Tony Stewart EE75 Jun 02 '20 at 17:59
4

A microcontroller pin can't supply enough current to turn a relay on. It can supply enough current to turn a transistor on though, and a transistor can provide enough current to turn a relay on.

DKNguyen
  • 54,733
  • 4
  • 67
  • 153
  • That is the reason why I have the optocoupler. Do I need an optocoupler and also a transistor? Can I just use the optocoupler without the transistor? – Tono Nam Jun 02 '20 at 16:09
  • 2
    @TonoNam To be honest, it depends on the optocoupler. An optocoupler only has photons to turn it's output transistor on so it likely would not be powerful enough to drive a relay coil directly. The transistor is a lot more reliable. – DKNguyen Jun 02 '20 at 16:16
  • @TonoNam - Most optocouplers output less current than you drive into the LED side. So with most optocouplers there wouldn't be enough to power the relay. – Kevin White Jun 02 '20 at 18:45
3

If you are sure that the relay coil current is less than 100 mA, then yes, you can eliminate T1 IF you can find an opto with a current rating of 150 mA or more. They are available, but cost far more than a 10-cent transistor. Example: LCA710

AnalogKid
  • 16,865
  • 1
  • 13
  • 25
2

- Extended comment

Your question and a simple answer are guaranteed to cause design errors from vague assumptions.

This is due to the lack of details and specs and ought to be revised and deserves to be rejected. How do you know how to read specs to guarantee 100mA output if only the input current max is given and temperature rise is unknown and effects on CTR etc.

  • BJT's unless binned, sorted and purchased with guaranteed CTR (or effectively hFE) with protection for exactly your correct specifications, design failure may occur.

  • The optoisolators eliminate conducted EMI coupling issues but not radiated.

  • Optoisolators vary widely with tradeoffs for speed, CTR, cost significantly yet CMOS and BJT switches are cheap. This is due to the challenges of extra conflicting processes for optical and doped silicon chemical processes.

  • Opto-isolators have inherently wide hFE's and thus CTR typically 50% to 600% on the best over environmental range whereas CMOS switch RdsOn only varies +/-50% typ.

    • yet CMOS Opto's are very expensive, reliable is better than BJT Opto's were designed for high power SSR's, IGBT's and MOSFET bridges.
    • yet mechanical relays can be cheap and can have current gains > 2k

An adequate question must have ALL the requirements including cost, qty, ambient

As suggested by @Analogkid there are now more modern solutions using CMOS Opto switches intended for high (power & cost) systems.

Your question is almost void of specs. enter image description here

Bottom Line or Lesson to learn

Learn how to read specs and write design specs in the same depth. This is not a secret but rather essential to good designs and becoming a good Engineer. "the better the question, the better the answer" or the more time you spend in good specs, the easier it is to design fault-free and with more options. It should not contain any specific part numbers.

Tony Stewart EE75
  • 1
  • 3
  • 54
  • 182