9
\$\begingroup\$

I need to turn ON/OFF an 12V 10A SMPS supply by a relay. I want to switch the SMPS via its line input using a microcontroller. I need a normally open non-latching magnetic relay such that the SMPS should be ON only if the microcontroller digital output is ON. The SMPS sources 6A on the DC side but sinks less than 1A RMS from the grid. I found this 110 mW relay which can be controlled 5VDC. Here is the relay datasheet.

From the datasheet what I understand is that when 5VDC is applied to its coil terminals, it passes 22 mA and its DC resistance is 227 Ω.

I'm planning to use the following single transistor interface to control the relay coil:

enter image description here

I have made a DC sweep in SPICE. Here are the plots:

enter image description here

With the above values the 2N2222 goes into full saturation at around 1.8V. In my case I will use a 3.3V microcontroller digital output. I also used a 1N4148 diode as a fast flyback diode to prevent high voltage spikes at the collector node.

The 2N2222A can handle collector current up to 800mA. In this case, the current is around 22 mA.

So far I couldn't find a problem myself in the above circuit interface for that particular relay.

Are there be any fundamental problems with this in terms of the components and their values, such as EMI causing false switching etc? I thought there may be some more details I might need to look into about the relay and transistor specifications.

edit:

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ I would lower R1 to 2.2kΩ to be safe. \$\endgroup\$
    – G36
    May 21 at 14:37

2 Answers 2

5
\$\begingroup\$

The 2N2222A is a metal can transistor (you may find some plastic transistors labeled 2N2222A by off-brands and online sellers but these should really be PN2222A). They are relatively expensive and being produced less and less. Unless you have some already that you want to use I would be looking at alternatives such as 2N3904 (200mA) or 2N4401 (600mA).

Other than that you might want to lower the value of R1 a bit if driving with 3.3V, particularly if you use a 2N4401 type transistor as these have a lower minimum beta rating than the 2N3904.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ 1N4148 will be fine here since the relay current will be around 22mA. So, the flyback diode current cannot be larger than this. Thus we can use 1N4148. \$\endgroup\$
    – G36
    May 21 at 15:02
  • 1
    \$\begingroup\$ Why would a 1N400X be preferred to 1N4148? I suppose 1N4148 would be faster because it is a small signal fast switching diode, compared to a slow mains rectifying diode. \$\endgroup\$
    – Justme
    May 21 at 15:08
  • 1
    \$\begingroup\$ Is there any advantage to use magnetic relay instead of a solid state relay for my application? I noticed some SSR has built in RC snubbers. Im gonna control a DC supply's AC input not run a motor ect. \$\endgroup\$
    – cm64
    May 21 at 16:38
  • \$\begingroup\$ An SMPS AC input side would be considered as a capacitive load so I thought no snubber is needed. \$\endgroup\$
    – cm64
    May 21 at 16:47
  • \$\begingroup\$ Please have a look at my edit i.stack.imgur.com/nlxiS.png I changed the transistor to 2N3904. I also reduced R1 down to 1.2k. So now simulation shows Ic/Ib =10 as Tony Stewart EE75 suggested this ratio \$\endgroup\$
    – cm64
    May 21 at 16:53
5
\$\begingroup\$

I have a different opinion and experience.

The 100mAdc diode can certain handle 1A in 44 us = L/DCR=10m/227 and its higher resistance (10 ohm vs ; 1 ohm in a 1A diode) is actually a small benefit to slightly speed up the arc extinguish time on the contact outputs. If you added 227 Ohm in series with that diode, it would cut the arc Amp-microseconds of burning the contacts which accumulates wear according to the load reactance and current.

  • a mechanical life of 1e6 cycles can be reduced to a few thousand cycles if overloaded with a motor for a contact that must be derated xx % according to size.

  • Speeding up the coil current reduces it only 50% with twice the DC voltage. This could be increased safely to 50V on the collector and an small RF cap added to increase the risetime >10us and avoid adding a click to the AM band (if you happened to accidentally :( have a large area loop for the transistor supply/gnd and coil.

  • Use twist pairs to all inductive loads when possible to reduce EMI when switching off. My coffee maker switches the heater off with a thermal switch at some temp and every time in another room the ceiling Philips LED PAR lamps flick off for a few ms.

  • also the contacts might need a resistive snubber or an RC snubber to quench the arc and extend relay life. On some electric stoves, where they avoid this extra cost, relays are replaced more often.

  • Choose the optimal base drive for maximum coil voltage would use the recommended 10:1 = Ic/Ib for the 0.65 V=Vbe but your values will work.

Good plots and use of LTspice with transfer function. In many Ic's you may have enough current drive (32mA @ Vol) to drive the coil with another 4148 diode, but a BJT works better,

Keep up the good work and pay attention to slew times like RC, L/R and arc holding time is harder to compute but easy to measure before after motor snubber recommended by Omron etc. (see archive.org)

\$\endgroup\$
8
  • \$\begingroup\$ Is there any advantage to use magnetic relay instead of a solid state relay for my application? I noticed some SSR has built in RC snubbers. Im gonna control a DC supply's AC input not run a motor ect. \$\endgroup\$
    – cm64
    May 21 at 16:38
  • \$\begingroup\$ An SMPS AC input side would be considered as a capacitive load so I thought no snubber is needed. \$\endgroup\$
    – cm64
    May 21 at 16:47
  • \$\begingroup\$ Also please have a look at my edit i.stack.imgur.com/nlxiS.png I changed the transistor to 2N3904. I also reduced R1 down to 1.2k. So now simulation shows Ic/Ib =10 as you suggested. \$\endgroup\$
    – cm64
    May 21 at 16:52
  • \$\begingroup\$ I'm surprised your coffee maker has not had some optimizations :) \$\endgroup\$ May 21 at 17:14
  • 1
    \$\begingroup\$ I added plastic caps to the bathroom fan that was causing my HDMI monitor to blip when the fan shut off, OK now, but that one's way down my priority list. and I'm the only one that can detect it. A few big trees blew down near Toronto on our street and my 14'x12' porch canopy almost held up and needs a slight reinforcement. TY for the reminder @AndrewMorton ;) \$\endgroup\$ May 22 at 0:15

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.