Electronic – arduino – Is it safe to directly connect an infrared led to an Arduino

arduinoinfraredled

I have a KY-005 infrared transmitter connected to my Arduino Uno. But currently I can't get it to work. On this website it says that you must connect the led directly to a digital pin on the Arduino, which I have not done (I connected it in series with a 220 ohm resistor. Because i don’t Thrust the led can handle it)

Is it correct that you can/must connect it directly?

Update: i hooked up the led directly to the arduino pin 3 (not +5V) and that did. it now works

Best Answer

According to your link "The KY-005 Infrared Transmitter Module consists of just a 5mm IR LED.". This is confirmed in this YouTube video (image below is from the video).

enter image description here

Infrared is not visible to the human eye, but you can check to see if it is emitting light using the camera in a cell phone or laptop computer.

Connecting it directly to the Arduino I/O pin produces the most light, but relies on the internal resistance of the port to limit current. This is safe provided no other pins are driving heavy loads (ATmega328 absolute maximum current for all MCU pins combined is 200mA). It should still work with a resistor, but with shorter range. With 220Ω it should draw about 15mA, which is around half the current it draws with a direct connection.

Note: do not connect the 'signal' input directly to +5V, as it will burn out the LED!