diy solar

diy solar

Calculating Values for PN2222A LED Circuit

Yehuda

New Member
Joined
Sep 22, 2021
Messages
10
I'm gonna be adding an IR LED to my Arduino Uno and I'm trying to wrap my head around the math used to figure out the exact resistor values needed to use a PN2222A transistor to drive the LED.

I know my LED has a voltage drop of 1.35V and I want to run it at 100mA and that I'll be supplying it with 5V from the Arduino. What I don't understand is the math for how to figure out the exact voltage drop of the transistor between the collector and emitter. And I'm also trying to figure out the math used to calculate the required milliamps that have to flow through the base of the transistor in order to fully turn it on (but not waste extra electricity).

I know that there is quite a lot of leeway in which resistors to use and the circuit will still work, but I'm hoping to figure out the math so that I can get as close as possible to using the exactly perfect resistor values.
 
You get the Vce saturation voltage from the datasheet - looks like around 0.3 volts where you intend to run it.

Minimum base current is a function of gain [hfe] and desired collector current. The hfe where you want to run is around 100 based on the datasheet, so minimum base drive is Ic/hfe = 1 mA. But, you want to drive it harder than that because you want to insure saturation - I would use around 5 mA if it was me. When calculating base drive be sure to take into account the Vbe drop of about 0.6 volts. Based on the foregoing a base resistor of around 680 ohms should suffice.

You will also need a resistor in series with the LED to limit collector current. Based on the info above something around 33 ohms 1/2 watt should work.

Hope this helps.
 
Back
Top