Infrared Signal Issue

Hi, so Im building a project based of Nano where I need to control monitor and a DVR via infrared. I am using two 5mm IR transmiter diodes in parallel (due to layered box cover) with 150ohm resistors on each cathode. Everything seems to work fine when I use PIN 13 to pulse the signal. But if I use any other pin only the monitor picks up the IR signal, not the DVR. Ive tried using a single diode with 150ohm and then swaped it to 1Kohm resistor to no joy. I want to use pin 13 for something else. Anyone has any ideas of what actually is happening here?

Here`s the code : https://dl.dropboxusercontent.com/u/88155050/WeirdStuff/DVR%20CONTROL.txt Thanks guys :) .

dainazinas: Hi, so Im building a project based of Nano where I need to control monitor and a DVR via infrared. I am using two 5mm IR transmiter diodes in parallel (due to layered box cover) with 150ohm resistors on each cathode. Everything seems to work fine when I use PIN 13 to pulse the signal. But if I use any other pin only the monitor picks up the IR signal, not the DVR. Ive tried using a single diode with 150ohm and then swaped it to 1Kohm resistor to no joy. I want to use pin 13 for something else. Anyone has any ideas of what actually is happening here?

Thanks guys :) .

Show us your code.

I`ve added the code

Remember that an Arduino pin can only source 40mA (ABSOLUTE MAXIMUM). What is the forward voltage of your IR LEDs? If it’s 1.2V like the Adafruit 5mm IR LED you are dropping 3.8V across the 150 ohm resistor. That would result in a current of 25.3 mA. Two of those is too much for an Arduino pin. If you are going to use two in parallel you should use resistors over 253 ohms to limit each to under 15 mA.

You can get more range by driving the LEDs at higher currents but you will need a driver transistor to do the current switching.

But how does that explain why it works on pin 13 and partially on the other pins?

johnwasser: Remember that an Arduino pin can only source 40mA (ABSOLUTE MAXIMUM). What is the forward voltage of your IR LEDs? If it's 1.2V like the Adafruit 5mm IR LED you are dropping 3.8V across the 150 ohm resistor. That would result in a current of 25.3 mA. Two of those is too much for an Arduino pin. If you are going to use two in parallel you should use resistors over 253 ohms to limit each to under 15 mA.

You can get more range by driving the LEDs at higher currents but you will need a driver transistor to do the current switching.

Well spotted John. I drive my IR LEDs with transistors and a 100 ohm resistor, so 150 ohms looked fine to me. I completely overlooked the fact that dainazinas might have had them connected directly to the pin. (My IR LEDs have a Vf of 1.5V @ 20mA, 1.8V @ 100mA.)

@dainazinas, after a quick glance at the code I can't see anything wrong, taking into account the fact that when you change pins the monitor still picks up the signal. Since you tried a single IR LED and still had the problem, I'm at a loss.

Thanks guys for the info. I don`t know the rated values for the IR leds as I hacked them out of old tv remotes. :)

Ended up using pin 13 with 150ohm resistor for DVR and pin with another 150ohm resistor 9 for the monitor. Seems to work fine at the moment. Do I need to worry about overloading the pins? I mean I use them only to turn the devices on and off every now and then.

Two (or even three) IR diodes can be connected in series. Twice the diode/transmitting power. Two IR diodes in series drop 2.4volt. A 100ohm resistor limits the pin current to ~5-2.4=2.6/(100+~25)= ~20mA. (25=internal pin resistance) Leo..

dainazinas: Thanks guys for the info. I don`t know the rated values for the IR leds as I hacked them out of old tv remotes. :)

The IR LED's approximate Vf is easy to detemine if you have a diode-test range on your multimeter. The multimeter will supply power to the LED and give you the voltage, usually in mV.

For a more accurate measurement, connect the LED to a constant 5V with the resistor in the range you intend to use, then measure the voltage across the LED. Once you have the Vf, you can adjust the resistor value to obtain the current that you need, and Bob's your uncle. :)