# IR LED doesn't work from a distance?

I recently picked up an IR kit from Sparkfun:

Using the tutorials I was able to successfully control a device from the Arduino at close range. When the LED is more than 10 feet away however, it is no longer able to control the device. Is this common? Is there a work around? Is it a cheap IR LED, and maybe a more expensive one would work better?

I attempted to search for similar issues, but was flooded by sensing distance with IR and was unable to find anything related to this particular issue.

Thanks!

Those ir leds can take more current than an Arduino output can supply. With a transistor and a lower value series resistor, you may get more range.

With an unaided Arduino output and a 330R series resistor, the current will only be around 10mA. Those ir leds can take 50mA. I suggest a pnp transistor like bc327, with a 1K base resistor and perhaps a 180R series resistor.

Paul

Cool, thanks, I'll give that a try!

Follow up question, how do I calculate the current? I'm familiar with V = IR, but LED's don't have resistance, so is it simply 5 = I330?

PaulRB:
With an unaided Arduino output and a 330R series resistor, the current will only be around 10mA.

The IR LED has a voltage drop of about 1.7 V, so the voltage across the resistor will be about 3.3 V, which for a 330 Ohm resistor calculates to 10 mA.

Of course, the Arduino output also has about 30 Ohms (IIRC) effective resistance.

Paul__B:
The IR LED has a voltage drop of about 1.7 V, so the voltage across the resistor will be about 3.3 V, which for a 330 Ohm resistor calculates to 10 mA.

Ahhh, that's the trick, thanks!!!

Hooked up the hardware as suggested to no avail. Also added a second IR LED with no noticeable improvement. Is there anything else I can try?

Is there anything else I can try?

Have you measured the current through the IR led? You may have to set up a simple sketch that sends the same code continuously over and over. Even then, a multimeter will only measure the average current. Ideally you need to measure the peak current with a 'scope.

Hooked up the hardware as suggested to no avail. Also added a second IR LED with no noticeable improvement. Is there anything else I can try?

How did you effect all that? What exactly did you do?
[You can sketch out a schematic (I use a dry-erase board), take a picture of that and attach it to your post or you can wrangle out something in Paint and attach that. Verbal recounts are lame dubious.]

PaulRB:
Have you measured the current through the IR led?

I haven't. I do have a friend with the scope, I'll see if I can get it measured. I would guess the assumption is that the LED still isn't operating at peak amperage?

I believe I have attached a drawing to this post. For full disclosure, there are other connections I did not draw in that run an LCD screen and a couple of digital thermal sensors.

Edit: Whoops, mislabeled that transistor, it's actually an NPN.

Any other ideas?

That symbol you have drawn is an npn, not a pnp. If you have used a pnp that is not the correct way to wire it. If you have used npn, that should be ok. The current should peak at 50mA.

Any other ideas?

The circuit looks right, if it's NPN.
• I've found that placing a clear glass jelly jar in front of a sensor can improve range (an odd lens it is.)
• Try more LEDs (IREDs), to make an emitter with more area, presenting a bigger signal face.