Question about Bipolar NPN Transistor -2N2222

Thread Starter

MrSmoofy

Joined Jul 28, 2014
112
So I'm teaching myself electronics and have been going through the experiements in the Make Electronics books.

In this one experiement a 2N2222 is used to turn on a LED via a push button.

I'm pretty sure I had it wired correctly but to my surprise power flowed through the 2N2222 to the LED and and it was lit and then pressing the button to activate the 2N2222 made it brighter.

I tried a second 2N2222 just to make sure I didn't have a bad one. My understanding of Transistors were that they were like switches (relays) but all electronic and didn't expect any current to flow to the LED without activating it.

Was my thinking wrong and transistors allow some current? Or did I have something wrong and my understanding correct and it shouldn't allow any current until the transistor is activated?
 

shteii01

Joined Feb 19, 2010
4,667
Post the dwg, it sounds as though you have some base leakage somewhere causing it.
Max.
+1

So your led is ON, but not bright, this tells us that transistor is partially ON. But it should be OFF because push button is OFF. It seems that there is something going on with the push button, the button is not OFF or not fully OFF when it should be.

Try just battery (two AA in series or one 9 volt) + push button + led. If led comes ON when push button is not ON, then there is something wrong with push button.
 

Thread Starter

MrSmoofy

Joined Jul 28, 2014
112
So basically both of you are confirming that my understanding of a transistor is that if it's off it shouldn't be allowing any power through it which is good to know.

So possibly the button is crap and of course they only put one in the component kit. Or there is this base leakage or are you calling current from the button that should be off could be where the leakage is.

So if I understand correctly the base is getting some power and it shouldn't be which is causing the LED to be lit when it shouldn't be.
 

studiot

Joined Nov 9, 2007
5,003
Your circuit looks good in theory.

Can you tell us how you have built it?
Soldering or what?

What happens if you remove the switch altogether, does the LED stay alight?

If that happens it is the transistor that is 'leaky', not the switch.
 

ian field

Joined Oct 27, 2012
6,543
So basically both of you are confirming that my understanding of a transistor is that if it's off it shouldn't be allowing any power through it which is good to know.

So possibly the button is crap and of course they only put one in the component kit. Or there is this base leakage or are you calling current from the button that should be off could be where the leakage is.

So if I understand correctly the base is getting some power and it shouldn't be which is causing the LED to be lit when it shouldn't be.
Take out the button switch and just touch the ends of the wires together - if the LED still has current with the wires apart, the leakage is getting in someplace else.
 

kubeek

Joined Sep 20, 2005
5,587
Are you sure you have the transistor oriented the way you show it in the schematic?
 

phantomzz

Joined Sep 26, 2013
18
Yeah your understanding is correct.

Within the make electronics there is another application of 2N222 where instead of a pushbutton you use your fingers as a switch.

Instead of a 10k resistor + push button, connect Vcc and base of transistor using your finger which is a high resistance. You will certainly understand the concept once you do this experiment.
 

MaxHeadRoom

Joined Jul 18, 2013
18,863
It is an emitter follower.
Your base is left floating, which is never a good idea.
You want to make sure it is off when it is supposed to be, you also need a resistor from base to common.
Max.
 

crutschow

Joined Mar 14, 2008
23,141
I would double-check the transistor pin-out and wiring. Something is wrong in the wiring.
 

ian field

Joined Oct 27, 2012
6,543
I would double-check the transistor pin-out and wiring. Something is wrong in the wiring.
Some care is required with TO92 packaged transistors, there are a few different pin-out arrangements.

2N2222 seems to mostly indicate the old TO18 metal can types that always had the standard pin layout. There are some variants like PN2222 and KSP2222 for the plastic variety, so if you can identify it on that level google the part number printed on it.

If you don't know the pin out, the base is the easiest to identify as an NPN is like a pair of diodes with a common anode (the base).

Once the base is identified, you can tell emitter from collector because the emitter behaves like a zener at about 7 - 8V, but you have to keep the test current low to avoid damage.
 

Thread Starter

MrSmoofy

Joined Jul 28, 2014
112
Ok after some more tinkering based on everyones feed back, I removed the button and it stayed on then I started removing the resitors and it was on :confused: I finally decide let me turn the transistor around even though I had it like the diagram said flat side facing right.

As soon as I turned it around all worked as expected.

Looking at the flat side the collector the right pin has power to it through R1 so it's always powered.

The Base middle (the trigger for the switch) goes to R2 to the button. So th button is to send power to it to activate the transitor.

The left pin the emitter is where the power leaves to the LED when the base is activated by the button.

I removed the button, and R2 and the LED was still lit. I then turned the transistor around so the flat side was facing left and the LED went out I put the R2 and button back and the button then correctly turned on the LED.

Attached is picture with it working

Sorry picture is a little blury.
 

Attachments

shteii01

Joined Feb 19, 2010
4,667
One of the things to watch out for is that often they show bottom of the device. If you are looking at the bottom, then the flat side is facing right. Once you plug the device into the breadboard, you are looking at the top of the device and the flat side is facing left.

I am glad everything worked out in the end.
 

Thread Starter

MrSmoofy

Joined Jul 28, 2014
112
Even the book seems to indicate the flat side is supposed to be facing right but it seems to be backwards to me if it's working with it facing left.

Edit: I guess that depends on from which end you are looking at it but if I have it configured like the diagram to me the diagram says the flat side is facing right.
 

Thread Starter

MrSmoofy

Joined Jul 28, 2014
112
Based on the book looking at the flat side with the pins down the right pin is the collector (connected to R1) the middle is the Base connected to R2 and the Emitter is the left pin and connected to R3

This is how I read the diagram and the pictures in the book of a transistor.

That didn't work turning it around did
 

to3metalcan

Joined Jul 20, 2014
259
I would like to use the c to drive the load
+1. In a standard transistor configuration, the collector acts more like a current source, which is what LED's are happiest with.
 
Top