Electrical – How to calculate Resistor needed in PNP Transistor Circuit

diodesemitter-currentresistanceresistorstransistors

I am trying to calculate the resistor value I need to achieve 35mA in my circuit. Vcc is 5V. Can someone explain the values I need to find in the datasheet as well as formula to use to find the correct Resistor value? I would like to learn this for future projects using transistors.

Transistor used is S8550
UV LED used is here

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

You should not use an emitter follower to drive that LED, the voltage drop is too high in relation to the supply voltage.

If your GPIO is 5V you can still use the PNP 8550 transistor as so:

schematic

simulate this circuit – Schematic created using CircuitLab

The value of R2 shown is probably a bit high, and depends on the LED Vf at 35mA.

Incidentally, your measured voltage seems a bit high to me, you may be putting too much current through the LED for continuous operation.

If your GPIO is 3.3V, you should use an NPN transistor such as a 8050 and flip everything around and reduce R1 to about 860 ohms.

Note that LOW = ON in the PNP schematic shown, with an NPN transistor HIGH = ON.