# IR Led

Hello.

I'm trying to control a LEGO buldozer with the legopowerfunction library. I connected an IR led to the PIN 13 and it works.
The only issue is the range of the LED, which is not so long.

How can I increase the power of the IR LED? I can try to put some LEDs in parallel, but I don't know if this is the right approach.
Could you point me in the right direction?

Thanks,

IREDs can do with more current than LEDs can.
What's your present situation? IRED and no resistor?

Parallelling multiple IR leds can help, if you are driving it with a pin, you might be limited to number of LEDs you can add because of current limit.

Another way is to use a small transistor or MOSFET to drive a higher powered one. I did a project that used a FQD13N06 MOSFET driving a high power (1W) IR led controlled from an Arduino pin.

To Runaway Pancake:

I have this one with a 100 ohm resistor.

To mjkzz:

Looking around I saw that the MOSFET could be a solution, but I had not a clue how to implement it and hook it to an Arduino. Could you post detail of your project?

Thansk to both!!

If you use a transistor to drive the LED then you can parallel up several LEDs remember though each one needs it's own resistor.

ceci0:
To Runaway Pancake:

That LED can run at 100mA so it can be an awful lot brighter than driving it with an arduino pin. You'll need a transistor though.

Google for "transistor as switch". Don't forget that you still need a resistor...

A MOSFET isn't necessary.
A good ol' NPN will do the job.

Refer to the circuit on the right, "Common emitter":

Use the Arduino "V in" pin for the 9V.
With a 2N2222, PN2222, or 2N3904 (most any NPN)
Use your 100? resistor with the IRED, you'll be doing around 80mA.
For the 3.3k? resistor shown, anything from 470? to 4.7k? will do - it's not a critical value.

That IR LED has quite a narrow half-angle (about 20 degrees), so it should give quite a good range provided that you point it more or less directly at the IR receiver. But you are only running it at around 30mA. To run it at higher current, use a transistor as a switch (as has already been suggested), using a resistor in series with the LED of not less than 35 ohms.

To Runaway Pancake:

Thanks, just a couple of clarifications:

• I guess the INPUT label on the "common emitter circuit" goes to Arduino digital PIN. Correct?
• you said to use the "V in" pin for the 9 volts. I can't find it. You mean 5v?

Thanks

Thanks to all for the suggestions

ceci0:

• I guess the INPUT label on the "common emitter circuit" goes to Arduino digital PIN. Correct?

That's right.

ceci0:

• you said to use the "V in" pin for the 9 volts. I can't find it. You mean 5v?

Of course, this implies that you're running off a battery, or other, through the "coax" connector (not USB power.)

Great, thanks for the circuit and for 100mA, it should be adequate.

I was driving a 1W IR led and it draws about 300mA, so I went MOSFET route

mjkzz:
I was driving a 1W IR led and it draws about 300mA, so I went MOSFET route

What's that for, cooking hot dogs with? (-:

Hahaha, no, it was for coffee warmer.

Seriously, I did a IR controlled LED bulb project -- turning on/off 5W led bulb via IR. The IR module used was not very sensitive so I got carried away and build a 1W IR device to send IR signals. In the end, I replace the IR module inside the bulb and I can use my button-battery operated IR remote to turn on and off the bulb 15 meters away. So component selections is really important.

But it was fun project, I think I could turn my neighbors' TV off across the street

mjkzz:
I was driving a 1W IR led and it draws about 300mA, so I went MOSFET route

The thing is that if you are driving a 1W LED then you should be looking at using a constant current driver rather than using just a resistor to limit the current.

Grumpy_Mike:

mjkzz:
I was driving a 1W IR led and it draws about 300mA, so I went MOSFET route

The thing is that if you are driving a 1W LED then you should be looking at using a constant current driver rather than using just a resistor to limit the current.

In this application, ie, sending IR signals out, cc driver might not be suitable. Some constant current driver/circuit is not pulse friendly as they are designed for continuous supply of power to load, pulsing it could mean trouble -- starting it up and shut it down in milliseconds/microseconds, particularly if it is inductive type of regulator. The output could be unstable, resulting inaccurate IR pulse -- when IR led is supposedly off, but cc driver is not shutting it off in time.

Ripples in current due to regulation (bad cc driver has rather large ripples) could also mean trouble for IR receiver module, particularly if you use a high gain, high sensitivity receiving module.

IR signals are not being sent constantly, only on demand, also IR pulses are short in time duration, so a simple MOSFET and resistor is good enough to provide clean IR signals. Heat is not an issue, here either.

So you are saying if you have a crap constant current circuit you will get crap results. Doh!
That is no reasion to abandon the concept.

Grumpy_Mike:
So you are saying if you have a crap constant current circuit you will get crap results. Doh!
That is no reasion to abandon the concept.

What I am saying is that the ripple and ability to handle pulsing requirements on a constant current driver is too high, even a decent CC driver might not be suitable when a high quality, high gain IR receiver module is used.

Most CC driver/circuits are designed for continuous supply to load and it has little concern about ripple because human eyes could not tell (but high quality IR receiver module does)

A simple MOSFET and resistor provides much better solution than using CC driver in this application.

So it has nothing to do with crap components, it has everything to do with suitability/selection of components/circuit in my application.

mjkzz:
A simple MOSFET and resistor provides much better solution than using CC driver in this application.

No, a mosfet, transistor and a couple of resistors configured as a linear constant current regulator provides a better solution (although if you are running the IR LED from a regulated supply, then a mosfet and series resistor is adequate). But you are correct in that the usual switching regulators are not designed to be modulated at 38kHz.

dc42:

mjkzz:
A simple MOSFET and resistor provides much better solution than using CC driver in this application.

No, a mosfet, transistor and a couple of resistors configured as a linear constant current regulator provides a better solution (although if you are running the IR LED from a regulated supply, then a mosfet and series resistor is adequate). But you are correct in that the usual switching regulators are not designed to be modulated at 38kHz.

Yes, agree with linear cc approach and I was thinking of using LM317, but in the end took the simplest approach -- MOSFET + current limit resistor.

I was able to set up the circuit with a 2N3904 transistor. I'm using external power. The circuit works, I can see the LED flashing with a digital camera, but the flash is very weak, less than using it directly on Arduino PIN.

I'm guessing: the library I'm using (legopowerfunctions) uses a very fast pulsing to send commands. Something in the circuit must be revised for this reason?

Thanks,