using berg strip to connect rgb strip power to nodemcu

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

The RF or IR-controlled RGB strips display pre-configured colors only and limits you from creating any custom color or displaying DIY colors.

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

Steps to Make RGB LED Strip Display DIY Colors

To make an IR or RF-controlled RGB LED strip display DIY colors and control it through 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 ESP8266 to display DIY colors, and control brightness and color intensity.

Things You Will Need

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

  • An ESP8266-based MCU, such as NodeMCU or D1 Mini
  • Cheap IR/RF controlled RGB Strip
  • Some Wires
  • Berg Strip (optional)
  • Three IRF540 or TIP120 transistors
  • Three 1K resistors
  • 12V power supply for LED strip (comes with the IR/RF RGB strip)

Once you've got each of these items, you can move on and begin your project.

Step 1: Download and Flash the Firmware

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

After downloading the firmware, download and install the device drivers.

Once you've downloaded the drivers, complete the following 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 where the ESP8266 is connected.
  4. Click Browse and select the Tasmota Sensor.bin firmware file.
  5. Click Tasmotize.
flash tasmota sensor firmware nodemcu d1mini

This will flash the firmware.

Step 2: Configure the ESP8266

On your smartphone, open Wi-Fi settings and then connect to the tasmota-xxxx Wi-Fi network. It’s an open network and thus, doesn’t require any password.

Once connected, open the web browser and visit 192.168.4.1, select the Wi-Fi network, enter the necessary password, and click Save.

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

When you've completed the steps listed above, follow these steps:

  1. Click Configuration > Configure Module.
  2. Select Generic 0 from the drop-down and click Save.
  3. It will reconnect and reload automatically.
  4. Click Configuration > Configure Module.
  5. Select PWM in D1, D2, D3 pin and choose 1, 2, 3 from the respective drop-downs for Red, Green, and Blue colors. Click Save.
configure tasmota panel

After the restart, you will see three slider controls with a Toggle button to control the lights, change colors, and control intensity and brightness to display DIY colors.

Step 3: Connect RGB Strip to 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 below diagram to connect the RGB LED strip to the ESP8266 module and the three IRF540 or TIP120 transistors.

connect the nodemcu to 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 to the ground.
  3. Connect the Drain legs to the Red, Green, and Blue connectors on the LED strip.

You can use the 12V power supply that came with the RGB strip to supply power to the strip and the MCU. You can convert the 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

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

Use the desoldered wires from the RGB strip module to connect the RGB strip to your NodeMCU or D1 Mini. You may also use jumper wires for making the connections or directly solder the wires to the MCU. If you have never soldered before, refer to our guide to learn how to solder.

We used a berg female strip for making connections to the NodeMCU.

using berg strip to connect rgb strip power to nodemcu

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

Step 4: Use App on Android or iOS Devices to Control RGB Light Strip

You can use any web browser app to open the Tasmota panel and control the RGB light color, brightness, and intensity. You may also enable 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 change color rgb strip

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

  1. Open Tasmota web panel and go to Configuration > Configure Other.
  2. Name your device, such as RGB, and then select Hue Bridge under Emulation. Click Save.
  3. On your Android or IOS device, download and install the Amazon Alexa app.
  4. Sign in with your Amazon account and go to Devices.
  5. Run a device scan. You may also ask Alexa on Echo devices to find the RGB light on your network. Simply say: "Alexa, discover devices".

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

Control RGB Lights Over the Internet

You can use the MQTT protocol or Alexa app (requires an Echo device at the location) 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 set up, you can add buttons on the MQTT Android app to send JSON data to change or display DIY colors. Further, you can use Home Assistant and ESPHome to control the modified RGB lights, display DIY colors and add automation.