Driving IR Emitters @ 80mA

Hi. As you might have probably guessed from the topic subject, I have a problem with IR LEDs.
I am a beginner in the world of electronics, I also own my first Arduino Uno I bought to play around with electronics :slight_smile:
(got it in the Arduino Starter Kit 1)

The goal of my project is quite easy, send IR codes to my Air Conditioner / TV set.

  1. I have used my IR receiver ( + de-modulator 38 kHz, which is quite standard), to obtain codes for my AC by pointing my remote at it and recording codes ( turns out my AC uses UNKNOWN codeset and the TV uses NEC). In case of the UNKNOWN codeset, I recorded raw codes and used sendRAW function to send them to the AC.

I am just posting about it here so other people with the same issue might find it helpful :slight_smile:

  1. I have used IRremote library to create this logic, both for receiving and sending codes
  2. I managed to test it on my TV set, and it worked (yeey :D) but I had to place Arduino like 5 cm in front of the receiver for it to work. :slight_smile: This is where things started going south.

My first conclusion here was that the LED did not have enough power (and by pointing my phone's camera at it, it became clear that's the case, the light was too dim, especially compared to the light coming from my remote which was as twice as bright - if not more).

I have read online that most LEDs require around 20 mA. What stumped me is that the LED I have can tolerate up to 100mA for maximum brightness (at least it says so in the documentation under "forward current").

I know that for optimal performance, it might be best to keep my LED at 80% of the power, which should be 80 mA.
So, how the hell do I supply 80 mA to it and still control it from my digital out pins? Transistors?

My Arduino uses 5V VCC on its digital pins (verified with voltmeter).. I also managed to record exactly 80 mA with amp-meter (i guess it can only use this for short periods of time, so I gave up not wanting to fry my Arduino).

As you might have noticed, this conflicting information makes a beginner like me very confused.
So, I can measure 80mA but 40 mA is recommended maximum. LEDs require 20mA for optimal performance but turns out my uses much more..?

LED specs are:

Forward Voltage:  Max 1.8 V    ( Typ: 1.5 V )
Reverse voltage: 5 V
Forward Current: 100 mA

This tutorial showed me that the amount of voltage generated must be equal to the amount used.

My question to you is: is my approach correct here and can somebody help me out with the resistors I need to use to properly handle this voltage drop? I only have resistors from the starter kit ( 220 ohm, 550 ohm, 4.7 K, 5 M, 10 M, 15 M )

My first idea was:

5 V  - 1.8 V = 3.2 V   // use a resistor with the LED which will drop 3.2 V before GND
3.2 V / 0.080 A = 40 ohm   // that resistor must be 40 ohm

But, if Arduino cannot handle 80 mA, this is useless. :smiley:
Also, might be hard to create a 40 ohm combined resistor with what I have.

Let me know where I am wrong.
Thank you for any help! :slight_smile:

Five 220 ohm resistors in parallel gives you 44 ohms.
Don't attempt to use an arduino pin for 80mA. Use it to switch a transistor which in turn drives your LED.

I used this circuit for my a/c. I was able to reach about 10' which is all I needed.

Power most come from separate feed to this circuit.

Hope it helps.......

Thanks for the help! Fortunately, I was able to make both my TV set and AC working.
I'll leave more info about it here, in case anyone else needs help.

This solved the issues:

  1. I have disconnected my IR LED emitter from the I/O pin in use, and connected its anode to the emitter of a BJT transistor I found in the Arduino starter kit. (labeled BC547); I have connected the I/O pin I used previously to the base of the transistor, and hooked its collector to 5V DC. For more info about the pins, google BC547 datasheet and you'll find it.

This 5V can provide much more current than 40 mA and will not fry the board.

  1. I have also used six 220 ohm resistors connected in parallel, connected them to the cathode of the IR LED emitter, which gives a combined resistance of roughly 37 ohms, and since the forward voltage of the LED is 1.8 V MAX, i was able to calculate the current in the circut
5V - 1.8V = 3.2V
3.2 V / 37 ohm = 86 mA

That is a bit higher than the 80% optimal but good enough since the LED won't be used often and for long periods of time, it doesn't exceed the 100 mA max. Also, the transistor used has the 100mA limit so it is under that limit too.

  1. Regarding AC codes, i learned that when you record RAW codes for the AC, you need to increase the RAWBUF variable in IRremote.h or IRremoteInt.h (depending on the version) to at least 300 to be sure. That helped me record real codes, not half of them like before.

Hope this helped!