1
\$\begingroup\$

enter image description here

This is a relay circuit I am using. I got the PCBs and the relay is not switching. After debugging, I noticed that one terminal of the relay is not going to 0V while the other is 5V. It stops at 2.5V or near that. Any ideas on how I might be able to fix this issue?

Note: I have not populated R48. It is left open. You can assume that it is not there.

\$\endgroup\$
8
  • 2
    \$\begingroup\$ What is VCC? +5 V? \$\endgroup\$
    – SteveSh
    Oct 17, 2023 at 12:06
  • 1
    \$\begingroup\$ And why are you using an opto, if your have the same VCC on both sides of the opto? \$\endgroup\$
    – SteveSh
    Oct 17, 2023 at 12:07
  • \$\begingroup\$ @SteveSh VCC is +5V opto was added to provide isolation but it is redundant as it has the same VCC on both sides \$\endgroup\$
    – Adithya
    Oct 17, 2023 at 12:08
  • \$\begingroup\$ Finally, with 2 LEDs in series on the input, you probably can't drive enough current through the opto's diode to turn it on hard. \$\endgroup\$
    – SteveSh
    Oct 17, 2023 at 12:09
  • \$\begingroup\$ @SteveSh VCC is a +5V,2A supply so I dont think its a current issue. \$\endgroup\$
    – Adithya
    Oct 17, 2023 at 12:12

1 Answer 1

3
\$\begingroup\$

You have a number of problems.

Your relay coil is rated at 180 mA, and the transistor collector current is rated at 100 mA max, so you need a beefier transistor. Something like a 2N4401 should handle the relay current.

The next problem is driving the transistor into saturation, your transistor has a minimum current gain of 110. So to get 180 mA collector current you would need 1.63 mA. Starting with a 5 V supply and subtracting the transitor's \$V_{BE}\$ and the opto's \$V_{CE}\$ you have maybe 4.2 V, with a 10K resistor that's 0.42 mA, nowhere neer what you would need. And that's not even forcing saturation, you need more base current than just \$I_C/Beta\$.

Let's look at the 2N4401 data sheet, it shows a \$V_{CE}(sat)\$ rating of 0.4 V for \$I_C\$ = 150 mA, \$I_C\$ = 15 mA, so let's figure on needing 18 mA base current.

$$ I_B = \frac{4.2V}{18mA} = 233\Omega $$ So your 10K resistor is not going to do.

Now, I'm not sure if the opto can handle 18 mA, so what you could do is use a darlington transistor, or two transistors wired as a darlington. This would reduce the needed base current to something like 180uA and allow you to keep the 10K resistor, and your opto shouldn't have any problem with that.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Whether the opto can handle it is less of a problem than whether the thing driving the opto can handle it, because that opto only guarantees a CTR of 20%! So to get 18 mA out, you'd need at least 90 mA in, and that's only guaranteed when Vce is kept at 10 V. \$\endgroup\$
    – Hearth
    Oct 17, 2023 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.