# Choosing a resistor for connecting a bipolar transistor

I need to run some LEDs using Arduino. The total current consumption is about 190 mA. For these purposes, I found a bipolar transistor PMBT2369 (Nexperia).

Transistor characteristics: - Maximum emitter collector voltage -> 15 V - maximum current collector -> 200 mA

I have a question on the choice of the nominal resistor on the base. Can I get a 2.2 kΩ resistor for this purpose? Or should I choose another resistance?

• Not enough information. In particular, you don't say what voltage supply you're using to drive the base. The data sheet has you using 1/10th as much base current as collector current to keep the thing in saturation. Figure that the base will be at 0.7V, you need 19mA. So $R_{base} = \frac{V_{mystery}-0.7\mathrm{V}}{19mA}$. Don't be surprised if the transistor burns to a crisp until you provide some copper on the collector as a heat sink. – TimWescott Dec 22 '18 at 16:59
• It generally a poor selection to use more than 80% of the rated current unless you are desperate and don't mind that failure rates double with every 10'C temperature rise. This is a Low current device – Sunnyskyguy EE75 Dec 22 '18 at 17:40
• Almost for sure, you would be better off using some type of MOSFET rather than a BJT (PNP and NPN). – mkeith Dec 22 '18 at 18:36
• As @TimWescott says, in order to maintain saturation at 190mA you will want around 19mA in the base. But the forward voltage at the base-emitter junction will probably be around 1V under these conditions (not 0.7V as assumed by Tim) but it is easy to measure. Base-emitter voltage (with fixed current) is also heavily temperature dependent. It goes down substantially as the transistor gets hotter. – mkeith Dec 22 '18 at 18:41

To answer this question, I'm going to assume you're driving something like LED strips, as simple LEDs ussually consume < 20mA of power, these days even just a couple milliamps is very common. These simple LEDs require a series resistor to limit the current across them. On the other hand, LED strips or other high power LED based devices like LED lamps are designed such that the full voltage can be placed across them without any current limiting to need to be taken into account. So, for this answer I'm assuming you just need to transistor to be able to drive at least 190mA.

Bipolar transistors act as current amplifiers: They amplify a current going into the base by an approximate value (called beta or hFE). This amplified current is the current going through the collector. So what you want is for the base current multiplied by beta to be greater than or equal to 200mA. To get a good idea of what the beta value is, you can search for it on your data sheet, in this case they call it hFE. You generally want to be using the minimum value in your calculations as the beta value can vary quite a lot. In this case, the minimum beta is 20, so you want to be passing at least 200/20 = 10mA into the base.

First, you should check that the Arduino digital IO pins can source 10mA. A quick google (and a double check with the data sheet) reveals that they in fact can go all the way up to 40mA, so you're in luck. The base of a bipolar transistor when it's on will have approximately 0.7 volts across it, so the total voltage over any resistor connected from the 5V output of the Arduino to the base with be 4.3V. So the biggest resistor you want to use is about 4.3V/10mA = 430 ohms.

So your desired resistor value of 2.2K is much too large: you need at most 430 ohms. It's recommended you go a fair amount smaller than this as the beta value drops as voltage across the transistor drops, so something like 220 ohms would be a good number to be using. Now of course you're pulling even more current out of your Arduino pins, but with a maximum of 40mA you should be okay.

Now the other issue that arises is the maximum current value of your transistor. Using the transistor so close to it's maximum rating is probably dangerous and a new transistor should be chosen with a maximum rating maybe twice that of the LED strips (so 400mA or greater). It's always good to avoid runnning things right near their maximums.

Lastly, you may want to look at power MOSFETs rather than bipolar transistors: MOSFETs are controlled by a voltage rather than a current, so you don't need to worry nearly as much about the sizes of the resistors or the current draw on the GPIO. In fact, I had this exact issue some time ago working with LED strips, I was trying to draw 500mA with similar transistors and this just wasn't working due to having to draw too much current from the GPIO and, and not having a high enough beta value. I decided to switch to MOSFETs, and these ended up working much better for my application.

EDIT: A note on transistor saturation.

As the voltage across a bipolar transistor drops, the beta value of the transistor drops along with it so that once saturation (the region of operation where there is only a small voltage drop across the transistor) is reached, the beta may be half of what it used to be or less. Here's an example graph taken from a different transistor data sheet, as the one you selected doesn't have the required curves.

Note that at high current, in order to lower the voltage across the transistor from 1 volt to 0.25 volts, it's required that the base current be doubled, despite the same collector current flowing. This is because the beta value is decreasing as the collector emitter current is decreasing. Without the given graphs, this is a difficult effect to try and put into calculations which is why I recommended halving the resistor value found however other estimations can be used as well such as assuming a common beta of around 10 as some comments have noted (which should come out to approximately the same value of resistance).

The main reason to lower the voltage across the transistor is mainly to just make sure near the full voltage is being applied across the LEDs, but also to prevent the transistor from dissipating significant power: regardless of the current the data sheet claims, if the power rating of the transistor is too small you won't be able to achieve this level without cooking your transistor. For this reason it's important to look at the maximum power dissipation as well, look at the expected voltage drop across your transistor, and make sure the power doesn't exceed this value (again it's smart to make sure to stay a fair ways away from the maximums). The beta value also changes with temperature as well, and so minimizing the temperature changes is also quite important, which again requires minimizing the power dissipation.

• Really tempted to downvote. Your gain is just wrong. For a transistor in saturation (full on for the LED), gain should be in the range of 10 to 20, not 40. Otherwise the transistor will get very hot. The OP does not specify full-on/full-off operation, but that's the way to bet. – WhatRoughBeast Dec 22 '18 at 17:04
• Apologies, I double checked after looking at the data sheet and the hFE does in fact go down to 20 at higher collector currents. I have fixed this in my answer. – Kevin Brant Dec 22 '18 at 17:06
• You've still missed the point. At 200 mA and a gain of 20, Vce is only rated at 2 volts, for a total power dissipation of 0.4 watts. This will not work well in a transistor only rated for 250 mW. Note the Vce(sat) lines, which give a lower voltage (and hence power) at a gain of 10. Driving transistors into saturation (with the attendant low gain) is an important thing to understand - and you don't seem to understand it. – WhatRoughBeast Dec 22 '18 at 17:11
• It was for this reason that I noted that the resistance should be halved: to make sure the transistor stays in saturation a smaller resistor should be used, but I see I wasn't being explicit enough. I'll edit this in. – Kevin Brant Dec 22 '18 at 17:15

If you are new to electronics I would advise that you try to avoid bipolar transistors in a digital world.
Make the change to using FETs where there is no base current to consider, and select a single FET for most simple interfaces that you can populate your parts drawer with.

A logic level FET such as the On Semi MCH3484 in a SOT23 package can represent a good selection for a range of loads.. Rated to 60V and 2A or more, it includes gate protection so is very tolerant of handling abuse. It has a VGS(th) low enough to be driven directly with MCUs working from 1.8V and up.

You might use it in a circuit such as below to drive up to 2A with almost no load on the MCU GPIO pin. R1 limits the current charge/discharge speed for the Gate and R2 ensures the device is off when your MCU is in the reset process (where most I/O is set to inputs with no pullup.

simulate this circuit – Schematic created using CircuitLab