Do I have a bad relay or transistor?

Thread Starter

phillipsoasis

Joined Aug 22, 2022
63
I have the circuit as shown below. A 12 V relay and a 2n2222 transistor switch controlling the state of the relay, which turns on a Blue LED. The Control signal actually comes from a 555 timer, also powered from +14 V.

What is happening is the Blue LED comes on, but never goes off. The relay requires 37.5 mA to energize the coil. The circuit worked on a breadboard, but now soldered into a PCB it doesn't.

I made the following measurements with the 555 timer out of the circuit and applying the Control voltages directly:

ControlVbVcBlue LED
0 V0.5 V7.4 VOn
14 V0.7 V0.02 VOn

Why is the transistor on when the Control signal is grounded? Is the transistor bad? Is the relay bad?
 

Attachments

WBahn

Joined Mar 31, 2012
29,835
Assuming that you wired everything up correctly, the most likely candidate would seem to be a bad transistor.

If you got it turned around and applied power, you could have damaged it if the reverse bias on the base-emitter junction ever exceeded about 6 V.

What happens if you try a new transistor in there?
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
63
I am very confident the PCB is wired correctly. KiCad is pretty good at keeping the wire nest straight and preventing miswires. It could have been a bad unit, or maybe too much heat when soldering it to the board. The pads on a couple of these little TO-92 transistors were shorted together, and it took a bit of heat to remove the extra solder with copper braid. All the shorts were fixed before power was applied.

Trying a new transistor is not as easy as it sounds. It is in a TO-92 case and the leads are so close together that unsoldering and cleaning out the holes to add a new one is a real adventure in frustration. I already replaced one, and finally resorted to attaching it to the bottom of the board like a surface mount device as I could not get the holes for the leads cleared out. I just wanted to check my logic that the transistor is dead before spending another few hours getting this one out. But it makes sense, since when the base resistor is grounded, there is (0.5/1000 = 0.5 mA) flowing out of the base lead into ground. Most NPNs don't do that as a rule.
 

Ian0

Joined Aug 7, 2020
9,440
Measure the base-emitter voltage. If it is >0.5V then the output from the 555 is still on.
If it is >1V, then the transistor is faulty, or miswired.
If you have 12V across the relay, but 0V between base and emitter, you have a faulty transistor.
If you have 0V across the relay coil, then you have a faulty relay,

. . . but a 555 and drive a blue LED directly, so why use the transistor and relay?
 

WBahn

Joined Mar 31, 2012
29,835
I am very confident the PCB is wired correctly. KiCad is pretty good at keeping the wire nest straight and preventing miswires. It could have been a bad unit, or maybe too much heat when soldering it to the board. The pads on a couple of these little TO-92 transistors were shorted together, and it took a bit of heat to remove the extra solder with copper braid. All the shorts were fixed before power was applied.

Trying a new transistor is not as easy as it sounds. It is in a TO-92 case and the leads are so close together that unsoldering and cleaning out the holes to add a new one is a real adventure in frustration. I already replaced one, and finally resorted to attaching it to the bottom of the board like a surface mount device as I could not get the holes for the leads cleared out. I just wanted to check my logic that the transistor is dead before spending another few hours getting this one out. But it makes sense, since when the base resistor is grounded, there is (0.5/1000 = 0.5 mA) flowing out of the base lead into ground. Most NPNs don't do that as a rule.
When you soldered it to the bottom of the board, did you take into account that the pinout is mirrored?

Removing a TO-92 case should not be much of a problem.

You can use solder wick, or a solder sucker, or just heat the solder and quickly blow hard straight down onto the pad to blow the solder out of the hole.

You can clip the leads off the old part so that you can deal with one hole at a time.
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
63
Measure the base-emitter voltage. If it is >0.5V then the output from the 555 is still on.
If it is >1V, then the transistor is faulty, or miswired.
If you have 12V across the relay, but 0V between base and emitter, you have a faulty transistor.
If you have 0V across the relay coil, then you have a faulty relay,

. . . but a 555 and drive a blue LED directly, so why use the transistor and relay?
The 555 is not in the circuit.
The transistor is not miswired.
The second row in the table is correct. The first row is incorrect and the problem.
The blue LED is just to show the state of the relay. The relay is providing power to a 10 A circuit.
 

sghioto

Joined Dec 31, 2017
5,368
If all that is correct I would suspect there is some resistance between the collector and base on the pcb. Have you tried cleaning the board?
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
63
When you soldered it to the bottom of the board, did you take into account that the pinout is mirrored?

Removing a TO-92 case should not be much of a problem.

You can use solder wick, or a solder sucker, or just heat the solder and quickly blow hard straight down onto the pad to blow the solder out of the hole.

You can clip the leads off the old part so that you can deal with one hole at a time.
Sorry for the confusion. The transistor I soldered to the back of the board was a different transistor that had also died. Once I replaced it, that part of the circuit worked. Just working through the issues on the board lmao!

Good tips on desolding, and I used all of them, including a heat gun on one side of the board and a solder sucker on the other. Another one that sometimes works is using the graphite from a mechanical pencil to push through the hole once the solder is hot. Solder won't adhere to the graphite. Epic failures for each one on the first TO-92. This one will be much easier...lmao!
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
63
Well, I replaced the transistor and relay. Same behavior of the circuit - grounding the Control does not turn off the blue LED. Same measurements as in the table in my original post.

What am I missing?
 

sghioto

Joined Dec 31, 2017
5,368
What am I missing?
I just duplicated problem! The transistor is installed backwards, meaning the collector is ground and the emitter is tied to the relay coil.
When I did that I got the same voltage readings. What transistor are you using?
1701822316870.png
Another suggestion, since the relay coil is 400 ohms and only 35ma at 14 volts one could remove the transistor and drive it directly from the NE555.
1701822671751.png
 
Last edited:

Ramussons

Joined May 3, 2013
1,394
I just verified the problem! The transistor is installed backwards, meaning the collector is ground and the emitter is tied to the relay coil.
When I did that I got the same voltage readings. What transistor are you using?
View attachment 309245
Another suggestion, since the relay coil is 400 ohms and only 35ma at 14 volts one could remove the transistor and drive it directly from the NE555.
View attachment 309246
.... with a protection diode across the relay.
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
63
I just duplicated problem! The transistor is installed backwards, meaning the collector is ground and the emitter is tied to the relay coil.
When I did that I got the same voltage readings. What transistor are you using?
View attachment 309245
Another suggestion, since the relay coil is 400 ohms and only 35ma at 14 volts one could remove the transistor and drive it directly from the NE555.
View attachment 309246
OMG YOU ARE BRILLIANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I replaced the transistor with a new one, but put it in backwards per your recommendation, and it worked as designed!!!

I don't have the P2N2222 I have the 2N2222, but the P2N2222 datasheet that I used to layout the PCB. LMAO

Yes, I could drive the relay directly from the 555. However, as the board came up I wanted to guarantee 100% of the time that the transistor would come up in the OFF position (base to ground). I have a pull down resistor connected to the base resistor, so no matter how the 555 output comes up/bounces/ I know there is a ground on the base at power on. I don't want it to float. This relay provides power to a rocket igniter circuit, and I need to be sure that there is no ambiguity in what state it is in. Don't want to be anywhere near the rocket when the igniter goes off!

I must have the wrong footprint in KiCad as I have about 6 of these 2N2222s on my board and I swore yesterday that the board was haunted as nothing was working as it should. Unfortunately, I am faced with replacing these guys, and the pads are so close together (0.254 mm) that I spend a lot of time removing solder from them as they short out.

THANK YOU SO MUCH!!!!!
 
Last edited:

BobTPH

Joined Jun 5, 2013
8,654
Unlikely. 2N2222 comes only in a metal can. If you have a '2222 type transistor in a TO92 it is either a PN2222 or a P2N2222, and they have different pinouts.
 

Thread Starter

phillipsoasis

Joined Aug 22, 2022
63
If you are fixed on using the transistor I would wire R101 and 102 like this:
BTW is the 555 configured as a countdown timer?
View attachment 309309
Excellent point. Rev 2 of the board!
Unlikely. 2N2222 comes only in a metal can. If you have a '2222 type transistor in a TO92 it is either a PN2222 or a P2N2222, and they have different pinouts.
This is how the transistor is marked. I just replaced another one and reversed the leads, and another section of the circuit is now working. PXL_20231206_200307160.jpg
 
Last edited:
Top