

I am using 700 mV for the B-E drop, which leaves 500 mV accross R1. This circuit will light the LED when the digital signal is high. If you only wanted a few mA, you could probably drive it directly from the digital output, so I'll assume the problem is you want full brightness and your digital output can't source 20 mA. This is assuming a normal green LED which will have a forward drop of about 2.1 V and that you want close to 20 mA thru the LED.
PNP TRANSISTOR SCHEMATIC HOW TO
It now appears your question is how to control this LED from a 3.3 V logic signal but have most of its current come from a 5 V supply, and the LED cathode tied to ground outside your control. You now say the cathode is tied to ground, which makes more sense if you want to light the LED normally. Added now that cathode is tied to ground: However, that does not apply here since I assume you want to light your LED normally.īy the way, both a PNP and NPN can be used to drive a LED from the high side, but again, none of that matters with the LED hooked up backwards.

The leakage is partly a function of light hitting them, and this can be harnessed to use a LED as a light sensor. Most LEDs are not very good diodes in that they leak and their typical reverse voltage before breakdown is around 5V. LEDs don't work on the Zener principle, or anything else that makes use of reverse biased conduction. The anode is then more positive than the cathode.

To light a LED, you put forward current thru it, meaning in the direction so that the inherent diode is forward biased and conducts normally. It doesn't matter what kind of transistor you use if the anode of the LED is tied to ground and you don't have a negative supply.
