2n2222 and voltage dividers - Page 1
Forum section: electronics / beginners

author: Tom18991
author_rank: Contributor
timestamp: April 07, 2019, 03:29:24 am
content: See my simple circuit below. If I remove the 3k resistor from the circuit, the LED will start to show a tiny bit of light when the input voltage gets to around .6 volts. When I put the 3k resistor in the circuit, I was expecting that it would act as a voltage divider, such that the LED would start to glow when the input voltage was around 2.6 volts (or higher), since 2.6 volts * (3/13)=.6 volts. However, the LED starts to glow at a slightly different voltage, making me think I'm missing something about how the transistor is interacting with the voltage divider. Can anyone explain for me? TIA...

author: Nerull
author_rank: Frequent Contributor
timestamp: April 07, 2019, 05:13:48 am
content: Your transistor is backwards and 12V is likely enough to cause reverse breakdown. The ON datasheet specs 6V as the emitter-base breakdown voltage.

author: rstofer
author_rank: Super Contributor
timestamp: April 07, 2019, 06:09:42 am
content: Flip your LED and resistor to connect between V+ and the collector. Then connect the emitter to ground.

author: Jwillis
author_rank: Super Contributor
timestamp: April 07, 2019, 06:40:03 am
content: You can put the LED on either side of the transistor. Since its being used as a switch it make no difference which side (collector or emitter) the load is on .But in this configuration the LED is backward.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: April 07, 2019, 07:34:20 am
content: As said before, you have connected the transistor in reverse.When drawing schematics it is always a good idea to stick as much as possible to a few simple rules.* Signals go from left to right.* Voltages go from top to bottom.You can build a few variants of this circuit.In the left schematic I drew it as an emitter follower. The emitter follows the base voltage ( - 600mV) and the led grows steadily brighter with more input voltage.In the middle circuit the transistor is used as a switch. The tranistor does not conduct current as long as the base is below 600mV, and if the base voltage gets above 600mV the LED wil quickly light up to full brightness. If you use higher values for R4 & R5 (100k & 27k) then the switching behaviour will be less pronounced.In the circuit on the right the LED will not light as long as the base is below 600mV + the LED voltage (approx 1.8V, depends on color of the LED). If the voltage at the base gets above 2V4, the transistor will act like a switch again and the LED will quickly light up to full brightness.I drew the schematic with KiCad and also attached it to this post.KiCad is a Free & Open Source schematic and PCB design program with no built in silly limitations.

author: Tom18991
author_rank: Contributor
timestamp: April 07, 2019, 08:39:26 pm
content: Edit: I think I figured it out. I'm using a plastic TO-92 transistor, where the pins are number 1 (emitter) to 3 (collector) from left to right, and got the emitter and collector mixed up. On the original metal can version, the pins are usually shown 3 (collector) to 1(emitter) from left to right. No excuses, but that's why I was so confused, and why my hand-drawn circuit looked backwards. My circuit is actually exactly the same as the "switch" version shown above, and works fine that way. And, as predicted, I'm seeing that lower resistor values on the voltage divider create sharper on/off transitions. I'd still like them to be sharper still, but it's useable now.

author: hamster_nz
author_rank: Super Contributor
timestamp: April 07, 2019, 10:30:39 pm
content: Ignoring the schematic errors, remember that some of the current will flow from Base to emitter through the transistor, as well as through the 3k resistor, so if the transistor is active the voltage on the transistor's base will be lower than you expect.

author: Circlotron
author_rank: Super Contributor
timestamp: April 07, 2019, 11:29:17 pm
content: The transistor is not necessarily going to switch on when the base voltage gets to exactly 0.6 volts. This threshold is both temperature sensitive and somewhat gradual, not a sudden snap. If you want more exactness, try a TL431. They will come on quite sharply at more or less exactly 2.5 volts. Looks just like a TO-92 transistor too.

author: Tom18991
author_rank: Contributor
timestamp: April 07, 2019, 11:56:29 pm
content: Thanks Hamster, that's the answer to my original question I'm sure. Thank you.Circ or anyone know of a transistor that "snaps" on in the sub-1 volt range?

author: hamster_nz
author_rank: Super Contributor
timestamp: April 08, 2019, 12:26:47 am
content: Quote from: Tom18991 on April 07, 2019, 11:56:29 pmTwo somewhat contradictory answers:Answer 1: All simple bipolar transistors will be 'fully on' if you you have their base 1V above their emitter (or below depending on NPN/PNP type).Answer 2: There is no such thing as what you are after, since a transistor "multiplies current". So with a Hfe of 100x, 1mA from the emitter to base will cause up to ~100mA from the emitter to collector. It is current flow not voltage that controls if the transistor is on or off.(both of these answers are somewhat true and somewhat wrong)If you want to use a transistor for switching, the best you can do is choose a high gain device and drive the emitter with from a suitably low impedance source with high enough voltage to ensure that the transistor will be saturated.So run the numbers as if the transistor has only a 20x current gain (e.g. ensure that you use 1mA of base current to switch 20mA of load), and then use a transistor with at least 100x current gain to ensure that the transistor won't ever be 'half on'.

author: Ian.M
author_rank: Super Contributor
timestamp: April 08, 2019, 01:43:41 am
content: Answer 3: Use two transistors*and apply positive feedback to make a Schmitt trigger.Here's one of many ways of doing that:LTspicesim attached.* As a transistor inverts in a common emitter configuration, and has less than unity voltage gain as an emitter follower (common collector) and less than unity current gain in a common base configuration, you cant apply DC coupled positive feedback to a single transistor.

author: Tom18991
author_rank: Contributor
timestamp: April 08, 2019, 04:29:46 pm
content: Thanks both, very helpful. Ian, I was playing with pairs of transistors to bump the gain and make the on/off sharper, but will try your approach without delayIs the value of R3 in your circuit tied to the value of R2, or is that just a coincidence? Also, given R3 being there, would I be right to think this combo inverts the output?I also tried using a 74xx gate to sharpen the on/off, but that requires a new voltage regulator, etc., so would rather avoid...

author: Ian.M
author_rank: Super Contributor
timestamp: April 08, 2019, 06:17:26 pm
content: Coincidence. R1, R2 were copied from your original circuit - I'd probably use higher values, except if it made choosing R5 difficult.R3 was chosen to provide sufficient base current to saturate Q2 with any reasonable load you'd use it for.It depends on your definition of inverts. Voltage-wise, its non-inverting: Input high=LED OFF, same as direct connection to the LED cathode.One further note - R5 permits a few uA to flow through the LED when its meant to be off. This might *just* be noticeable with a high efficiency LED in a very dark room.