Como construir uma faixa de LED RGB operada remotamente por infravermelho usando Arduino

How to Build an Infrared Remotely Operated RGB LED Strip Using Arduino

In the previous article in this series, we learned how to generate different colors on an RGB LED strip using Arduino. We cover the basics of how an RGB LED strip works, the types available, and how it can generate multiple colors.

In this article, we will add to this knowledge base. You may already be familiar with some of the LED strips available on the market, including those with a small remote control. This IR remote control operates the strip and is used to turn it on or off, change colors and increase or decrease brightness, etc.

The idea of ​​this project is similar. Let's build an infrared remotely operated RGB LED strip using Arduino. What's cool (and convenient) is that you can use any IR remote to operate it – including an STB or TV remote, or any other IR remote.

So let's start. First, we will review the circuit diagram and how it works, followed by the program.

Circuit Diagram

This circuit is built using just four components:

  • The TSPO1738 is an IR receiver (sensor) that receives remote signals (from any IR remote control). It has these interface pins: Vcc, GND and output. The Vcc pin receives 5V from the Arduino board. The grounding pin must be connected to common ground. And the output pin must be connected to the D2 and D3 pins of Arduino.
  • The ULN2003A is a current driver chip with integrated Darlington pairs (7) that are used to supply current to the LED strip. It receives the same 12V power supplied to the RGB strip and the Arduino. The Arduino's analog outputs D9, D10 and D11 are connected to three inputs on the chip. Their corresponding outputs are connected to the track's R, G and B inputs.
  • The Arduino board, ULN2003A chip and strip receive 12V power from an adapter (12V @ 2A).

Circuit operation

  • It is important to first read and decode the codes on the IR remote you plan to use. To do this, simply connect the TSOP1738 to the Arduino board, as shown.
  • Then download the library called “IRremote” from GitHub. Copy the library to the root directory (folder) or to the Arduino (C:\arduino-1.6.7\libraries). Then you can easily access the library from Arduino IDE software like: sketch menu -> include library -> IRRemote
  • Load the program provided here into the Arduino.
  • Allow the Arduino to connect to your laptop/PC via a USB cable.
  • Run the program and start the serial monitor in the Arduino IDE.
  • Now, press whichever button on the remote you want to use. You will see some code appear (like… 4 – 5 – 6 – 8 – 10 digits). Note these codes for their respective buttons. They will also be used to control the strip.
  • These codes will also be used in the main program to perform various operations such as changing color or brightness, etc.

The infrared remotely operated RGB LED strip.

Next, let’s review how the complete circuit works…

  • The IR sensor, TSOP1738, receives the code from the remote control and passes this message to the Arduino.
  • The Arduino first decodes this message and compares it to the programmed code.
  • If a match is found, the Arduino will provide the PWM outputs on D9, D10 and D11 to generate different colors on the LED strip. For example, when any number key is pressed on the remote control (1, 2, 3, etc.), the Arduino will generate RED, GREEN, BLUE, etc.—the pre-programmed colors.
  • If the '0' key is pressed on the remote control, the Arduino will generate a continuous multicolored effect. To stop this effect, you will need to restart the Arduino microcontroller.

Software program
Program 1: To decode the IR remote codes

Program 2: main program

(tagsToTranslate)Arduino

Related Content

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.