solenoid operation - wiring problem

Thread Starter

gizmo1007

Joined Sep 20, 2014
5
1622498417748.png

Q1 / Q2 = KSP2222ABU NPN Transistor, 600 mA, 40 V, 3-Pin TO-92
R1 / R2 = 470 ohm
J5 connected to Solenoid 1 both are the same specification.
J6 connected to solenoid 2 rated at 12v <160ma 3W
Pwr is 12v from bench top power supply
R1 is connected to GPIO Pin on RPI Zero
R2 is connected to GPIO Pin on RPI Zero
Orange wiring is on bottom Layer
Yellow wiring top Layer
D1 / D5 are diodes
J6 operates without any problem.
J5 does not operate at all?
I've cross checked the solenoids, no issue,
I've changed the GPIO pin no issue.

I cannot figure out why this circuit would not allow J5 to operate the solenoid, and J6 operate without fail each time
The solenoids are not run concurrently, they are only required 1 at a time.

I cannot find the root cause of the problem here, any help or guidance would be gratefully accepted. Please excuse my poor electronics skills, my background is in mech. Eng. and I'm not on the Arduino train.

Could the issue be the circuit wiring layout or diodes used or other?

Many thanks

Giz
 

Irving

Joined Jan 30, 2016
3,843
Can't see anything obvious from PCB layout. Suspect blown transistor or poor solder joint.
If you have multi meter, check continuity of all tracks/joints. If OK, confirm that shorting collector of each transistor to ground (emitter) activates relevant solenoid. If OK confirm voltage at base of each transistor, wrt emitter, is 0v when gpio off, rising to 0.6v when gpio on. If that's OK, check collector of each transistor is +12v, wrt ground, when gpio off, falling to <1v when gpio on. That should help locate fault. If still no joy come back...
 
Last edited:

Thread Starter

gizmo1007

Joined Sep 20, 2014
5
Can't see anything obvious from PCB layout. Suspect blown transistor or poor solder joint.
If you have multi meter, check continuity of all tracks/joints. If OK, confirm that shorting collector of each transistor to ground (emitter) activates relevant solenoid. If OK confirm voltage at base of each transistor, wrt emitter, is 0v when gpio off, rising to 0.6v when gpio on. If that's OK, check collector of each transistor is +12v, wrt ground, when gpio off, falling to <1v when gpio on. That should help locate fault. If still no joy come back...
Hi Irving,
Firstly thanks for the pointers here is the update
1. Continuity checked on each track - OK.
2. Shorting collector to emitter activate solenoid - OK.
Working solenoid
a. Base to Emitter with GPIO OFF 0V - reading 12V
b. Base to Emitter with GPIO ON 0.6V - OK
Not working solenoid
c. Base to Emitter with GPIO OFF 0V - reading 6.6V
d. Base to Emitter with GPIO ON reading 5.2V

5. Collector wrt Ground +12V - Collector is connected to Ground so reading is Zero.
Both working and non working solenoids are wired the same way.
 

djsfantasi

Joined Apr 11, 2010
9,156
As @Irving suggests, it looks like the transistor connected to J5 is blown. If you have a transistor checker on your DMM, use it on that transistor. Or google how to test a transistor with a DMM.
 

Irving

Joined Jan 30, 2016
3,843
Hi Irving,
Firstly thanks for the pointers here is the update
1. Continuity checked on each track - OK.
2. Shorting collector to emitter activate solenoid - OK.
Working solenoid
a. Base to Emitter with GPIO OFF 0V - reading 12V
b. Base to Emitter with GPIO ON 0.6V - OK
Not working solenoid
c. Base to Emitter with GPIO OFF 0V - reading 6.6V
d. Base to Emitter with GPIO ON reading 5.2V

5. Collector wrt Ground +12V - Collector is connected to Ground so reading is Zero.
Both working and non working solenoids are wired the same way.
Hmmm, sorry, but not convinced you're measuring correctly. I think you're confusing collector and emitter. Looking at the flat of the transistor case its C, B ,E but your board layout, assuming looking at top of board, has it as E, B, C. Collector must be the one connecting to the solenoid - for NPN more +ve than the emitter.

solenoid.JPG

Here is your circuit and expected voltages. Looks like Q1 is dead.

1622564989093.png
 
Last edited:

Thread Starter

gizmo1007

Joined Sep 20, 2014
5
@Irving many thanks for the support, I don't doubt I am doing something wrong,
Yes your correct the board view is face down, can't understand why solenoid Q2 is working
The Datasheet https://www.onsemi.com/pdf/datasheet/p2n2222a-d.pdf is
showing me as opposite I guess I'm reading the datasheet incorrectly?
Q2 is working and I switched Q1 to no avail?

Its the fact Q2 is working is confusing me, and the Transistors are orientated the same for Q1 and Q2

1622583455488.png
 

Irving

Joined Jan 30, 2016
3,843
No, I think you're reading that data sheet correctly. There are literally 100s of small signal NPN switching transistor parts that are E-B-C layout that would work, eg BC337, ZTX450, etc. But heres an odd thing - this *2222* data sheet shows a generic 2222 part with an E-B-C layout. In fact, after I looked at this more it seems both layouts are possible for that device. I think you've just been unlucky here, and whoever laid the board out was either 'assuming' the 'normal' layout for an NPN switching transistor or was using a different data sheet.

Incredibly, it's possible Q2 works because in fact it's correct for that layout???
 

Attachments

Thread Starter

gizmo1007

Joined Sep 20, 2014
5
I laid out the board, using fritzing and get it produced in the fritzing fab, I did test it on the breadboard before I designed up the layout.
I rebuilt it on the breadboard last night and it worked, so will need to relook again at the layout to see what should be changed.
 

Thread Starter

gizmo1007

Joined Sep 20, 2014
5
@Irving just by way of update, I have got it working,
1622651117907.png

I used the 2 transistors from the Breadboard test run I did last night and replaced Q1 and Q2 using the board layout CBE,
In addition, I added a connection from 12V+ to +side of J5 maybe overkill but just wanted to add a direct connection to the +Side of J5 although it was connected when I did the continunity test.

Many thanks once again.
 

Irving

Joined Jan 30, 2016
3,843
You're welcome, glad we sorted that and its working for you. Gettng the right 'footprint' for a part can be a pain sometimes, but having two complementary pinouts for the same part is a new one even for me - you learn something new every day!
 
Top