Author Topic: Transistor Switching  (Read 4486 times)

0 Members and 1 Guest are viewing this topic.

Offline OslawTopic starter

  • Contributor
  • Posts: 19
  • Country: ng
Transistor Switching
« on: July 06, 2018, 11:03:31 pm »
Hello all, I was testing switching with a 2n2222 NPN transistor and every time I connect the base directly to data source( or set my potentiometer to zero), the LED on the collector side turns off or goes dull Please what might be wrong.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19625
  • Country: gb
  • 0999
Re: Transistor Switching
« Reply #1 on: July 06, 2018, 11:38:44 pm »
A schematic would help.

The transistor must have a base resistor and the LED a current limiting resistor.
 

Offline OslawTopic starter

  • Contributor
  • Posts: 19
  • Country: ng
Re: Transistor Switching
« Reply #2 on: July 07, 2018, 06:24:21 am »
This is the schematic I used. It switches well until I remove 1k resistor connected to the base, then the LED goes dim or dies.
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Transistor Switching
« Reply #3 on: July 07, 2018, 07:40:08 am »
What are you using as a power source?

Without either a base resistor, or a current limiting resistor for the LED everything should burn out (that is unless you are using a current limited power supply).

Do you want to:

a) see a design that will work

or

b) to understand why the existing design doesn't work, allowing you to design something that will.

« Last Edit: July 07, 2018, 08:30:32 am by hamster_nz »
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 
The following users thanked this post: Oslaw

Offline OslawTopic starter

  • Contributor
  • Posts: 19
  • Country: ng
Re: Transistor Switching
« Reply #4 on: July 07, 2018, 01:25:03 pm »
Both. I did just that and still same result. I am using a 9v battery. Below are pictures of the potentiometer tuned to both ends. At level 0 Ohm LED is dull and at 10k Ohms bright(at any resistance level above 0 ).
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4586
  • Country: gb
Re: Transistor Switching
« Reply #5 on: July 07, 2018, 02:13:44 pm »
Assuming you mean that the potentiometer. Is replacing the 1K resistor. I.e. The potentiometer, is connected between the base of the transistor, and the positive +9V battery terminal. (I've looked at the pictures, and it looks like it might be, but I'm not 100% sure).

Then the LED would tend to switch off, when you set the potentiometer to around 0  \$\Omega\$, because you should really have an extra series resistor, between the potentiometer and the base, of e.g. 1K. Otherwise excessive current will try to flow between the base and +9V supply, because the diode junction of the transistors Emitter/Base will start to hugely conduct, at around 0.6V/0.7V.
The small 9V cell I can see, can probably only supply a few hundred milliamps (probably less), so the whole supply voltage will probably drop to around 0.8V (guestimate), and hence the LED will turn off. It may also damage the potentiometer and the small signal transistor.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19625
  • Country: gb
  • 0999
Re: Transistor Switching
« Reply #6 on: July 07, 2018, 06:38:22 pm »
Assuming you mean that the potentiometer. Is replacing the 1K resistor. I.e. The potentiometer, is connected between the base of the transistor, and the positive +9V battery terminal. (I've looked at the pictures, and it looks like it might be, but I'm not 100% sure).

Then the LED would tend to switch off, when you set the potentiometer to around 0  \$\Omega\$,
I would have thought it would burn out the transistor, so this is surprising.

Quote
because you should really have an extra series resistor, between the potentiometer and the base, of e.g. 1K. Otherwise excessive current will try to flow between the base and +9V supply, because the diode junction of the transistors Emitter/Base will start to hugely conduct, at around 0.6V/0.7V.
The small 9V cell I can see, can probably only supply a few hundred milliamps (probably less), so the whole supply voltage will probably drop to around 0.8V (guestimate), and hence the LED will turn off. It may also damage the potentiometer and the small signal transistor.
Yes, I expect you're right, the battery's internal impedance is limiting the current to a safe level and the transistor's base-emitter junction is clamping the supply voltage down, below the LED's on voltage. I suppose this is more likely if it's a high power transistor and the battery is already heavenly discharged.

Both. I did just that and still same result. I am using a 9v battery. Below are pictures of the potentiometer tuned to both ends. At level 0 Ohm LED is dull and at 10k Ohms bright(at any resistance level above 0 ).
What do you want to do? Dim the LED? If so, this isn't the right way to do it. You'll be better of connecting the potentiometer and another, fixed value resistor, in series with the LED.
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4586
  • Country: gb
Re: Transistor Switching
« Reply #7 on: July 07, 2018, 07:02:13 pm »
Assuming you mean that the potentiometer. Is replacing the 1K resistor. I.e. The potentiometer, is connected between the base of the transistor, and the positive +9V battery terminal. (I've looked at the pictures, and it looks like it might be, but I'm not 100% sure).

Then the LED would tend to switch off, when you set the potentiometer to around 0  \$\Omega\$,
I would have thought it would burn out the transistor, so this is surprising.

I can't see a maximum base current limit, on the 2N2222's datasheet (http://www.farnell.com/datasheets/296640.pdf). But, since the maximum collector current is 800 mA, as a rule of thumb, the limit is usually at least a tenth of the maximum collector current (also, that usually saturates the transistor), which it comes to 800/10 = 80 mA's.

Also, it looks like a cheap (possibly part run down), zinc/carbon or similar, type of non-alkaline PP3 battery. This probably means the short circuit current, is more like around a 100mA's (guestimate, as you said, limited by the batteries relatively high internal resistance/impedance).
I said hundreds of milliamps in my original reply, as it might be that high.
Really, it varies, from battery to battery etc. So I have to be extremely rough with something like that.

If it was a powerful power source, then I agree, the small transistor, could easily be toast, in such circumstances.
« Last Edit: July 07, 2018, 07:09:20 pm by MK14 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19625
  • Country: gb
  • 0999
Re: Transistor Switching
« Reply #8 on: July 07, 2018, 07:48:56 pm »
Silly me, I missed the 2N2222 bit.

Even if it's exceeding the maximum rated base current, it doesn't mean it's automatically toast. Components can often withstand way over their maximum ratings, with no damage,. Obviously it's bad design practise to build anything which will stress the components beyond their maximum ratings, even if they tolerate it.
 
The following users thanked this post: MK14

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2559
  • Country: us
Re: Transistor Switching
« Reply #9 on: July 07, 2018, 11:46:02 pm »
Alan Wolke did an in depth video on bipolar transistor switching times that I found very informative

   
 
The following users thanked this post: MK14

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 863
  • Country: us
  • Peacefully retired from industry, active in life
Re: Transistor Switching
« Reply #10 on: July 08, 2018, 05:10:54 am »
The observations regarding the lack of 1k resistor is good, also the internal resistance of the battery, however, someone is missing the elephant in the room.. this is not an incandescent bulb. It is an LED.
PEACE===>T
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Transistor Switching
« Reply #11 on: July 08, 2018, 07:11:10 am »
The observations regarding the lack of 1k resistor is good, also the internal resistance of the battery, however, someone is missing the elephant in the room.. this is not an incandescent bulb. It is an LED.

Just did a quick test. With a good alkaline 9V battery the short circuit current is about 400mA - giving the battery about 22.5 ohms of internal resistance.

That is enough to burn out an LED, but not enough to burn out a transistor (at best you might be able to get half a watt of heat outside of the battery).

Without the resistor (or the pot dialed to 0 ohm) there will be a few hundred mA flowing through the tranaiator's base, and due to the internal resistance the battery voltage has dropped to about volt or less, causing the LED to go out.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19625
  • Country: gb
  • 0999
Re: Transistor Switching
« Reply #12 on: July 08, 2018, 08:33:52 am »
The observations regarding the lack of 1k resistor is good, also the internal resistance of the battery, however, someone is missing the elephant in the room.. this is not an incandescent bulb. It is an LED.

Just did a quick test. With a good alkaline 9V battery the short circuit current is about 400mA - giving the battery about 22.5 ohms of internal resistance.

That is enough to burn out an LED, but not enough to burn out a transistor (at best you might be able to get half a watt of heat outside of the battery).

Without the resistor (or the pot dialed to 0 ohm) there will be a few hundred mA flowing through the tranaiator's base, and due to the internal resistance the battery voltage has dropped to about volt or less, causing the LED to go out.
The text clearly said LED, so the symbol is just wrong. I suspect it's been copied from another site.

Yes, 400mA is expected from a new alkaline battery, but I think the original poster is probably using a tired zinc battery, which will have a much higher impedance.
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4586
  • Country: gb
Re: Transistor Switching
« Reply #13 on: July 08, 2018, 10:31:01 am »
That is enough to burn out an LED,

If you examine the pictures, carefully. I can apparently see, a 220 \$\Omega\$ resistor, connected in series with one of the LEDs leads.
I.e. The LED should be fine. Although strictly speaking, the resistor should be higher, if it is intended to run the circuit from 9V, to keep it below 20mA, the LEDs (presumed, as I don't know the exact spec of that LED) max currrent limit.
« Last Edit: July 08, 2018, 10:34:59 am by MK14 »
 

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 863
  • Country: us
  • Peacefully retired from industry, active in life
Re: Transistor Switching
« Reply #14 on: July 08, 2018, 10:52:15 am »
Okay, another hint, how do you dim an LED? The linear region in an LED is tiny, so a pot is difficult to hit that unless there has been careful calculations done. This setup  is very tricky in order to get the LED to dim the full sweep of the pot.

Last hint... hope it helps...

EDIT: Think digital.
« Last Edit: July 08, 2018, 01:12:49 pm by tpowell1830 »
PEACE===>T
 

Offline ruffy91

  • Regular Contributor
  • *
  • Posts: 240
  • Country: ch
Re: Transistor Switching
« Reply #15 on: July 08, 2018, 01:06:03 pm »
Regulate current, not voltage.
 
The following users thanked this post: tpowell1830

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 863
  • Country: us
  • Peacefully retired from industry, active in life
Re: Transistor Switching
« Reply #16 on: July 08, 2018, 01:37:57 pm »
Regulate current, not voltage.
BINGO!

Where do you put the resistor on a transistor hookup for current regulation? Keep in mind that you will need to regulate from approximately 50 µA (not 0) to 100 mA. Still, not the method that I would recommend.
PEACE===>T
 

Offline OslawTopic starter

  • Contributor
  • Posts: 19
  • Country: ng
Re: Transistor Switching
« Reply #17 on: July 08, 2018, 04:06:05 pm »
Thanks Everyone. I used a new 9v battery and it burnt the LED and got the transistor hot ( replacement LED also got burnt). It seems the dimming was probably a result of the LED glitching due to over-current.( New 9V Battery: 9.01 V and Old 9V Battery: 7.48 V ).
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19625
  • Country: gb
  • 0999
Re: Transistor Switching
« Reply #18 on: July 08, 2018, 04:27:43 pm »
Regulate current, not voltage.
BINGO!

Where do you put the resistor on a transistor hookup for current regulation? Keep in mind that you will need to regulate from approximately 50 µA (not 0) to 100 mA. Still, not the method that I would recommend.
The resistor needs to go in the emitter side, to regulated the current, which can then be controlled by varying the base voltage with the potentiometer.

Also what's wrong with regulating down to 0mA?

And 100mA is too high for a small 5mm LED.
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4586
  • Country: gb
Re: Transistor Switching
« Reply #19 on: July 08, 2018, 04:43:50 pm »
Thanks Everyone. I used a new 9v battery and it burnt the LED and got the transistor hot ( replacement LED also got burnt). It seems the dimming was probably a result of the LED glitching due to over-current.( New 9V Battery: 9.01 V and Old 9V Battery: 7.48 V ).

You should be using/designing circuits, which respect the limits of the components. E.g. Transistor bases, LEDs and things, don't like big currents.

Otherwise, you will risk breaking the components, which is what you seem to be saying, has just happened.

I still haven't seen a proper schematic of how you wired things up, or an explanation of exactly what you are trying to achieve. So it is difficult to comment any further.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Transistor Switching
« Reply #20 on: July 08, 2018, 04:53:05 pm »
Reminds me of the first time I played with LEDs when I was about 4 years old. I remember wondering why they get so hot and don't last very long when I connect one to a 9V battery.

Like most future engineers seem to have done, I also tried connecting a NE-2 lamp to 120V prior to learning what a ballast resistor was.
 
The following users thanked this post: MK14

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4586
  • Country: gb
Re: Transistor Switching
« Reply #21 on: July 08, 2018, 07:41:39 pm »
Regulate current, not voltage.
BINGO!

Where do you put the resistor on a transistor hookup for current regulation? Keep in mind that you will need to regulate from approximately 50 µA (not 0) to 100 mA. Still, not the method that I would recommend.
The resistor needs to go in the emitter side, to regulated the current, which can then be controlled by varying the base voltage with the potentiometer.

Also what's wrong with regulating down to 0mA?

And 100mA is too high for a small 5mm LED.


I hope you don't mind me criticising your (apparently), adjustable 0 to 20 mA (approx), constant current circuit.
But, the way you have drawn it, the 100K pot, will probably not do anything, for around half its travel.
If, you changed it, so that the bottom lug of the pot, which currently goes to ground, was instead, connected to the point where the two diodes meet. Which should be around 0.6 to 0.7 volts.
Then most of the transistors Emitter/Base voltage drop will effectively be cancelled out.
Hence the adjustable pot, should vary over nearly all its range (rather than only half of it).

On the other hand, it is possible, my suggested change may reduce or cause instability. I would have to simulate it, or build it, or calculate hard, in order to find that out.
 
The following users thanked this post: Zero999, tpowell1830

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 863
  • Country: us
  • Peacefully retired from industry, active in life
Re: Transistor Switching
« Reply #22 on: July 09, 2018, 01:50:50 am »
Okay, so if you want to dim an LED, your best option is a PWM (Pulse Width Modulator) circuit. The circuit allows the user to adjust the width of pulses, without changing the frequency of the pulses. This means that the effective voltage varies while the power supply voltage remains constant. This effectively regulates the average current applied. The LEDs will dim from dark to fully lit based on the regulating resistor in series with the LEDs or single LED and the voltage applied (power supply voltage).

A PWM circuit can be produced with discrete ICs, such as a 555 timer circuit or a µC with the proper connections and software. There are many ways to produce a PWM, just do a search for PWM circuits or pulse width modulator circuits.

I have supplied a couple here:

We have to do Dave's version of course.






Hope this helps...
PEACE===>T
 
The following users thanked this post: MK14

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19625
  • Country: gb
  • 0999
Re: Transistor Switching
« Reply #23 on: July 09, 2018, 07:51:44 am »
Okay, so if you want to dim an LED, your best option is a PWM (Pulse Width Modulator) circuit. The circuit allows the user to adjust the width of pulses, without changing the frequency of the pulses. This means that the effective voltage varies while the power supply voltage remains constant. This effectively regulates the average current applied. The LEDs will dim from dark to fully lit based on the regulating resistor in series with the LEDs or single LED and the voltage applied (power supply voltage).
Why is PWM better?

I can see why it's better than varying  the value of a series resistor, but don't see why it's better, than regulating the current. Simple PWM, with a resistor and no regulated power supply, will cause the LED's brightness to change, with the power supply voltage. A current regulated driver will keep the brightness constant. The only thing I can think of is, some phosphor LEDs, such as white ones, may change their colour, at low currents, but it's not something I've noticed myself.

Regulate current, not voltage.
BINGO!

Where do you put the resistor on a transistor hookup for current regulation? Keep in mind that you will need to regulate from approximately 50 µA (not 0) to 100 mA. Still, not the method that I would recommend.
The resistor needs to go in the emitter side, to regulated the current, which can then be controlled by varying the base voltage with the potentiometer.

Also what's wrong with regulating down to 0mA?

And 100mA is too high for a small 5mm LED.


I hope you don't mind me criticising your (apparently), adjustable 0 to 20 mA (approx), constant current circuit.
But, the way you have drawn it, the 100K pot, will probably not do anything, for around half its travel.
If, you changed it, so that the bottom lug of the pot, which currently goes to ground, was instead, connected to the point where the two diodes meet. Which should be around 0.6 to 0.7 volts.
Then most of the transistors Emitter/Base voltage drop will effectively be cancelled out.
Hence the adjustable pot, should vary over nearly all its range (rather than only half of it).

On the other hand, it is possible, my suggested change may reduce or cause instability. I would have to simulate it, or build it, or calculate hard, in order to find that out.
Thanks for your comment. I realised this later, when I was away from the computer.

Yes, connecting the resistor to the node where the diodes meet will help, but it still might not go all the way to zero. Another resistor, with a slightly lower value, than the pot, in series with the bottom side of the pot will fix it, although there will still be some dead-band.
« Last Edit: July 09, 2018, 07:53:40 am by Hero999 »
 
The following users thanked this post: MK14

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4586
  • Country: gb
Re: Transistor Switching
« Reply #24 on: July 09, 2018, 08:26:48 am »
Thanks for your comment. I realised this later, when I was away from the computer.

Yes, connecting the resistor to the node where the diodes meet will help, but it still might not go all the way to zero. Another resistor, with a slightly lower value, than the pot, in series with the bottom side of the pot will fix it, although there will still be some dead-band.


Yes, that is also a good or even better, way of improving it.

Afterwords, I also worried, because, although diode junctions typically are between 0.6V and 0.7V, at low (but not too low) currents, in the LED part of the circuit. Very little current, will flow into the base of the transistor (in that circuit), especially if its Hfe happens to be high.
That might cause the base/emitter voltage, to drop below 0.6V, depending on the characteristics of the actual transistor, that is being used. There is probably significant transistor, to transistor variation, on parameters like that, even for identical types of transistors. (e.g. at 50 microamps base current).
« Last Edit: July 09, 2018, 08:29:32 am by MK14 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf