2nd Opinion on Transistor Base Current

OK, I'm just starting to make a better version of a relay switched LED array on one of my projects.

I have 6 x Common Anode RGB Ultrabright LED's. Each one with Cathode connected 100R. This gives me R = 26mA, G = 16mA, B = 18mA (measured), and Blue and Red looking similar brightness to my eyes. The Green seems brighter but that's fine for my purpose.

So, 6 LED's will draw a max of approx 156mA (Red on). I'll only ever have one colour at a time on.

I've converted this to simple transistor switching, using 2N3904. These are good for 200mA Ic and have a minimum Hfe of 30 (100mA Ic, 1.0Vce). I have one transistor switching each colour rail of 6 LED's. Everything is being driven at 5v.

I'm driving the Base via an Arduino pin and I've currently got 1k Rb and measuring 4.1mA Ib.

Which brings me to the question; do you think this will be OK once I have all 6 LED's on or should I drop that Rb down to at least 500R, or even lower, to increase Ib and ensure saturation?

I don't want to put unnecessary extra mA into the Base as I'll be using various tricks for power management on batteries, since the LED's are my biggest consumption, including flashing them and using PWM to try and get average consumption down. A 50/50 duty on straight forward flash drops me to an average 78mA for the LED's and a PWM fading flash would help a little more, so saving 5-15mA transistor base current will matter to me.

Thanks for reading.

I think there is a voltage drop across the base/emitter junction, so that may need to be considered if you do calculations. You might consider just trying different value resistors until the LEDs have the appearance you want.

tack:
I'm driving the Base via an Arduino pin and I've currently got 1k Rb and measuring 4.1mA Ib.

Which brings me to the question; do you think this will be OK once I have all 6 LED's on or should I drop that Rb down to at least 500R, or even lower, to increase Ib and ensure saturation?

When you're using a transistor as a switch you should always got for 100% saturation. There's no real downside to having a smaller resistor except that it wastes a few electrons (ie. more current can pass through the resistor).

Bear in mind that an Arduino pin can only supply 40mA so your resistor has to limit the current to that amount.

330R is a common choice for the base resistor in Arduino circuits.

You would do better to use a transistor more suited to switching 156mA, such as BC337 (min. hfe 100 @ 100mA). As the ancient 2N3904 has such a low hfe at high current, I would design for 15mA base drive using that transistor, which means around 270 ohms.

I don't want to put unnecessary extra mA into the Base as I'll be using various tricks for power management on batteries

If you are pumping 200ma through the leds, batteries aren't the best choices here, in my view.

Generally, you want to pump as much current into the base as you can, to force a saturation. The avr can delivery 20ma so 5v/20ma = 250ohm, and I typically use anything from 220ohm - 470ohm, with 330 - 390ohm being fairly common.

That means the max you want to switch is about 200ma, assuming that the device can tolerate that.

3904 is a little bit too puny here for 100ma. I would use one 3904 for each led, providing you with the flexibility to turn on multiple colors for that led in the future.

Why not just to use MOSFETS, if less power consumption is the goal? Like 2N7000 they are also pretty cheap.

If the LEDs are truly Ultrabright, do you need that much current?
I've seen with 5000, 6000mCD LEDs that way less current is needed to achieve blindingly bright light levels.

Full consumption would be around 150mA if it's the Red on. My sketch includes parameters for flashing on/off and set duty cycle for flashing. 50/50 flashing halves the LED load.

I'd like to get what I can from batteries but the design needs 8 hour run minimum from a set of AA. I have allowed for addition of a second bank for double capacity and/or changing one set while another is still powering the device. I'll also add 1 & 2 bank monitoring and overall power health that will be sent back via nRF to the web service and our control application.

At the moment I easily get a days run, and that is with relay switching currently.

I need the LED at these currents as 6 LEDs gives me visibility from a distance in bright daylight. With use of PWM I'm thinking about having brightness parameters and even using a LDR to do auto brightness for dull days, night and indoors, where the required visibility could be maintained at lower brightness. This would also assist even more with power saving.

I don't have any requirement with this device to control the LED's individually, so a transistor for each LED and colour is overkill and adds to build time and cost.

I'll look at an alternative transistor with larger Hfe at 100-150mA.

Thanks for the comments. It's always good to hear other people's ideas as a fresh perspective.

If you're looking to save on current consumption, I would consider swithing to N-Channel MOSFET vs a relay.
MOSFET needs next to nothing to turn it control, vs way more for an NPN+Relay.
See lower right connection example. I think this would be a good MOSFET to use as a switch

I'll look at an alternative transistor with larger Hfe at 100-150mA.

You should just forget about hFE altogether, for switching applications.

dhenry:

I'll look at an alternative transistor with larger Hfe at 100-150mA.

You should just forget about hFE altogether, for switching applications.

Why? Surely a higher Hfe means I can saturate it with a lower Ib for the Ic I require?

tack:

dhenry:

I'll look at an alternative transistor with larger Hfe at 100-150mA.

You should just forget about hFE altogether, for switching applications.

Why? Surely a higher Hfe means I can saturate it with a lower Ib for the Ic I require?

In practice, that is correct. However, the only figures you can rely on are the ones given for Vce(sat) @ specified Ib, Ic in the datasheet. These are usually quoted with Ib = 0.1 * Ic. If you want to minimise current consumption, use a small mosfet instead.