Getting electric shock from relay driver

Thread Starter

idrbur

Joined Jan 11, 2018
64
I am trying to use a 2n2222 to drive a 5v relay to switch a 220v bulb on and off but when a was pluging it in and touched the base of the transistor to give the to complete connection I got a nasty electric shock . I tried it with other relays I had but result was same .the mains current was leaking through transistor base.
But as far as I know the to side of relay should be completely insulated.IMG_20220224_064135.jpg
Could anyone tell why is this happening ?
and what can I do to prevent it.
 

eetech00

Joined Jun 8, 2013
3,859
I am trying to use a 2n2222 to drive a 5v relay to switch a 220v bulb on and off but when a was pluging it in and touched the base of the transistor to give the to complete connection I got a nasty electric shock . I tried it with other relays I had but result was same .the mains current was leaking through transistor base.
But as far as I know the to side of relay should be completely insulated.View attachment 261441
Could anyone tell why is this happening ?
and what can I do to prevent it.
Do you really have a ground connection to the relay contact?

There should not be.
 

dendad

Joined Feb 20, 2016
4,451
Is your 5V supply a plug pack?
Most cheap plug packs, like phone chargers, have quite a bit of leakage from the mains side. I do not think it would be via the relay.
With the mains removed from the lamp side, measure the AC voltage from the 5V common to mains ground.
Also, add a reverse diode across the relay coil to damp out the spike when switching off.
 

Thread Starter

idrbur

Joined Jan 11, 2018
64
Do you really have a ground connection to the relay contact?

There should not be.
No there is no ground connection to relay. The simulator I was using wasn't allowing me to simulate unless I added the ground..sorry for the misinformation
 

MisterBill2

Joined Jan 23, 2018
18,176
Some relays that I have, as well as others that I have seen, have the relay frame common with the movable contact.If that is the case then you are getting a solid connection to the 220 mains., if the relay frame is mounted to a metal case or the chassis.

One additional thing is that small relays are usually not suitable for mains power control.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,176
I am guessing that the relay is quite small, physically, and that the coil may not be adequately insulated. The relay frame may even be connected to a contact.
OR there may be a single strand of the mains circuit wire touching a coil terminal. I have seen that happen before, with far more expensive results.
 

Alec_t

Joined Sep 17, 2013
14,280
Because the relay coil is an inductor it will generate a high voltage spike when de-energised. That could well cause breakdown of the base-emitter junction of your transistor and give you a shock (as well as damaging the transistor). Inductive loads such as relays coils and motors should always have spike suppression components.
 

MisterBill2

Joined Jan 23, 2018
18,176
The voltage produced by changing magnetic flux in any inductor is related directly to the rate of change of that flux, which is usually related to the rate of change of the current through that inductance. contacting the base of an open base connected transistor is not likely to produce a rapid turn off of that transistor.
In addition, in post #5 the TS states that the power source for the relay coil was unplugged. It is not likely that a non-powered inductance will produce much of a voltage spike. Thus the voltage is far more likely to come from the 220 volt mains, still connected to the relay contacts.
Not all types of relays are intended, or suitable, for mains voltage applications. And given that we have not seen the relay we have no information as to how suitable it is for mains voltage applications.
 

MisterBill2

Joined Jan 23, 2018
18,176
I see only two connections in the view shown. A view of the terminals side is what we need to see. And showing the connections as they were when the shock problem is present.
And that is a very small relay to have contacts good for even twelve amps.
AND I ask all of those claiming it is an inductive spike from the coil to explain how that happens when the five volt supply has been unplugged. It seems that far too many folks follow that religion without adequate understanding the whole picture.
 

Thread Starter

idrbur

Joined Jan 11, 2018
64
I see only two connections in the view shown. A view of the terminals side is what we need to see. And showing the connections as they were when the shock problem is present.
And that is a very small relay to have contacts good for even twelve amps.
AND I ask all of those claiming it is an inductive spike from the coil to explain how that happens when the five volt supply has been unplugged. It seems that far too many folks follow that religion without adequate understanding the whole picture.
I have posted the circuit in the first post..the circuit is exactly like that and yes the shock is present even when the charger (that gives signal to transistor) is disconnected...I am starting to believe that the problem is that some kind of common connection is present inside.
So, thank you for all your insights they were really helpful.
 

MisterBill2

Joined Jan 23, 2018
18,176
I am aware of the circuit, I was hoping to see how close the coil connections are to the contact connections.
One suggestion is, with your meter, and all power disconnected, measure the resistance between the coil connections and the contact connections. There may be some degree of connectivity there. THAT would certainly cause a problem.
It might even be that there is some conductive solder flux creating the connection. I have seen leakage caused by solder flux that has absorbed moisture in a few places.
 

eetech00

Joined Jun 8, 2013
3,859
I have posted the circuit in the first post..the circuit is exactly like that and yes the shock is present even when the charger (that gives signal to transistor) is disconnected...I am starting to believe that the problem is that some kind of common connection is present inside.
So, thank you for all your insights they were really helpful.
The relay looks like a china made copy.
I'd use a different relay from a reliable manufacturer and avoid a possible dangerous situation.
 

Thread Starter

idrbur

Joined Jan 11, 2018
64
I am aware of the circuit, I was hoping to see how close the coil connections are to the contact connections.
One suggestion is, with your meter, and all power disconnected, measure the resistance between the coil connections and the contact connections. There may be some degree of connectivity there. THAT would certainly cause a problem.
It might even be that there is some conductive solder flux creating the connection. I have seen leakage caused by solder flux that has absorbed moisture in a few places.
Well it's pretty late around here so , and the image I get with phone camera aren't clear enough with the lighting I have so, I won't be able to post the image till morning but The distance between relay pin for mains connection and relay's coil connections was around 5-6mm . And when I measured resistance it was around 150k ohm(the resistance readings were fluctuating quite a bit between 90k and 190k)
 
Top