# confused on Microchip driven transistor circuit

Discussion in 'The Projects Forum' started by aterhune1984, Nov 24, 2010.

1. ### aterhune1984 Thread Starter New Member

Nov 24, 2010
25
0
Hello all,
I know this may seem like a simple topic but I have looked at all the tutorials I have found and am still very lost, maybe i need a new perspective, I have a circuit that I designed a while ago. a 9V source as a battery, a microchip processor sending out roughly 5V signals to turn on and off several transistors for different pins. 3 LEDS in Parallel(1.8V @ 20mA) just fo this example and I am lost with the calculations of the resistors and how I can drive these with the correct voltage and current. I have also tried transistor calculators but they have yet to help me. I will include a picture of the transistor part if I am able. The transistor I am using is a BSR43 SOT89 NPN Transistor I got from digikey.com

Hopefully you will be able to explain how to get the right values so I can do this on my own soon. I have other values of leds I need to light up so its not just going to be the 1.8Vx20mA

Thanks in advance

File size:
78.6 KB
Views:
44
2. ### Kermit2 AAC Fanatic!

Feb 5, 2010
3,852
967
Bare basics

9 volt battery. 1.8V leds times 3 = 5.4Volts

9-5.4=3.6Volts

3.6 volts @ 20mA E=IR 3.6 / .02 = 180 Ohms.

You need a 180 ohm resistor in the series string of LED's.

Did you follow how I did that? Also, use a 200 or 220 ohm resistor and the LED's will last longer.

Dec 5, 2009
5,201
313
4. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
You need to explain that our OP shows the LEDs in parallel, but they need to wire them in series instead.

You also need to explain the base current limiting resistor.
Rbase = (Vcc/Vbe) / (Ic/10)
Etc.

5. ### aterhune1984 Thread Starter New Member

Nov 24, 2010
25
0
So instead of wireing them in parallel i need the leds in series correct? I understand the ohms law part. as far as the base resistor vcc should be 5v, not sure how to find what the actual value of Vbe will be, or the actual value of Ic, and where do you get 10 from?

6. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
With a 9v supply, you will waste less power in the current limiting resistor(s) if you wire strings in series.

For practically all commonly available single bjts (biploar junction transistors), when using them as a saturated switch, base current is given as 1/10 of the desired collector current.

Vbe for up to about 1/2 of the transistors' maximum rated current will be roughly 0.7v; that's close enough for most purposes.

So, if you have one series string of LEDs, and you are expecting around 20mA of collector current, then:
Rbase = (Vcc-Vbe) / (Ic/10)
Rbase = (5v - 0.7v) / (20mA / 10)
Rbase = 4.3v / 2mA
Rbase = 2150 Ohms
That is not a standard value of resistance, but 2.1k or 2.2k are, and either would work just fine.

If you want to operate more LEDs in parallel strings from one bjt, you can do so - but keep in mind that your uC's I/O pins can only source or sink up to 20mA; so you're basically (sic) limited to 200mA sink current from a single bjt.

2N3904 transistors are rated for up to 200mA, but that is an absolute maximum; 100mA is a practical limit.
2N2222/PN2222 transistors are rated for up to 800mA, but 500mA is a practical limit.

For driving transistor bases, 220 Ohms is the minimum you should use; that will result in nearly 20mA current from the I/O pin, and up to 200mA sink current from the transistor.

7. ### aterhune1984 Thread Starter New Member

Nov 24, 2010
25
0
I think I understand, enough at least to calculate for the different leds i need, Thanks Very much!