Author Topic: 2n2222 and voltage dividers  (Read 2508 times)

0 Members and 1 Guest are viewing this topic.

Offline Tom18991Topic starter

  • Contributor
  • Posts: 37
  • Country: us
2n2222 and voltage dividers
« on: April 07, 2019, 03:29:24 am »
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...


   
« Last Edit: April 07, 2019, 03:37:26 am by Tom18991 »
 

Offline Nerull

  • Frequent Contributor
  • **
  • Posts: 694
Re: 2n2222 and voltage dividers
« Reply #1 on: April 07, 2019, 05:13:48 am »
Your transistor is backwards and 12V is likely enough to cause reverse breakdown. The ON datasheet specs 6V as the emitter-base breakdown voltage.
« Last Edit: April 07, 2019, 05:15:55 am by Nerull »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: 2n2222 and voltage dividers
« Reply #2 on: April 07, 2019, 06:09:42 am »
Flip your LED and resistor to connect between V+ and the collector.  Then connect the emitter to ground.
 

Offline Jwillis

  • Super Contributor
  • ***
  • Posts: 1725
  • Country: ca
Re: 2n2222 and voltage dividers
« Reply #3 on: April 07, 2019, 06:40:03 am »
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.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 4004
  • Country: nl
Re: 2n2222 and voltage dividers
« Reply #4 on: April 07, 2019, 07:34:20 am »
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.
 

Offline Tom18991Topic starter

  • Contributor
  • Posts: 37
  • Country: us
Re: 2n2222 and voltage dividers
« Reply #5 on: April 07, 2019, 08:39:26 pm »
 


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.
« Last Edit: April 07, 2019, 10:30:02 pm by Tom18991 »
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2812
  • Country: nz
Re: 2n2222 and voltage dividers
« Reply #6 on: April 07, 2019, 10:30:39 pm »
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.

Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3362
  • Country: au
Re: 2n2222 and voltage dividers
« Reply #7 on: April 07, 2019, 11:29:17 pm »
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.
 

Offline Tom18991Topic starter

  • Contributor
  • Posts: 37
  • Country: us
Re: 2n2222 and voltage dividers
« Reply #8 on: April 07, 2019, 11:56:29 pm »
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?
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2812
  • Country: nz
Re: 2n2222 and voltage dividers
« Reply #9 on: April 08, 2019, 12:26:47 am »
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?

Two 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'.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13216
Re: 2n2222 and voltage dividers
« Reply #10 on: April 08, 2019, 01:43:41 am »
Answer 3:  Use two transistors* and apply positive feedback to make a Schmitt trigger.

Here's one of many ways of doing that:


LTspice sim 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.
 

Offline Tom18991Topic starter

  • Contributor
  • Posts: 37
  • Country: us
Re: 2n2222 and voltage dividers
« Reply #11 on: April 08, 2019, 04:29:46 pm »
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 delay :)  Is 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...
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13216
Re: 2n2222 and voltage dividers
« Reply #12 on: April 08, 2019, 06:17:26 pm »
  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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf