Calculating base resistor for transistor

Thread Starter

Ric

Joined Jun 23, 2009
6
I'm having some trouble working out the correct value for a base resistor to use with an NPN transistor. I've tried researching it but I've come across so many different calculators and formulas that I'm completely confused!

What I need to do is use the transistor as a switch. I'm using a PICAXE IC's output to turn the transistor on/off. The transistor is then to be used to turn on/off a bluetooth module that requires 40ma. (a picaxe can only output 20ma max from one of it's pins apparently)

I have some BC847B transistors to use, the datasheet of which can be found here: http://digichip.ru/datasheet/PDF/64...60af35bde9ebd8f01f492dc059593c/BC847BT116.pdf

The circuit is operating on 4.5v.

Any help would be greatly appreciated, thank you for your time and let me know if you need any additional details from me.
 

panic mode

Joined Oct 10, 2011
2,737
when transistor is used as a switch, it is common to assume that base current is 1/10 of the collector current.

if the collector current is 40mA, then base current should be 4mA.

assuming that base is powered by signal of voltage V=4.5V, then base resistor will be

R=(V-Vbe)/Ib=(4.5-0.7)/0.004=950 Ohm

you can pick then nearest value (910 Ohm or 1k)
 

nomurphy

Joined Aug 8, 2005
567
The only time you need to hit the xstr with a lot of base current (saturation) is when it is needed to switch fast and therefore minimize xstr power dissipation (it is more efficient).

Otherwise, use the required collector current divided by the min beta of the xstr to find the theoretical value base current.

For instance with the collector switching 40mA, with an Hfe of say 100; a base current of 400uA would be required. This tells you the minimum amount of current required from the driver. To calculate the base resistor, subtract the B-E 0.7V from the driver voltage and divide by the base current:
4.5-0.7 = 3.8V / 400uA = ~9.5K ohms max.

The difference in CE drop between a factor of ten and using the beta is neglible for relatively slow on/off circuits, and it lowers the driver current requirement.

The relatively high base current requirement of a bipolar xstr is why using a MOS FET can be preferred, as long as there is adequate drive voltage to the gate.
 
Last edited:

Jaguarjoe

Joined Apr 7, 2010
767
What happens when the xistor saturates and Vce becomes lower than Vbe? Now the B-C junction will be forward biased which steals current from the B-E junction which inturn sends current gain down the gutter. It might have something to with "forced beta" and a beta of 10 as Sgt Wookie uses.
 

Ron H

Joined Apr 14, 2005
7,063
The only time you need to hit the xstr with a lot of base current (saturation) is when it is needed to switch fast and therefore minimize xstr power dissipation (it is more efficient).

Otherwise, use the required collector current divided by the min beta of the xstr to find the theoretical value base current.

For instance with the collector switching 40mA, with an Hfe of say 100; a base current of 400uA would be required. This tells you the minimum amount of current required from the driver. To calculate the base resistor, subtract the B-E 0.7V from the driver voltage and divide by the base current:
4.5-0.7 = 3.8V / 400uA = ~9.5K ohms max.

The difference in CE drop between a factor of ten and using the beta is neglible for relatively slow on/off circuits, and it lowers the driver current requirement.

The relatively high base current requirement of a bipolar xstr is why using a MOS FET can be preferred, as long as there is adequate drive voltage to the gate.
You are misinformed. A transistor's beta is spec'ed in the active region, with several volts of Vce. Beta in saturation is very low. If you look at the Vce(sat) specs and curves in a datasheet, you will find that it is specified at Ic/Ib=10, or, less commonly, 20.
This doesn't mean that a randomly selected unit will not saturate with Ic/Ib=beta(min). When designing a circuit, the smart way to do it is so that it will work with any unit you choose within a given part number.
 

nomurphy

Joined Aug 8, 2005
567
You are misinformed. A transistor's beta is spec'ed ...etc
I am not misinformed, however you may not understand my point. Although all of this is xstr spec dependent, it is NOT always necessary to drive a switching xstr into saturation; especially with simple/slow switching requirements and low drive capacity. There are design issues of which to be cognizant; but, kind of funny, how this method has worked for years in many designs without failures in operation.

To the OP, you note that the IC output has 20mA capacity, but look at the datasheet and see what the pin output voltage is at 20mA (or 1mA/10mA depending on how they spec it). The output voltage will typically drop with an increase in output current.

Although the IC specs may be with +5Vcc, the output may only go as high as 4V or so, and probably less with a lower PS voltage (+4.5V?) because the output voltage is usually PS dependent -- again, check the datasheet -- such performance could affect your calculations.

Using a logic level N-chan MOSFET may make things easier, you can drive it direct without a gate resistor if you so desire.
 

Ron H

Joined Apr 14, 2005
7,063
I am not misinformed, however you may not understand my point. Although all of this is xstr spec dependent, it is NOT always necessary to drive a switching xstr into saturation; especially with simple/slow switching requirements and low drive capacity. There are design issues of which to be cognizant; but, kind of funny, how this method has worked for years in many designs without failures in operation.
Before I retired, I was a design engineer. I designed to worst case component specs. If you do that, what spec(s) of the BC847 would you use when designing a switch to turn on a Bluetooth module requiring 40mA?
If you don't design to worst case specs, then how do you choose component values?
 

crutschow

Joined Mar 14, 2008
34,409
I agree with Ron H. A proper design that will work over a wide temperature range and with any BJT should have a base current of 1/10 (or perhaps 1/20 with high gain transistors) of the maximum collector current. If you just use the minimum beta, then the transistor may not be saturated and still have several volts collector-emitter when turned on. That can cause high power dissipation in the transistor and may be interpreted as the wrong signal level at the output.

If you really need to operate with a lower control current then use a Darlington or MOSFET.
 

Thread Starter

Ric

Joined Jun 23, 2009
6
Apologies for not getting back to you sooner, I can see I've sparked an interesting conversation. I believe that the general consensus is that the following from panic mode is correct:

R=(V-Vbe)/Ib=(4.5-0.7)/0.004=950 Ohm

The Bluetooth module I'm using is a HC-06 which doesn't appear to have any sort of sleep mode. 40ma is the max current drawn but it sits at around 8ma once paired.

I'll be giving it a try over the next few days.

Thank you all very much for your help, it's greatly appreciated.
 

Ron H

Joined Apr 14, 2005
7,063
Apologies for not getting back to you sooner, I can see I've sparked an interesting conversation. I believe that the general consensus is that the following from panic mode is correct:

R=(V-Vbe)/Ib=(4.5-0.7)/0.004=950 Ohm

The Bluetooth module I'm using is a HC-06 which doesn't appear to have any sort of sleep mode. 40ma is the max current drawn but it sits at around 8ma once paired.

I'll be giving it a try over the next few days.

Thank you all very much for your help, it's greatly appreciated.
The datasheet says that BC847B Vce(sat) is specified for a forced beta of 20, i.e., for a collector current of 40mA, you can use 2mA of base current. Rb=1.8k or 2k would be fine.
See the attachment.
 

Attachments

Thread Starter

Ric

Joined Jun 23, 2009
6
Okay that's interesting to know. Am I right in thinking that if I were to use a 1k resistor anyway, it would still work perfectly fine?

From my understanding it would make more current available to the Bluetooth module but the module is only going to draw what it needs anyway?

Thanks again for your help.
 

Ron H

Joined Apr 14, 2005
7,063
Okay that's interesting to know. Am I right in thinking that if I were to use a 1k resistor anyway, it would still work perfectly fine?

From my understanding it would make more current available to the Bluetooth module but the module is only going to draw what it needs anyway?

Thanks again for your help.
A 1k resistor will give you enough base drive to easily sink 80mA. If the module only requires 40mA, then that's all it can draw.
 

cabraham

Joined Oct 29, 2011
82
I am not misinformed, however you may not understand my point. Although all of this is xstr spec dependent, it is NOT always necessary to drive a switching xstr into saturation; especially with simple/slow switching requirements and low drive capacity. There are design issues of which to be cognizant; but, kind of funny, how this method has worked for years in many designs without failures in operation.

To the OP, you note that the IC output has 20mA capacity, but look at the datasheet and see what the pin output voltage is at 20mA (or 1mA/10mA depending on how they spec it). The output voltage will typically drop with an increase in output current.

Although the IC specs may be with +5Vcc, the output may only go as high as 4V or so, and probably less with a lower PS voltage (+4.5V?) because the output voltage is usually PS dependent -- again, check the datasheet -- such performance could affect your calculations.

Using a logic level N-chan MOSFET may make things easier, you can drive it direct without a gate resistor if you so desire.
After glancing through the thread, I can tell you that Ron H has given you a very good answer. What you're saying is conditionally true, but if you wish to develop hardware that will be mass produced & required to work reliably for the lifetime of the product, you cannot rely on "typical" performance specs. You must use guaranteed values over the full span of operating conditions.

If, however, you are building a 1 of a kind unit for your own use, it doesn't hurt to experiment by measuring beta values. Keep in mind, though, that if the base is overdriven, the switching speed typically decreases. If the base drive turning the bjt ON is large the device goes deep into saturation, meaning it is sluggish coming out when turned off. The key to fast switching is to just turn it on to the cusp of saturation minimizing stored charge in base region.

This is often done w/ a Schottky diode from base to collector. The price paid is increased dissipation. When turning it OFF, a large base current is desirable to remove the stored charge in the base region as quickly as feasible.

Anyway I just thought I would mention that. I am not trying to diss anyone, but discussions about electronics seems to bring a lot of self-proclaimed experts to the table. Unless someone studies for years, at the MS or PhD degree level, plus obtains decades of experience developing real world hardware, their knowledge base is too limited to argue with an expert.

Many members on this forum have MS, PhD degrees in EE, physics, ME, etc., plus years/decades of applying their skills for salary, & unless you have their equivalent in education & experience, arguing with them is not wise. Listening is much more productive. Again, there is no harm in not knowing, nor in asking, but telling someone who has been around the block and back a few times "here's how it really is" is not going to help you. Peace.

Claude
 

belektrik

Joined Jan 11, 2020
8
You are misinformed. A transistor's beta is spec'ed in the active region, with several volts of Vce. Beta in saturation is very low. If you look at the Vce(sat) specs and curves in a datasheet, you will find that it is specified at Ic/Ib=10, or, less commonly, 20.
This doesn't mean that a randomly selected unit will not saturate with Ic/Ib=beta(min). When designing a circuit, the smart way to do it is so that it will work with any unit you choose within a given part number.
I know this is a very old thread but I would like for the OP or anyone else who could expand on this answer a bit more.
How would you design around a transistor to have the widest possible range?

Maybe I should have started another question but this answer really peeked my interest.

For example, there's a very old transistor;
Toshiba 2SA1302

Under DC Current, there's two Hfe values
Code:
DC Current Gain
hFE(1) (Note) VCE = -5V, IC = -1mA 55  –   160
hFE(2)        VCE = -5V, IC = -8A  35  60   –
 

AnalogKid

Joined Aug 1, 2013
11,037
The only time you need to hit the xstr with a lot of base current (saturation) is when it is needed to switch fast and therefore minimize xstr power dissipation (it is more efficient). Otherwise, use the required collector current divided by the min beta of the xstr to find the theoretical value base current.
Disagree. While I also disagree with the 1/10 rule of thumb (the 1950's were loooong ago), what you describe is a version of dangle-biasing and is not stable over time, temperature, aging, and production lots. The gain and saturation curves on a datasheet are typical values, not worst case across all operating conditions, and the circuit needs to account for this.

ak
 

belektrik

Joined Jan 11, 2020
8
Disagree. While I also disagree with the 1/10 rule of thumb (the 1950's were loooong ago), what you describe is a version of dangle-biasing and is not stable over time, temperature, aging, and production lots. The gain and saturation curves on a datasheet are typical values, not worst case across all operating conditions, and the circuit needs to account for this.

ak
Are you saying that you should use 1/10 of the hfe? If so, is it 1/10 of hfe min and at what current / voltage value?
 

Audioguru again

Joined Oct 21, 2019
6,688
hFE (beta) is used when a transistor is an amplifier with plenty of collector-emitter voltage. A transistor used as a switch is saturated and the datasheet of most transistors list its maximum saturation voltage loss when its base current is 1/10th its collector current and hFE is not mentioned. Some people call it a forced beta of 10.
 

AnalogKid

Joined Aug 1, 2013
11,037
The rule of thumb is that for hard or firm saturation (the lowest possible collector-emitter voltage when the switch is on), the base current should be no less than 1/20 the collector current being switched. In the 1950's when transistors with a gain of 100 were rare, this made sense. With contemporary parts, I've found that 1/20 is a good working ratio that puts less stress on the base-emitter junction.

ak
 

belektrik

Joined Jan 11, 2020
8
The rule of thumb is that for hard or firm saturation (the lowest possible collector-emitter voltage when the switch is on), the base current should be no less than 1/20 the collector current being switched. In the 1950's when transistors with a gain of 100 were rare, this made sense. With contemporary parts, I've found that 1/20 is a good working ratio that puts less stress on the base-emitter junction.

ak
Thank you, so you're saying if you need a transistor to switch lets say 1amp; then using the 1/20 ratio the base to emitter current should be no less than 1/20th of an amp or 0.2amps.

That also means that giving yourself some headroom for a wide array of transistors maybe you should design for double the amp, say 0.4amps at the base of the transistor?

Is that correct?
 
Top