Simple circuit with NPN issue

Hi all!

EDIT: they are all 12v relays, not 5v as in the original post

I would very much appreciate any advice on this simple project. It works, but after a while my NPN fries out.

Objective
Receiving a 12vdc input signal which triggers a 220v relay. My 220v relay is NC, so when I get 12vdc I want the 220v to shut off (open).

Requirements
The input device is sensitive and $$, so I want to isolate it via the opto-coupler.

The approach
The input device sends 12vdc which sink the NPN (SS8050) to ground, so the 12v relay triggers (it is a low level trigger). This in turn opens the NC circuit. There is a small 4.7k Ohm resistor to prevent false triggers.

The issue
When the input signal ceases, it takes 10-20sec for the 12v relay to trigger. I think the delay is due to the saturation of the NPN base. This worked for weeks, but then I started hearing the relay triggering 5x/sec each time the input signal would come, and after a while it no longer worked (tested it with a multimeter).

Diagnosis
Maybe the NPN is getting fried by the input mA?
Is there an issue with the circuit by itself which might be the culprit?

The transistor must be able to comfortably handle the relay current, and an inductive kick diode must be placed across the relay coil. The transistor base resistor must be correctly chosen so that the transistor is saturated when conducting.

For additional help, more information is needed. Post a link to the relay product page or data sheet.

Also, please post a hand drawn wiring diagram, with all pins, parts and connections clearly labeled. The Fritzing diagram is not useful.

DO NOT connect 220VAC to a breadboard!

Please read and use the link: How to get the best out of this forum - Development Tools / IDE 1.x - Arduino Forum

The wiring to the red led looks odd. I guess that the red jumper wire between the positive rail and the led anode should not be there. Further, for ">12v", you probably need a higher value resistor than 330 ohms.

Also, the relay is partially obscured by a large label so it is not clear but that does look like a relay module, and not simply a raw relay, because of what you are seem to be treating as a trigger pin. If so, the current through your transistor should be quite low.

If it were me I would use a solid state relay, no muss no fuss. They can be driven directly from the UNO which could be powered with a Wall Wart / Charger. The Solid State relay typically has an opto isolator built in. You can place that in an approved electrical box and feed the relay control with a maybe 22 AWG wire with at least 6oo volt insulation. That should pass most codes and most important safe to you and those around it. Something like shown below. They are also available in AC. If you must have DC you may have to do a bit of searching.

Hi, @lonelyartisan

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

What are the pin names of the NPN BJT.

Tom.... :smiley: :+1: :coffee: :australia:

will do, thanks

I must admit I did not know about inductive kick diode. I will definitely take a look. I could also upgrade the transistor, but from the spec sheet I think it should be able to handle it (Access to this page has been denied.)

I will handdraw the circuitry with full labels and repost

Rest assured, the terminal block goes to the 12v pin of the 220v relay. My final setup is soldered and wired and definitely NOT using a breadboard :grin:

this is the spec of the 220v relay

this is the spec of the 5v relay

the module itself was bought on aliexpress, something exactly like this

https://www.aliexpress.com/item/1624699191.html

you are right, this is a mistake from my drawing. I will fix it. The purpose of the LED is just as a visual cue to the state of the system.

And yes, the current is very low. It is hard to measure as the input signal is triggerd by my electrical utility company and I would have to run to the wire with a multi-meter to measure it…

Real life purpose of the project
The electrical utility company sends a 12v signal to notify that the electrical $/kwhrate is high, so this is why I want to turn off my 220v garage heaters.

I do have that after

I have 2 relays like this in two identical modules, both triggered by the input 12vdc source. That 12vdc input does not have enough current to power all the relays. This is why I isolate the 12vdc input signal and re-drive the 220v relay with a new self-powered relay

You don't need the voltage detection module and i may be causing problems.

Connect like this

Hi Jim

Do I understand you are using a voltage divider using resistors to accomplish the same thing?

Yes but I'm using the correct resisor values.

Here is a more detailed post of the schematic (this is to help the discussion and not denying Jim’s suggestion)

I have added more labels to the schematic.
Looking at the videos I made of the build process, I notice that the signal wire (yellow) of the voltage detection module is providing some low voltage even though the input signal is off. This is also why I put the 4.7k ohm resistor to prevent that noise from saturing the base and triggering the 5v relay.

Here are the details of each module shown

Voltage detection module

5v relay module

5v relay SRD-05VDC-SL-C

SS8050 NPN transistor
https://www.mouser.com/datasheet/2/149/SS8050-117753.pdf

220V KUHP relay

Power supply module

You say you are using a relay module but you give the datasheet for a bare relay.
Is this what you are actually using

Hi Jim,

Wouldn’t that drop it from 12v to 1.5v (enough to trigger the 5v relay?)

I might be reading this wrong, but this seems swapping R1 & R2 from your diagram.

Ground (black) goes to 22k in your diagram, but below ground (R2) goes to 3.3k

Am I reading this right?

yes I provide both the spec for the relay and relay module. You are correct I use the relay module.

No.
Actually it does not drop the votage at all but provides 3.4mA to the transistor base which should be more than enough to turn the transistor fully on and trigger the relay.

got it. thanks

Would that help with my original issue though? The circuit, with the voltage detection module, “works”. It just does not “last”. I’m all for simplifying, but I wonder if it will help not frying the NPN.

Is your suggestion meant to be complimentary to JRemington’s first suggestion of using an inductive kick diode?

No. There is no need for that diode.
The transistor should not have burned out if you have things connected the right way.

Are sure the power supply module is 5V?
Are you sure the transistors is not in backwards?