Author Topic: Transistor Equations  (Read 12398 times)

0 Members and 1 Guest are viewing this topic.

Offline ashley.hughes

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
  • Rather by taught than told
    • Arduino Tutorials
Transistor Equations
« on: November 18, 2011, 01:38:49 am »

Hi,


I am trying to get my head around some equations for a transistor that I am going to use in a 3x3x3 LED cube controlled by an Arduino and I know I can find the answer in some one elses project but I would like to know how to calculate it for my self


The problem/question how to calculate the transistors resistors. I plan on using a BC548 to control which level of the cube is connected to ground to allow me to charlieplex (Only one level lit at a time)


So in my research I have found this





R1 = Rb
LED cathodes connects to the top of the above diagram


Ic is max current from the LED's to ground (9*20mA = 180mA)
Beta is 110 for a BC548 (off datasheet)





so Ib is 1.64mA


then


Vin = 5v
Vbe = 0.7








so Rb = 2.622k ohm (2.7k closest e12 resistor)


and finally R2 should be 10*Rb so 27k




Does the above look about right, I am not at home for a while so I can not hook this up to test it. Also all 9 LED's won't be on for long if at all. As 180mA is close to the maximum of 200mA the BC548 can handle.


Any help or corrections greatly appreciated
My Blog -> http://hughesy.net/wp
My Blog has some tutorials for Arduino mainly based around the mac environment, with xBee and  AppleScript
Starting 2nd year Electrical engineering
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1838
  • Country: ca
Re: Transistor Equations
« Reply #1 on: November 18, 2011, 03:10:41 am »
The calculations are ok, but there are a few things:

1) the BC458 is only rated at 100 mA DC continuous current.

The 200mA rating you state is the peak current rating, and that's usually specified (but not often said) at some frequency of switching operation.

Some data sheets specify the peak current at a frequency of  > 1 Mhz, some say >1 Khz, etc..  At 1 Mhz, that peak current can be sustained for less than 1us. At 1 Khz, it's 1ms.
Since you're charlie-plexing, I assume you are switching at much less then 1 Khz, so you should look at the DC max current of your selected transistor, and for the BC548, that's
only 100 mA. So it's too low.  Find something with at least 200-300 mA DC sustained max collector current.

2) to ensure saturation, a rule of thumb is to double the calculated base current, and use that to determine your base resistor. This protects you against a batch of transistors
with lower than specified hfe

3) as a final step, you should also do a power dissipation calculation, to make sure you don't exceed that.  In saturation it's difficult, but not impossible to exceed the power rating.
In this case, you would multiply the saturation voltage Vce(sat) * current = .2 x 180 mA = 36 mW so make sure your transistor can handle that, and is rated for at least twice as much,
to be safe. In this case, more than 80-100mw.  Also note that if you run the transistor near the maximum rated current, the saturation voltage can be higher than .2 volts and as much
as 0.7 to 1.2 volts depending on the transistor so check the data sheet and do your power dissipation calculation with the proper Vce(sat) to ensure you are not exceeding the
maximum rated power of the chosen transistor

 

Offline ashley.hughes

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
  • Rather by taught than told
    • Arduino Tutorials
Re: Transistor Equations
« Reply #2 on: November 18, 2011, 04:59:29 am »
OK thanks for the reply good to know my calculations are in the right direction. (Will make sure I save them.

I will find a more suited transistor, need to read that data sheets more carefully as well I see.  ???

I will make sure that I double my base current as well to ensure complete saturation. Should be good I have already made a LED cube like this as I said ages ago. It got destroyed by a soccer ball I believe. Things are always better when there designed by your self though. Last one was a follow the bouncing ball.

My Blog -> http://hughesy.net/wp
My Blog has some tutorials for Arduino mainly based around the mac environment, with xBee and  AppleScript
Starting 2nd year Electrical engineering
 

Offline joelby

  • Frequent Contributor
  • **
  • Posts: 634
Re: Transistor Equations
« Reply #3 on: November 18, 2011, 05:02:41 am »
It got destroyed by a soccer ball I believe. Things are always better when there designed by your self though. Last one was a follow the bouncing ball.

It sounds like you'd be better off keeping those bouncing balls away from your fragile electronics :(
 

Offline Armin_Balija

  • Regular Contributor
  • *
  • Posts: 161
  • Country: 00
Re: Transistor Equations
« Reply #4 on: November 18, 2011, 04:38:26 pm »
It depends on if you want an emitter-biased or base-biased circuit for your LED driver. Base-biased circuits set up a fixed value of base current and emitter-biased circuits set up a fixed value of emitter current. Because of the problem with current gain, base biased circuits are normally designed to switch between saturation and cutoff, whereas emitter-biased circuits are usually designed to operate in the active region.

Knowing this, I'd say we move your resistor over to the collector side of the transistor and set it for hard saturation with a base bias circuit.

So we know our VCC is 5 V, we calculate the Ic (sat) by dividing our VCC by our intended current (15 ma in this case) and we get ~330 ohms. So we put a 330 ohm resistor on the collector side and we then take 10% of that current and use that for our base current Ic(sat) * .1 = 1.5 mA. We then calculate our base resistance by dividing our Vbb - .7 / 1.5 mA. We get 5K for our base resistance. So our circuit should look something like this.
« Last Edit: November 18, 2011, 04:55:20 pm by Armin_Balija »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 14185
  • Country: gb
  • 0999
Re: Transistor Equations
« Reply #5 on: November 18, 2011, 05:29:59 pm »
1) the BC458 is only rated at 100 mA DC continuous current.
He's using the BC548 which is rated to 500mA continuous.

Beta is 110 for a BC548 (off datasheet)
Read the datasheet more carefully, the beta is specified as 110 minimum when VCE is 5V.

You'll need to use a higher base current to ensure saturation.

The datasheet specifies the saturation voltage as 0.6V maximum when IC = 100mA and IB = 5mA, a forced beta of 20.

You could use the BC338 which has its beta specified at 60 minimum with a VCE of 1V and IC of 300mA
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 2119
  • Country: us
Re: Transistor Equations
« Reply #6 on: November 19, 2011, 10:20:15 am »
For switching operation, you want to look at the collector-emitter saturation voltage, and take the base current listed there.  For the bc548, you see that with a collector current of 100 milliamp and a base current of 5 milliamp, the Vce = 0.6 volt.  That is a good place to start.  The harder you drive the base within reason, the lower the total power dissipation in the transistor.
 

Offline ashley.hughes

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
  • Rather by taught than told
    • Arduino Tutorials
Re: Transistor Equations
« Reply #7 on: November 19, 2011, 11:51:39 pm »
Thanks for all the input I will work off my original calculations with better study of the data sheets. I will also give my self a bit of a buffer in them as well. I am home on Wednesday think there will be some good old hook it up and look for the magic smoke
My Blog -> http://hughesy.net/wp
My Blog has some tutorials for Arduino mainly based around the mac environment, with xBee and  AppleScript
Starting 2nd year Electrical engineering
 

Offline ChrisKiwi

  • Contributor
  • Posts: 41
  • Country: nz
Re: Transistor Equations
« Reply #8 on: November 20, 2011, 02:08:14 am »
1) the BC458 is only rated at 100 mA DC continuous current.
He's using the BC548 which is rated to 500mA continuous.

[/quote]

I think that BC458 might have been a typo, the BC548 datasheet I am looking at says that IC is 100mA
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 14185
  • Country: gb
  • 0999
Re: Transistor Equations
« Reply #9 on: November 20, 2011, 01:22:51 pm »
That's odd, the Fairchild data sheet says 500mA but the Motorola one says 100mA.

http://www.pira.cz/pdf/bc548.pdf
http://www.datasheetcatalog.org/datasheets/150/128424_DS.pdf
« Last Edit: November 20, 2011, 01:42:59 pm by Hero999 »
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3787
  • Country: au
Re: Transistor Equations
« Reply #10 on: November 20, 2011, 01:45:13 pm »
Tha's odd, the Fiarchild data sheet says 500mA but the Motorola one says 100mA.

http://www.pira.cz/pdf/bc548.pdf
http://www.datasheetcatalog.org/datasheets/150/128424_DS.pdf

100mA continuous is the correct spec for a bc548.
Here is the definitive data from the company who designed it:

http://www.b-kainka.de/Daten/Transistor/BC548.pdf

It looks to me that the Fairchild "bc548" is not a real bc548 but a better spec'ed PN100A transistor which can handle more current. The PN100A was designed as a generic replacement for hundreds of older NPN transistors with the idea of reducing the unnecessarily large range of transistor models existing. I think Fairchild have decided that the PN100A exceeded all the bc548 specs, so they are selling it as a BC548.
 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: gb
Re: Transistor Equations
« Reply #11 on: November 20, 2011, 02:44:08 pm »
Interesting, the later datasheet on the Fairchild site http://www.fairchildsemi.com/ds/BC/BC548.pdf quotes 100mA.

On all of the datasheets hFE is shown as dropping like a stone above 100mA which would limit the usefulness of the device above this current. (The Fairchild sheet uses a log scale which doesn't show the effect as clearly.)

I seem to remember that with most small signal transistors it is the fall-off in hFE that limits the collector current rating.

Jim
 

Offline ashley.hughes

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
  • Rather by taught than told
    • Arduino Tutorials
Re: Transistor Equations
« Reply #12 on: November 21, 2011, 05:39:53 am »
Hey, just continuing on from all the above comments,

I am getting confused at the datasheet being learning a bit more. Beta is not a set figure it changes with current through Collector to emitter and the voltage across collector to emitting as well. This is confusing me I'm looking at the fairchild PN2222A datasheet.

(This part might not suit my requirements just using it to learn at the moment)

It is based on Ic and Vce now I know my Ic max is going to be 180mA (If all LEDs are lit) and Vce of 5V? 5V is what the leds will be getting to start with each dropping lets say 3.2V leaving 1.8V left.

What beta do I use? and how do I choose it? as its needed to calculate my resistance everyone seams to use it's around 100 but it seams to vary a lot

Any help is greatly appreciated
My Blog -> http://hughesy.net/wp
My Blog has some tutorials for Arduino mainly based around the mac environment, with xBee and  AppleScript
Starting 2nd year Electrical engineering
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3787
  • Country: au
Re: Transistor Equations
« Reply #13 on: November 21, 2011, 06:18:50 am »
You always use the lowest current gain spec, as it doesn't matter if you put too much current in the base when you wanting to saturate the transistor.

So the 2222a will saturate to 0.3V at 150mA with a base current of 15mA. The gain will be even lower at 180mA, so lets give it 22mA base current. That will be fine.

If the on signal to the base resistor was 5V, and allow for a 1V base voltage. That would mean you need a 4V/22mA = 180 ohm resistor.

Now what would happen if you worked off the 1V Vce voltage gain spec ? Not much - it would not saturate as fully so the LEDS get a little less volts. The transistor is a bit warmer, but is not too hot. So you could work off a gain figure of say 30 for the PN2222A- that should be safe.  That would give a base resistor of about 680 ohms, and the transistor might turn on to perhaps 0.8V maximum at a guess.

Basically, as long as you pick a base current that should at least turn on the transistor to below 1V emitter-collector voltage, nothing bad will happen, and after that it is just a matter of seeing how much more base current you can afford to supply to turn the transistor on even better. With the figures I have used above, for 180mA, it would be a good idea to have at least a 680 ohm resistor with a 5V driving signal, and the closer you can get to 180ohms without overloading the driving signal the better. You would not need anything less then 180 ohms.

Richard.

« Last Edit: November 21, 2011, 06:25:43 am by amspire »
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 2119
  • Country: us
Re: Transistor Equations
« Reply #14 on: November 21, 2011, 12:56:09 pm »
If you don't want to muck around calculating base current load, you can just use a MOSFET switch.  There are plenty of mosfets that can switch a 200 milliamp current with a 5 volt logic signal, and they draw zero DC current.  You probably want a pull-down resistor, but something on the order of 47 kohm is sufficient.

 

Offline ashley.hughes

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
  • Rather by taught than told
    • Arduino Tutorials
Re: Transistor Equations
« Reply #15 on: November 22, 2011, 01:24:49 am »
From what I have read around every one seams to worry about the Ic part of the hfe section in the datasheet and leave alone the Vce

Is that about right? So if i was using the BC338 http://www.farnell.com/datasheets/11801.pdf

and my Ic needs to be about 180mA my beta would be around 80ish and if I set my Ib at two times the min to ensure saturation I should be safe as houses would I not?
My Blog -> http://hughesy.net/wp
My Blog has some tutorials for Arduino mainly based around the mac environment, with xBee and  AppleScript
Starting 2nd year Electrical engineering
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3787
  • Country: au
Re: Transistor Equations
« Reply #16 on: November 22, 2011, 01:43:45 am »
Yes, the BC338 is a 800mA transistor from memory, so it would be excellent.

If they quote a beta of 80 for a 1V Vce and you double the base current, then you will be fine.
 

Offline ashley.hughes

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
  • Rather by taught than told
    • Arduino Tutorials
Re: Transistor Equations
« Reply #17 on: November 22, 2011, 01:56:04 am »
Thanks I will order some on my next order of parts

Still don't quite understand how to get values out of the hfe section of the datasheet but I will play around a bit, see if I can test them out
My Blog -> http://hughesy.net/wp
My Blog has some tutorials for Arduino mainly based around the mac environment, with xBee and  AppleScript
Starting 2nd year Electrical engineering
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9692
  • Country: us
Re: Transistor Equations
« Reply #18 on: November 22, 2011, 02:19:44 am »
Question for EE's:

When a model has parameters like hfe for bipolar transistors that are not constant but vary all over the place depending on other parameters, then such a model is not usually considered a good model. Why therefore is there so much emphasis on this (poor) model of a transistor in design equations instead of a better model that has more fundamental and nearly constant parameters? Is it because the "real" model is too complicated for hand calculations?

(I have read for instance that the common presumption that the bipolar transistor is a current amplifier is wrong, that a bipolar transistor is in fact a voltage amplifier like an FET, but with side effects; and that the false assumption that it is a current amplifier is what leads to the ugly variation in gain depending on the operating conditions.)
I'm not an EE--what am I doing here?
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3787
  • Country: au
Re: Transistor Equations
« Reply #19 on: November 22, 2011, 03:21:03 am »
First, when many of these transistors originally came out, they came with copious data and graphs. After 40 to 50 years of making the same part, many manufacturers are now just releasing very abbreviated data sheet.

Secondly the specs tend to allow for a very big variation. It is common for transistor current gain to be anywhere between 100 and 800.

So when you design, you pick a transistor that exceeds certain critical specs, and otherwise you design so the specs don't matter much.

Adding emitter resistors lowers the gain, but it also lowers distortion and eliminates a lot of the variation between transistors. For base bias resistors, you make then low enough so that all transistors from the worst to the best will be biased within the design tolerance.

If you look at most transistors, their specifications fall away very quickly above a certain collector current, so you really want to pick transistors that work well above your operating current. 
You need to look at capacitance to check it is low enough for your circuit.
If you are saturating the transistor, you need to check that the turn-off time is fast enough for you.
RF transistors have a different geometry to reduce the transit time of minority carriers across the junction.
Switching supply transistors are designed so that large stored base charges can be removed from the base very quickly. The peak base current in a switching power supply transistors can be many amps so a very low base resistance becomes important in these transistors.

In practice, you pick a transistor for a design based on 2 or 3 critical specs, and you make the design so it can handle as much variation as you can in all the other specs.

As I mentioned in another post, most of the time you can do a first pass model a transistor that is not saturated or off using these rules alone:

  • Base voltage is always about 0.6V no matter what happens
  • Base current is 100 times less (or lower) then the collector current.

When you start having to worry about the exact properties of a transistor - say if you are designing a log converter - that is when you have to start using a very good model, and that is when you will have to choose a well specified transistor.

Richard.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 2119
  • Country: us
Re: Transistor Equations
« Reply #20 on: November 22, 2011, 09:03:53 am »
Question for EE's:

When a model has parameters like hfe for bipolar transistors that are not constant but vary all over the place depending on other parameters, then such a model is not usually considered a good model.

A much more accurate model for transistors operating in the linear region is the Ebers-Moll transconductance model: Ie = Is * (e^(Vbe / Vt) - 1).  This is basically the diode equation for the base-emitter diode.  The difference between a transistor and a diode is that all but 1/beta of the emitter current is instead diverted to the collector.  Still, you need to know beta to figure out out much base current you will have.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3787
  • Country: au
Re: Transistor Equations
« Reply #21 on: November 22, 2011, 11:03:21 am »
Question for EE's:

When a model has parameters like hfe for bipolar transistors that are not constant but vary all over the place depending on other parameters, then such a model is not usually considered a good model.

A much more accurate model for transistors operating in the linear region is the Ebers-Moll transconductance model: Ie = Is * (e^(Vbe / Vt) - 1).  This is basically the diode equation for the base-emitter diode.  The difference between a transistor and a diode is that all but 1/beta of the emitter current is instead diverted to the collector.  Still, you need to know beta to figure out out much base current you will have.

The thing is it is extremely rare you need to use a model that accurate when designing a circuit.  When you are polishing a design for production, then you really do go into details. At the final stages of design, you do every calculation that may be useful to make sure that even with all the component specification drift, every built device will operate to the design goals.

But basically, if you look at the Ebers-Moll model, you see a transistor functioning in an exponential way. In practice we usually want the transistor working in a linear way or as a switch. If you are trying to design a low distortion preamp, and you are using an exponential model of the transistor, you are making things extremely hard for yourself.

Richard
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf