How to Make RGB LED Lights Display DIY Colors

use berg strip to connect rgb strip power to nodemcu

When it comes to purchasing and installing RGB LED strips, there are several options available. Some come with an IR or RF remote to change the color, brightness or pattern of the RGB light, while others (more expensive) have an Android or iOS app that lets you control the RGB light and display colors with your smartphone.

RGB strips controlled by RF or IR only display preconfigured colors and prevent you from creating custom colors or displaying DIY colors.

However, you can modify or upgrade an IR or RF remote control RGB strip you may already own and use an app on your smartphone to control and display DIY colors.

Steps to Create RGB LED Strip Display DIY Colors

To make an IR or RF controlled RGB LED strip display DIY colors and control it via a smartphone app, you can build a Wi-Fi RGB controller using an ESP8266 based MCU. In this project, we will disconnect the LED strip from its factory module, build an RGB controller using the ESP8266 to display the DIY colors, and control the brightness and color intensity.

Things you will need

To make your DIY LED light colors, you will need the following:

  • An ESP8266-based MCU, such as NodeMCU or D1 Mini
  • Inexpensive IR/RF Controlled RGB Strip
  • some sons
  • Berg strip (optional)
  • Three IRF540 or TIP120 transistors
  • Three 1K resistors
  • 12V power supply for LED strip (delivered with IR/RF RGB strip)


Once you have each of these, you can move on and start your project.

Step 1: Download and flash the firmware

Download the Tasmota sensors.bin firmware file to your Windows or Mac computer. Make sure you download the correct firmware for your ESP8266 to avoid later issues.

After downloading the firmware, download and install device drivers.

Once you have downloaded the drivers, follow these steps:

  1. Download the Tasmotizer tool and run it.
  2. Connect the ESP8266 to your PC using a USB cable.
  3. Select the COM port the ESP8266 is connected to.
  4. Click on Browse and select the Tasmota.bin sensor firmware file.
  5. Click on Tasmotize.

tasmota nodemcu d1mini flash sensor firmware

This will flash the firmware.

Step 2: Configure the ESP8266

On your smartphone, open the Wi-Fi settings, then connect to the tasmota-xxxx Wi-Fi network. It is an open network and therefore does not require a password.

Once logged in, open the web browser and visit the Wi-Fi network, enter the necessary password and click on Save.

After a while, you will see an IP address. Enter this IP address in the web browser of your smartphone or PC connected to the same network.

When you have completed the steps listed above, follow these steps:

  1. Click on Setup > Configure Module.
  2. To select Generic 0 in the drop-down menu and click Save.
  3. It will reconnect and recharge automatically.
  4. Click on Setup > Configure Module.
  5. Select PWM in pins D1, D2, D3 and choose 1, 2, 3 from the respective dropdowns for red, green and blue colors. Click on Save.

configure the tasmota panel

After restarting, you will see three sliders with a To fall over button to control lights, change colors and control intensity and brightness to display DIY colors.

Step 3: Connect the RGB strip to the ESP8266

Open the RF/IR controller module that came with the RGB strip before disconnecting or desoldering the four wires connected to it. You can refer to this guide to learn how to desolder.

After desoldering, refer to the diagram below to connect the RGB LED strip to the ESP8266 module and the three IRF540 or TIP120 transistors.

connect the nodemcu to the rgb strip using mosfets
  1. Connect NodeMCU or D1 Mini Pins D1, D2, and D3 to the gate (1st) legs of the three IRF540 or TIP120 transistors using 1K resistors.
  2. Connect the Source legs on the ground.
  3. Connect the drain feet to the red, green and blue connectors on the LED strip.

You can use the 12V power supply that comes with the RGB strip to power the strip and the MCU. You can convert 12V to 5V for NodeMCU or D1 Mini using a 7805 voltage regulator and two 10Uf 50V capacitors.

use 7805 convert 12v 5v for nodemcu d1mini

Be sure to connect the wires exactly as shown in the diagram. If you connect the power to the wrong wires, it may damage the RGB LED strip.

Use the unsoldered wires from the RGB strip module to connect the RGB strip to your NodeMCU or D1 Mini. You can also use jumper wires to make the connections or directly solder the wires to the MCU. If you’ve never soldered before, check out our guide to learning how to solder.

We used a female berg strip to make the connections to the NodeMCU.

use berg strip to connect rgb strip power to nodemcu

Once connected, you can control RGB color, intensity and brightness through the web browser app on Android or iOS devices.

Step 4: Use the app on Android or iOS devices to control the RGB light strip

You can use any web browser app to open the Tasmota panel and control the color, brightness, and RGB light intensity. You can also activate Hue Bridge emulation in Tasmota to control and use the Amazon Alexa app on your Android or iOS devices to control the RGB strip.

configure alexa app to control rgb strip color change

With Hue Bridge emulation, you can also control RGB lights and change color and brightness. You can do this via voice commands through Echo devices or the Alexa voice assistant. The steps are as follows.

  1. To open Tasmota web panel and navigate to Setup > Setup Other.
  2. Name your device, such as RGB, then select Hue Bridge below Emulation. Click on Save.
  3. On your Android or IOS device, download and install the Amazon-Alexa application.
  4. Log in with your Amazon account and go to Devices.
  5. Run a device scan. You can also ask Alexa on Echo devices to find the RGB light on your network. Just say: “Alexa, discover devices”.

Once the device is added, you can control the RGB light, brightness, and color change through the Alexa app and Echo devices using voice commands.

Control RGB lights over the Internet

You can use the MQTT protocol or the Alexa app (requires an Echo device on site) to control your upgraded RGB LED strip over the Internet. For this, you can use a public or private MQTT broker. You will also need an MQTT client app on your smartphone (a few are available on the Play Store).

Once configured, you can add buttons on the Android MQTT app to send JSON data to modify or display DIY colors. Plus, you can use Home Assistant and ESPHome to control tweaked RGB lights, display DIY colors, and add automation.


26 ways to use RGB LED strips to light up your life

Read more

About the Author

Comments are closed.