Maker Pro
Maker Pro

2N2222 NPN Transistor

slr1337

Mar 15, 2014
3
Joined
Mar 15, 2014
Messages
3
I am using 2N2222 Transistor to switch a 12v relay on.
Upon checking my circuit my as I power my base on w my arduino it correctly allows continuity between the collector and the emitter. However, when I connect my 12vdc power source (a car battery), It seemingly ignores my transistor and powers on the relay with no power to the base. I am extremely new at building circuits. Is the problem my transistor. How would I know what transistor to use. Thank you for taking the time to read my post. All help is appreciated. Thanks
Code:
                                       Diode 1N4007
                            -----------|---- >|-------|-------+12v-->
                          /            |              |
                         C             |---|Relay|----|
~5vdc     2.2kΩ        /
--------------WW---B--|
                       \
                        E
                         \
                          =
                        Ground
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
1) are you certain you have not switched the emitter and collector around?

2) is your ground common between your arduino 5V supply and and your 12V supply?

3) Are you powering your arduino form a separate supply?
 

slr1337

Mar 15, 2014
3
Joined
Mar 15, 2014
Messages
3
Thanks I'll try it and let ya know.

1) are you certain you have not switched the emitter and collector around?

2) is your ground common between your arduino 5V supply and and your 12V supply?

3) Are you powering your arduino form a separate supply?

1. I am fairly sure, but the transistors did not come with the data sheet and the ones easily found do not seem to match to my transistor quite right. I suppose I could try it the other way. (I will try this in the morning and let yall know)

2. I think I have a "common ground". I am new to this. My arduino ground is connected to the the emitter it is connected to the negative battery terminal as well.

3. Sorta I do not have my arduino in circuit with this. My arduino is being powered by a usb power adapter that is connected to the cars 12v power outlet, so it is powered by the battery technically.

Thanks for your help I will try to turn the transistor around all the documents I have found seem to indicate the base is in the center which makes sense.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
From what you have suggested, (1) remains the only option out of the ones I suggested. Your powering of the circuit seems fine.

It might be useful to describe the package your transistors are in (a photo would be even better -- and even better again if we can read the markings on them)
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
The standard wire-leaded 2N2222 comes in a TO-18 metal can package. These are unnecessarily expensive and barely used at all nowadays. A much cheaper and equally good package is the TO-92 plastic package (see https://www.google.co.nz/search?q=TO-92&tbm=isch).

If you're in North America, a common and suitable transistor is the 2N3904 (see http://www.radioshack.com/product/index.jsp?productId=2062609). If you hold it with the wires pointing downwards, looking at the flat side of the package, the wires are E, B, C from left to right.

If you're in Europe, it might be easier to find a BC547B. This is the same package but the leads are C, B, E from left to right.

If you think you might have damaged your 2N2222 (and if you exchanged the emitter and collector, you probably have), you should get a few of the TO-92 devices. You may be able to find a better price than USD 1.49 each from Radio Shack - Digikey (http://www.digikey.com) has them for USD 0.19 (see http://www.digikey.com/product-detail/en/2N3904BU/2N3904FS-ND) (but their shipping charges can be quite high).
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
The T092 packaged ones are usually designated as PN2222.

Bob
 

slr1337

Mar 15, 2014
3
Joined
Mar 15, 2014
Messages
3
Sorry, it took so long for me to respond I turned the transistor around as (*steve*) suggested. I had the emitter and the collector reversed. I finally got around to testing it and it works now thanks so much. Thanks for the suggestion KrisBlueNZ I actually got my transistors from amazon.com for about 10$ for a 100(I have amazon prime free two day shipping in the States). They say they are 2N2222 (it's printed on the side of the transistor), but they are actually in a TO-92 Case so I think they are actually the BC548, but I digress it is fixed. I thank yall so much I am very new at this and am grateful to find such a supportive electronics community.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Welcome (belatedly) to Electronics point slr1337.

One thing this does point out is the need to look up the datasheet of any part you purchase. Whilst you can get away most often not doing this for switches, resistors, capacitors, etc; for active components like transistors is is good practice to make obtaining the datasheet a habit.

In this case you may have found that you had a different package, or that the package you have has a different pinout than the one you expected.

Of course, the datasheets have a lot more information than that, and eventually you'll be able to make sense of it and start to use the datasheet to determine the exact practical capability a component has.

It's almost certain you have a 2N2222 and not a BC548. They are often used interchangeably in simple circuits, but they're very different. The BC548 is a coupe compared to the 2N2222's pick-up truck. But either can take you to the shops.

The datasheets are BC548 and 2N2222 (PN2222). And just to make things even more interesting (complex), not all datasheets are created equal.

The BC548 one I linked to above is rather simple and doesn't list some potentially important characteristics. This BC548 datasheet does a better job, and also covers a few related transistors.

What you may notice is that there is some difference between the datasheets. When different manufacturers produce the same component, it is quite often not exactly the same. For almost all uses, this doesn't matter, and you shouldn't worry about it at this stage.
 
Top