How to drive 8 IR LEDS at 38KHz.

Thread Starter

jeffjohnvol

Joined Oct 15, 2008
37
Hi, I googled but couldn't find this particular situation answered.

I want to drive 8 IR LEDs at 38KHz with a microcontroller. I can drive one no problem. The circuit I have sinks current into the microcontroller that is running 38Khz PWM after current passes the LED and a 100 ohm resistor.

But I want to drive 8 of these things and I'm worried about the current load. I know I can use a simple transistor circuit to drive them, but before I order (or go to radio shack) to get a transistor, I want to make sure I get one that can handle the 38KHz. I thought of running them in series, but the total voltage drops (0.7*8) exceed 5 volts.

If possible I would like to just use one transistor rather than 8. Any suggestions where to look?

Thanks in advance.
Jeff
 

Kermit2

Joined Feb 5, 2010
4,162
38 KHz is not much higher than regular audio signals.

I think you would have trouble finding a transistor that Couldn't handle that freq.

Use a MOSFET for the driver and use the smaller transistor to drive the mosfet from the micro's output.
 

Adjuster

Joined Dec 26, 2010
2,148
Hi, I googled but couldn't find this particular situation answered.

I want to drive 8 IR LEDs at 38KHz with a microcontroller. I can drive one no problem. The circuit I have sinks current into the microcontroller that is running 38Khz PWM after current passes the LED and a 100 ohm resistor.

But I want to drive 8 of these things and I'm worried about the current load. I know I can use a simple transistor circuit to drive them, but before I order (or go to radio shack) to get a transistor, I want to make sure I get one that can handle the 38KHz. I thought of running them in series, but the total voltage drops (0.7*8) exceed 5 volts.

If possible I would like to just use one transistor rather than 8. Any suggestions where to look?

Thanks in advance.
Jeff
I would be surprised if your LEDs dropped as little as 0.7V - that's about the right value for a silicon diode, which LEDs are not.

The IR LEDs I have seen are more like 1.3V. You might still be able to get two in a string, but whatever you do check the forward voltage, so you can get the resistor value correct.
 

Thread Starter

jeffjohnvol

Joined Oct 15, 2008
37
I would be surprised if your LEDs dropped as little as 0.7V - that's about the right value for a silicon diode, which LEDs are not.

The IR LEDs I have seen are more like 1.3V. You might still be able to get two in a string, but whatever you do check the forward voltage, so you can get the resistor value correct.
I believe you, and you are right, I was thinking diodes. I made a bad assumption and didn't bother measuring. I was just going by a circuit I found.

Thanks.
 

Kerim

Joined Mar 3, 2011
35
Let us assume your IR LED forward voltage is about 1.3V at 20mA (nominal current in general).
And you have +12V supply.

Your load is much lighter than a motor I guess, referring to your proposed circuit. So you will need just Q2 (any small npn) hence Q1 is not needed.
R2 could be made 4.7K instead of 1K (since the switching frequency is relatively low).
R1 will be in series with your 8 LEDs (between Q2 collector and +12V)

Let us calculate the new value of R1 by assuming the LEDs current is 20mA.
R1 = (12V - 8*1.3V) / 20mA = 80R.
R1 limits the current in the LEDs when Q2 is on (Vce almost zero).
So the exact value of R1 is not important while 82R is good to start with.
if you have a voltmeter, try to continuously turn on Q2 (R2 to +5V for example) and measure the voltage across R1. The LEDs current could be easily calculated as V/R which gives the real current that is flowing into the LEDs (since 1.3V for each LED is just an estimation).

Good Luck.
 

Thread Starter

jeffjohnvol

Joined Oct 15, 2008
37
I should have noted, I have a choice between regulated 5V, or 9V from my battery, so I don't think I would have enough potential to run them in series.

So (assuming 5 v) I would probably run them in parallel with about a 180 ohm resistor.

If I only used a TO92 2907 PNP with a 1K at the base and the collector to ground, any issues seen with that? Seems obvious, but I have made mistakes before on my assumptions.
 

Adjuster

Joined Dec 26, 2010
2,148
if you have 8 LEDs, each with 1.3V forward voltage with its own 180 ohm resistor running off 5V the total current would be about 170mA. Actually, It will be a bit less, but probably not below 150mA. That's a bit less than the 200mA absolute maximum for a 2N3904, so it should be OK, just about.

I don't get the bit about the collector to ground though. Are you thinking of putting the LEDs and resistors in the emitter, returned to +VE? If so, what voltage will be applied to the base resistor - just taken to ground to turn the transistor on? That will not work well, as the transistor will not saturate. The base current will be a milliamp or so, so that 1k base resistor will drop about a volt. Please confirm what circuit you are using: can you post a schematic?
 

Kerim

Joined Mar 3, 2011
35
If you like to use the +5V then let us join the two worlds "parallel and series" :)
One branch would consist of 3 LEDs, 1.3 * 3 = 3.9V
The limiting resistor in the branch is
(5-3.9)/20mA = 55R say 56 Ohms
I assume you don't mind to use 9 LEDs because we can make 3 similar branches in parallel with them.
Now the npn transistor should handle only about 60mA, not a problem
By the way, the emitter (shown by an arrow) will be connected to ground.
The base resistor can be kept as 1K (since you have it).
The third pin of the transistor, the collector, will be connected to the three LED branches with their limiting resistors which in turn are connected to +5V.

Good luck.
 

Adjuster

Joined Dec 26, 2010
2,148
@ jeffjohnvol: Why are you proposing to use a 2N2907 PNP, apparently in common collector?

Using a small NPN like 2N2222 (or many other fairly similar types) in common emitter, as proposed by the last poster would be more usual.
 

SgtWookie

Joined Jul 17, 2007
22,230
If you're thinking of using a 9v pp3 "transistor" battery, expect a very short life span.
You'll be spending lots of money on batteries. Better to use four rechargeable AA batteries. Each will output about 1.2v, for 4.8v total.
 

Thread Starter

jeffjohnvol

Joined Oct 15, 2008
37
@ jeffjohnvol: Why are you proposing to use a 2N2907 PNP, apparently in common collector?

Using a small NPN like 2N2222 (or many other fairly similar types) in common emitter, as proposed by the last poster would be more usual.
No real reason, My original circuit output went to ground and turned on the LED, I suppose I was going that route, but using the NPN would do just as well.

BTW, is the 2907 the best general purpose PNP, or is there another equivalent to the 2n2222 that is PNP? I don't know the transistor family that well.

Thanks for the suggestions all around.
 

SgtWookie

Joined Jul 17, 2007
22,230
The PN2907 is basically the same as the 2N2907, but in a plastic T0-92 case.

They are considered approximately complementary to the 2N2222/PN2222 transistors.

If you are in the USA, these parts are available at your nearest Radio Shack. They carry 15-piece assortments of NPN and PNP transistors in the TO-92 case. You usually get 5 of the 2N2222/PN2222 in the NPN assortment, and 5 2N2907/PN2907 in the PNP assortment.

You also get :
5 PN/2N3904, 5 PN/2N4401 in the NPN assortment
5 PN/2N3906, 5 PN/2N4403 in the PNP assortment.

The PN/2N3904 and 3906 are complementary, and good for up to about 100mA collector current.
The PN/2N4401 and 4403 are complementary, and good for perhaps 200mA collector current.
The PN/2N2222 and 2907 are good for up to around 500mA.

The collector currents are ALL based on Ib=Ic/10, or base current = desired collector current/10.
Your uC's output pins can only source or sink up to 20mA without incurring damage.
With Vdd=5v, the lowest value you should use for a base resistor is 220 Ohms.
 
Top