Author Topic: Beginners Transistor Circuit  (Read 3076 times)

0 Members and 1 Guest are viewing this topic.

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Beginners Transistor Circuit
« on: February 01, 2021, 10:20:30 am »
Hi All

I apologise in advance if I'm asking "daft" questions but I'm not sure how you learn otherwise.

Firstly I'm trying to develop an understanding of schematics and created the simple transistor circuit on a breadboard (see attached transistor.jpg) and then tried to produce a schematic to match it (see attached transistorSchematic.jpg). Do I have at least this part right?

I didn't get quite what I expected, I used the 1k ohm & 150 ohm resistors to drop the 5v dc supply to .7v to supply to the base of the 2N3904 and wired a small LED circuit across the emitter and collector as I believed this would just act as a switch; and it does to a point. The bit I didn't foresee was the voltage drop which means that my LED has barely enough to light it up, when activated I get a reading of 3.2v across collector and emitter (when I thought it would be nearer 5v) which only leaves 1.8v for the LED (which is what I get with the meter).

Is this expected (such a large drop through the transistor)? Could I have predicted this from the datasheets and if so what would I have been looking for (these things are hard to read).

In this scenario would there been a better outcome or is it what it is?

Thanks in advance.



 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14210
  • Country: de
Re: Beginners Transistor Circuit
« Reply #1 on: February 01, 2021, 10:36:12 am »
The problem with the ciruit is, that there is no good limitation for the LED current. So if the powersupply is powerfull enough it may break the LED and maybe also the transistor from too much current. So normally there should be a resistor in series with the LED.

For the understanding of the transistor: the base to emitter votlage is usually not set by an external divider, but more with just a base side series resistor to limit the current. The BJT is considered current controlled. The base emitter voltage is more like a minimum hurdle to overcome before the base current can flow. So the base current is calculated from (5 V - VBE) / R_base. To get a reasonable 1 mA base current for a switch it would thus need some 4.3 K  or as the next standard value 4.7 K and no extra resistor to ground, at least non that is so small.
 

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Re: Beginners Transistor Circuit
« Reply #2 on: February 01, 2021, 11:01:31 am »
Thanks for taking the time to respond.

So no need for a potential divider at all?

I generally do put resistors in my LED tests as I've blown a few up, LOL. I didn't put one in this as there was barely enough getting through to light it up in the first place.

So looking at the datasheet I see Vbe (sat) as a min 0.65v. Are you saying then remove potential divider, stick a 4.7k resistor in series to base?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: Beginners Transistor Circuit
« Reply #3 on: February 01, 2021, 02:00:00 pm »
Yes, a 4k7 base resistor will do, but add 470R in series with the LED.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8276
Re: Beginners Transistor Circuit
« Reply #4 on: February 01, 2021, 02:10:39 pm »
Note that collector (and thus emitter) current is roughly exponentially proportional to Vbe, and also temperature-dependent. Thus trying to control Vbe will almost certainly lead to either nearly no current (as you have luckily experienced), or destruction of the transistor from overcurrent, depending on component tolerances.
 

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Re: Beginners Transistor Circuit
« Reply #5 on: February 01, 2021, 02:46:55 pm »
Thanks again for your time.

So I've rebuilt the circuit (transistor1.jpg) and have outputted the values of each component.

I see how the 5k reduces the current to the base and how the 470 ohm protects the LED. What I'm not understanding is why do I lose so much V across c & e.

I expected the transistor to act like a normal switch on a 5v circuit. As it stands in a practical sense I don't have enough V to illuminate the LED (barely glimmers).

I know I've a lot of learning to do, being able to ask these sorts of questions really helps me.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: Beginners Transistor Circuit
« Reply #6 on: February 01, 2021, 02:57:56 pm »
IC = 6.8mA, which should be enough to illuminate a modern LED, with decent efficiency bright enough to see, under normal offiice lighting conditions. If it needs to be brighter, reduce the series resistor to 220R, for just over double the current.

VCE = 61mV, i.e. 0.061V which is the voltage dropped over the transistor's collector and emitter and is tiny, compared to the 5V supply voltage.
 

Offline Tom45

  • Frequent Contributor
  • **
  • Posts: 556
  • Country: us
Re: Beginners Transistor Circuit
« Reply #7 on: February 01, 2021, 03:04:20 pm »
I see how the 5k reduces the current to the base and how the 470 ohm protects the LED. What I'm not understanding is why do I lose so much V across c & e.

Look at the voltage drops across each component. Starting with 5 volts, the biggest drop is across the 470 ohm resistor. The second biggest is across the LED. The smallest is across the transistor, less than 0.1 volts.

The transistor is saturated, so you can't reduce Vce by much. The LED forward voltage is going to be what it is. What you need to change is the 470 ohm resistor. It is dropping too much.

You have 5 volts. Minus 1.7 for the LED and 0.06 volts for Vce leaves 3.24 for the resistor. If you want 20 ma of current for a nice bright LED, then R = 3.24 / 0.02 = 162 ohms. So use 150 or 180 ohms for the resistor.
 

Offline CharlotteSwiss

  • Frequent Contributor
  • **
  • Posts: 787
  • Country: ch
Re: Beginners Transistor Circuit
« Reply #8 on: February 01, 2021, 03:26:39 pm »
but this circuit would make sense if the transistor worked as a switch (off / saturation), with a current control on the base
 

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Re: Beginners Transistor Circuit
« Reply #9 on: February 01, 2021, 03:31:57 pm »
Thanks everyone for taking the time to respond, I've made those changes and replicated it on a breadboard. I'll drop those numbers out of the simulator again and get busy measuring and try to understand what all those values mean.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Beginners Transistor Circuit
« Reply #10 on: February 01, 2021, 04:33:42 pm »
Pick a real transistor and find the datasheet.  It will specify things like VCE(sat), VBE(sat) and hFE.  The datasheet will give you values, Google will give you the specific definition.  Here's a datasheet for the popular 2N3904


https://www.sparkfun.com/datasheets/Components/2N3904.pdf

Here's a definition for hFE

http://www.learningaboutelectronics.com/Articles/What-is-hfe-of-a-transistor

In your simulation, notice how the various Pd values add up to the original -38 mW figure.  From this, you can determine where your circuit is dissipating power.  That's the nice thing about simulators, they can give you a guess to several decimal places.  The answer is right for the assumptions the simulator is making but when you look at the datasheet, you may find the hFE varies with load current.

The only values that matter are the ones you measure on the breadboard.  Simulations may be useful but they aren't real.

For a transistor used as a switch, you can guess that VCE(sat) is 0.2V and VBE(sat) is 0.7V and, because we want deep saturation, hFE is 10.
 

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Re: Beginners Transistor Circuit
« Reply #11 on: February 01, 2021, 04:42:19 pm »
Thanks, I have the datasheet for the transistor I'm using (2N3904 hfe 100-300) but at the moment they're a bit like hieroglyphics, but these conversations allow me to look at them and try to understand what each of them mean and where they fit into the example I posted above. I hoping that with enough tenacity I'll eventually get it.
« Last Edit: February 01, 2021, 04:44:59 pm by Paul#1966 »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Beginners Transistor Circuit
« Reply #12 on: February 01, 2021, 07:03:43 pm »
There are many sites that discuss transistor switches including:

https://learn.sparkfun.com/tutorials/transistors/all

In general, we don't care about the actual value of hFE because we're going to assume a low value, like 10, to guarantee saturation.  The collector current is 10x the base current, or the other way around, that base current is 1/10 of the collector current.

Since hFE is the DC current gain, we can just say that if we want to drive that LED with 10 mA, we need 1 mA of base current.

Looking at the base circuit, we have some signal voltage, let's say 3.3V from a uC, and we assume a 0.7V drop from VBE(sat) (the voltage difference between the base and emitter) and, for an NPN switch, the emitter is ground or 0V.  So, we need 1 mA to drop (3.3V - 0.7V) or 2.6V across the base resistor.  This implies we need a 2600 Ohm resistor and this isn't a common value.  We can pick 2700 Ohms and still get the transistor into saturation.  If we had 5% resistors, we could pick 2400 Ohms.

The uC will drive about 1 mA of base current.  Should work...

On the collector side, assume the LED has a Vf of 2.2V and VCE(sat) is 0.2V so the collector resistor needs to drop 5.0 - 2.2 - 0.2 or 2.6V at 10 mA.  A 260 Ohm resistor works here.  I would choose 270 Ohms because I don't care if the LED is not quite as bright.  It will still be bright enough.

So, this is all of the work to figure the resistors for an LED on a 5V source driven by a 3.3V logic signal.

The first couple of times you work this out, it will be a chore.   Later on it becomes automatic.
« Last Edit: February 01, 2021, 07:10:56 pm by rstofer »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Beginners Transistor Circuit
« Reply #13 on: February 01, 2021, 07:16:18 pm »
Above, I gave you the procedure for calculating the 2 resistors and let's assume 2.7k on the base and 270 Ohms on the emitter with a 2.2V LED (you can change the resistor if your LED has a different voltage).

Breadboard the circuit and actually measure the voltages and currents.  You can use the DMM current ranges but you have to break into the circuit.  Instead, measure the resistance when you build the circuit and just measure the voltage drop across the resistor to get the current.

See if the numbers resemble the calculations.  They won't be exact due to tolerances but they should be close.

Ohm's Law is your friend in this project.
« Last Edit: February 01, 2021, 07:48:16 pm by rstofer »
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11561
  • Country: ch
Re: Beginners Transistor Circuit
« Reply #14 on: February 01, 2021, 09:18:05 pm »
Thanks again for your time.

So I've rebuilt the circuit (transistor1.jpg) and have outputted the values of each component.

I see how the 5k reduces the current to the base and how the 470 ohm protects the LED. What I'm not understanding is why do I lose so much V across c & e.

I expected the transistor to act like a normal switch on a 5v circuit. As it stands in a practical sense I don't have enough V to illuminate the LED (barely glimmers).

I know I've a lot of learning to do, being able to ask these sorts of questions really helps me.
Why do you consider the voltage drop large? What kind of voltage drop were you expecting instead? Sharing your assumptions can help us understand what parts of your mental model might be wrong or incomplete.

(FWIW, I find BJTs to be irritating little bastards. I still just haven't quite managed to really wrap my head around them, at least compared to the nice, docile MOSFET… :P My mental model of the BJT is still incomplete. But hey, the semester just ended and at least I got a good grade in that class all the same!  ;D )
 

Offline CharlotteSwiss

  • Frequent Contributor
  • **
  • Posts: 787
  • Country: ch
Re: Beginners Transistor Circuit
« Reply #15 on: February 01, 2021, 10:13:13 pm »
Thanks, I have the datasheet for the transistor I'm using (2N3904 hfe 100-300) but at the moment they're a bit like hieroglyphics, but these conversations allow me to look at them and try to understand what each of them mean and where they fit into the example I posted above. I hoping that with enough tenacity I'll eventually get it.

I have also studied transistors recently; before experimenting I did a whole theoretical part on bjt: interdiction, saturation, active zone, common collector, common base, common emitter. Let's say then I started to understand something (not much, but always better than before)
 ;)
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 7954
  • Country: us
  • Retired, now restoring antique test equipment
Re: Beginners Transistor Circuit
« Reply #16 on: February 01, 2021, 10:29:08 pm »
For simple circuits like this, with no need to optimize for speed, it is important to concentrate on which parameters are well-determined, and which cannot be trusted.
Untrustworthy:
Collector current vs. base-emitter voltage.  The current is an exponential function of the voltage, which is bad enough, but the co-efficients are temperature dependent.  However, the base-emitter voltage is therefore logarithmic in the collector current, and the possible range of VBE is small compared with 5 V.
Trustworthy:
VCE(sat) at sensible LED current will be small compared with 5 V and the LED voltage.
Limited trust:
LED voltage vs. current is logarithmic, but depends on the LED type/color and temperature.  You need this voltage, not negligible with respect to 5 V, to determine the voltage across the current-limiting collector resistor.
“DC beta”, the ratio IC/IB, will vary from unit to unit, but should have a well-defined minimum value.  Base current above the value implied by the minimum beta (within reason) will cause no harm for a slow switch.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: Beginners Transistor Circuit
« Reply #17 on: February 01, 2021, 10:39:41 pm »
Thanks, I have the datasheet for the transistor I'm using (2N3904 hfe 100-300) but at the moment they're a bit like hieroglyphics, but these conversations allow me to look at them and try to understand what each of them mean and where they fit into the example I posted above. I hoping that with enough tenacity I'll eventually get it.
hFE is the ratio of the base to collector currents. An hFE of 100 means IC= 100mA, when IB = 1mA. It's normally specified with a relatively high collector-emitter voltage. When the transistor is used as a switch, a much higher base current is required, than the HFE on the data sheet would suggest, which is the bare minimum required for the desired collector current. The general rule of thumb is IB = 10/IC, which is not always ideal, but stick with it for now as it's easy to remember.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11561
  • Country: ch
Re: Beginners Transistor Circuit
« Reply #18 on: February 01, 2021, 10:42:52 pm »
I have also studied transistors recently; before experimenting I did a whole theoretical part on bjt: interdiction, saturation, active zone, common collector, common base, common emitter. Let's say then I started to understand something (not much, but always better than before)
 ;)
FYI, "interdiction" is another linguistic false friend. ;) In English, that's the "cutoff" region.

Did you find a good source that explains it all well? I am still looking for something that really makes them "click" in my brain, especially the h-parameters beyond hFE...
 

Offline CharlotteSwiss

  • Frequent Contributor
  • **
  • Posts: 787
  • Country: ch
Re: Beginners Transistor Circuit
« Reply #19 on: February 01, 2021, 11:29:21 pm »
let's say I studied several online sources ...
and then from the book " The art of Electronics"
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Beginners Transistor Circuit
« Reply #20 on: February 02, 2021, 12:27:55 am »
I realize this is a learning exercise, and very useful for understanding the BJT used as a saturated switch, but golly, can't you just use a mosfet? An IRF3205 for example will have negligible on-state resistance even when the gate is underdriven at 5 volts.
The easiest person to fool is yourself. -- Richard Feynman
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Beginners Transistor Circuit
« Reply #21 on: February 02, 2021, 01:01:23 am »
I realize this is a learning exercise, and very useful for understanding the BJT used as a saturated switch, but golly, can't you just use a mosfet? An IRF3205 for example will have negligible on-state resistance even when the gate is underdriven at 5 volts.

How well will it work with 3.3V logic?  There are some MOSFETs considered Logic Level but when you really look at the graphs, they aren't all that good at low VGS

The IRF3205 graph of VGS versus RDS(on) doesn't even extend below about 4.5V, 3.3V logic levels won't even tickle it.  And it's a monster TO220 package for such a small current.  Figure 3 page 3

http://www.irf.com/product-info/datasheets/data/irf3205.pdf

The PMV16XN looks like a great candidate for 3.3V interfacing of modest loads:

https://www.mouser.com/datasheet/2/916/PMV16XN-1600220.pdf

See Figure 9 page 7

I haven't used this device but it sure seems attractive at first glance.  Next time I order parts, I'll pick up a few.

I realize the OP was using 5V input but I changed the game a few replies back because there is more 3.3V logic around than 5V.  If we plan to use MOSFETs (and we should), we have to find something with a really low spec for VGS

Always read the datasheet!  All those numbers, every single one, puts a limit on the way you can use the part.

BTW, the popular 2N7002 will just barely work at such a low VGS  Figure 5 page 5

https://www.mouser.com/datasheet/2/308/NDS7002A_D-1522662.pdf

« Last Edit: February 02, 2021, 01:03:57 am by rstofer »
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Beginners Transistor Circuit
« Reply #22 on: February 02, 2021, 01:54:29 am »
Well, I do agree with you, but just for grins I dug up my stash of IRF3205s. ((IMHO if you are just an experimenter who likes to use components that you can see and handle with your fingers instead of microscopes and tweezers... these are great for all kinds of switching circuits.)

And.... using a single partially depleted CR2016 button cell as power source, and a Radio Shack 273-074 piezo buzzer as load with the 3205 as switch ... and it works fine. In fact I can turn it on and off with just a fingertip, or turn it on hard by shorting gate to drain and off again by shorting gate to source.  I didn't even have a breadboard handy, I just stuck stuff together and used a clothespin for a battery holder.  Sure, the mosfet's resistance is no longer negligible but at 20 mA current for a LED... it's dissipating a few more microwatts and you need a smaller value current-limiting resistor for the LED. But it does work sufficiently well enough for home experimentation even at less than 3 VGS.
The easiest person to fool is yourself. -- Richard Feynman
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19528
  • Country: gb
  • 0999
Re: Beginners Transistor Circuit
« Reply #23 on: February 02, 2021, 08:40:48 am »
It seems like a few well-intentioned posts have strayed from the original topic. . .

The IRF3205 is way overkill for the original poster's application, which is to light a 10mA LED. A low threshold device isn't required because the drive voltage is 5V. The old 2N7000 would be a more suitable MOSFET.

I suspect this is all a learning exercise, rather than a real-world application. A small indicatior LED would normally be directly connected to the microcontroller's output pin.
 

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Re: Beginners Transistor Circuit
« Reply #24 on: February 02, 2021, 08:30:28 pm »
Its funny you say that, I'm working on a practical project which is based around a Basic Stamp microprocessor, i thought i was going to need relays in order to switch a 12v 30A circuit but someone mentioned MOSFETS and looking at the FQP30N06L it would appear to up to the job. So, I started playing around with one.

The datasheet says Vgs(th) is between 1 and 2.5V and Rds(on) resistance 0.035ohm so I looked to calculate the resistor value 5V - 2.5 = 2.5V then 2.5/0.035=71.43 ohm. Again its probably my simple thinking at fault but I assumed that if I apply between 1-2.5V to the gate the Drain & Source connection would be made. The problem I'm finding is that even with the power connected but not switched on the connection between Drain & Source is made.

I don't understand how?

I've attached the schematic I was using and the breadboard implementation,
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf