Re: Newbie transistor question
- From: John Popelish <jpopelish@xxxxxxxx>
- Date: Mon, 29 May 2006 12:45:33 -0400
realexander wrote:
Hi,
I'm having trouble getting a transistor to work the way I thought it
should, and I hope someone could help me.
I'm using a PIC to drive common anode 14-segment LEDs. Since the PIC
I/O line can't supply enough current, I'm trying to use a 2N2222
transistor instead. The PIC directly drives the 2N2222's base (no
intervening resistor), the collector is tied to +5 and the emitter to
the common anode. The problem is that, while the LEDs light, they are
very, very dim - only visible in a dark room.
I thought maybe that the PIC wasn't saturating the transistor, so I put
in a pull-up resistor on the base. No difference. I connected the base
directly to +5, and the LEDs were still dim. The emitter shows +4V (5
volts in the collector, 4 volts out the emitter??!!) If I tie the LEDs
common anode to +5, they light up nicely, but of course I can't
multiplex a bunch of LEDs with the anodes tied to +5.
Am I using an inappropriate transistor? Am I using it wrong?
(discussing NPN transistors, like the 2N2222)
If the transistor were big enough to carry the current and still have significant current gain, the emitter would have a voltage about .6 to ..7 volts (one forward biased silicon diode drop) below the base voltage. The problem is that transistors lose gain rapidly as the collector voltage gets close to or below the base voltage. In this common collector application, you expect operation with both collector and base voltage at 5 volts (no extra positive collector voltage to keep the gain up). So the current gain falls and the base to emitter drop rises. I don't know what the total emitter current is with your load (but it can't be very high if all the LEDs are dim), so this may or may not be the problem. You may have collector and emitter reversed (the emitter is the lead near the tab on the can).
All this can be extracted from the data ***:
http://www.fairchildsemi.com/ds/MM%2FMMBT2222A.pdf
Note figure 3 and 4. Figure 3 shows the base to emitter drop with the collector voltage so low that the current gain is reduced to 10. Figure 4 shows the base to emitter drop when the collector voltage is 5 volts more positive than the emitter.
You could use a PNP transistor, such as a 2N4403, but you will need a base resistor to limit the base current to a reasonable value (say, 1/20th of the worst case LED load current), if the PIC can pull down that much. If the required base current is more than the PIC can reasonable supply, you need two stages of PNP. The first connected as a follower (similar to what you have, now, except that the collector connects to ground). But then you add a base resistor between its emitter and the saturating switch transistor's base. The resistor's value will have to take into account the two base emitter drops in series that use up some of the 5 volt supply.
.
- References:
- Newbie transistor question
- From: realexander
- Newbie transistor question
- Prev by Date: Re: Interesting new product
- Next by Date: Re: Interesting new product
- Previous by thread: Re: Newbie transistor question
- Next by thread: Re: Newbie transistor question
- Index(es):