I recently bought an IR LED to control my TV with Arduino. Here is the thing: I tried to send an IR code with the IRremote library but it doesn't work and when I look to the LED through my camera I can't see any light ! I can only turn it on with a simple code for classic LEDs (which means I can't send a specific code) and even when it works the light is so powerless that I must be 2 cm from the receiver...
Maybe you need a 940nm IR led.
You may have damaged the led or it is faulty from the seller.
If you cannot detect any IR, you may not be connecting it properly.
Thanks for responding. I can't detect any IR when I use the IRremote library. But when I make digitalWrite(ir_led, HIGH) there is some infrared but they are very powerless as I said...
At 250 ohms, that gives about 14mA through through the LED.
This should be OK but, IMO, I would finalize the operating current to 40mA in the end device. Use a transistor driver.
250 is not a standard value though.
What are the color bands on it, or better still measure the resistance with an DVM.
When you say it's working one way and not the other, keep in mind the two test are not really related for comparison.
When using it in the remote application you are sending data out and it has to be 100% compatible with the receiver.
As it is not working in remote control, either the IR wavelength is not the same between the TX and RX or the data format/timing between TX and RX is not the same. This would imply software problem.
For now I am not trying to make a remote control, I'm just seeing if I can send and receive IR code. I can receive (the infrared were sent with my remote control and I saw the ir code successfully) but I cannot send datas. That's why I am stuck...
I have these one and they're working perfectly. I was just wondering what was the difference between them and those with two pins. My problem is only for emitting IR...
Don't be afraid to put more current thru your LED. I haven't done any measurements but commercial TV remote controls emit with hundreds of mA. Since it's a pulsed current, you can go higher than with DC.
With a typical LED rated at 30 or 40 mA DC max, you should be able to double that value when using a carrier with a 1/3 duty cycle (most common carrier for TV remote control). That'll give you more range. 14 mA is really low.
Grumpy_Mike:
It's stated in his link that it does... Without any real datasheet, it's still worth it to try with a reasonably higher current. No LED will blow if your peak pulsed current with a low duty cycle and not too low frequency is a little higher than the DC max current.
Grumpy_Mike:
Then what is your evidence for this?
No evidence, just a comparison of the intensity of the light emitted. It is indeed maybe unwise to give figures like that, my bad, but I'd be really surprised if it was as low as 20 mA... I'm talking about the peak value here, not the average, of course.
Grumpy_Mike:
Your making it up.
I've used some IR LEDs for TV remote control emissions. For example, one was 100 mA DC max and 400 mA with the characteristics of a typical remote control protocol.
It's still worth a try.