Calculating base resistor for transistor

Discussion in 'General Electronics Chat' started by Ric, Dec 19, 2012.

  1. Ric

    Thread Starter New Member

    Jun 23, 2009
    6
    0
    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.
     
  2. panic mode

    Senior Member

    Oct 10, 2011
    1,321
    304
    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)
     
    SPQR likes this.
  3. nomurphy

    AAC Fanatic!

    Aug 8, 2005
    567
    12
    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: Dec 19, 2012
  4. Jaguarjoe

    Active Member

    Apr 7, 2010
    770
    90
    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.
     
  5. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    I am surprised that the bluetooth module needs an external switch. Modules should have an enable command, sleep function.
     
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    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.
     
  7. nomurphy

    AAC Fanatic!

    Aug 8, 2005
    567
    12
    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.
     
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    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?
     
  9. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    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.
     
  10. Ric

    Thread Starter New Member

    Jun 23, 2009
    6
    0
    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.
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    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.
     
  12. Ric

    Thread Starter New Member

    Jun 23, 2009
    6
    0
    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.
     
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    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.
     
  14. cabraham

    Member

    Oct 29, 2011
    82
    30
    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
     
Loading...