I'm trying to drive 6 IR LEDs off of a UNO using a P2N2222A. I'd like to push about 100-200mA through them.
In order to reduce the current draw, I was thinking that I should put them in parallel banks, however, I'm not sure how to calculate the resistor value to get the current I want. Could someone help me out with the calculation? Is what I am attempting to do a good idea?
All diodes are approx 0.63V at about 15mA. I've driven them to go to about 1.5V each at about 150mA for a short period. I figure that this wouldn't be too bad if I pulse them and allow them to dissipate heat. I don't have datasheets on these.
BTW, what is the Vin for? Is it just raw power without a current limit? At least not limited to the board, but the power supply that supplies the board?
adrian_h:
BTW, what is the Vin for? Is it just raw power without a current limit? At least not limited to the board, but the power supply that supplies the board?
Yes, "Vin" is the input voltage as delivered from your external supply / battery.
The LEDs should be between +V and the collector, not in the emitter (which ought to go straight to Gnd.)
Oh, ok, didn't realize that would make a difference. Still reading up on all of this stuff.
Yeah, that I know, but when I start drawing more current, the values I am getting from my multimeter don't seem to be correct.
Also, seems that the transistor will also take a voltage drop too and all these voltages are dependent on current draw (or is it the other way around?).
So, this appears to be what I want (I am starting at a lower current for now, but may go higher later), but as I said, testing shows that these voltages on the LEDs and transistors are changing causing the current to change too. Not sure how to compensate.
Let's go with 80 mA, IREDs can do with much more current than LEDs.
[Bold, daring, and unafraid - that's us, already]
Let's say you have a 9V Vin, 6 LEDs IREDs w/ nominal 1V each, that's 9V - 6V = 3V
3V / 80 mA = 37?
Two 100? in parallel are 50?, 3V / 50? = 60mA
3 100? in parallel are 33?, 3V / 33? = 90mA
Just for peace of mind, disconnect the battery (external) before connecting USB and vice versa.
E = 4.5V - 2.5V = 2.0V (each IR LED is about 1.25V)
I = 100mA
R = 2.0V/0.1A = 20
1/R = 3/RR0
20 = RR0/3
RR0 = 20*3
= 60
So I happen to have 330 Ohm resistors on hand so, I could put 5 in parallel to get 66 Ohms or 6 in parallel to get 55 Ohms. I used 5 in parallel.
Going backwards through the equations I just used, I can calculate current (I).
RR0 = 66
R = 66/3
= 22
I = E/R
= 2.0V / 22
= 90.9mA
Ok, so those are my calculations. Here is what I actually measured:
To measure current and voltage, I moved base wire from pin 12 to +5V.
Current was measured at (A) in diagram, diode voltages were measured along lit diodes and resistances were measured while circuit was broken.
Could someone tell me what I'm missing in my calculations? This is driving me nuts.
What I think you are missing is the saturation voltage - Vce(sat) - of the PN2222A. The PN2222A (like the 2N2222A) is a rather poor transistor for medium-current switching because of its high Vce(sat). This is the voltage drop between collector and emitter when the transistor is turned on. More modern transistors such as BC327 or (even better) ZTX851 have lower Vce(sat).
You need to subtract the Vce(sat) from the supply voltage (along with the IR diode voltage drop) when calculating the current through the series resistor.
Also bear in mind that Vce(sat) is usually measured with the base current being 10% of the collector current, and with a 330 ohm base resistor, you are not driving it that hard.