Calculating Values for PN2222A LED Circuit

chulian

Member
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.
 

Fardsnarp

Well-Known Member
There are all sorts of calculators for this stuff online.
This is enough to get you ball park. Seems a 50 resistor in line with the led should work. You probably should join the Arduino forum for more information though.

Also found this.

I think people use some standard value to keep current from exceeding the Arduino capacity. I believe FET's are more common now since they don't really draw current. But, again, the Arduino forum will give you much better information.
 

solakani

Well-Known Member
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.
Asked 8 years, 6 months ago
Active 8 years, 6 months ago
Viewed 9k times
 
Top