- WiFi Connected RGB LED Strip
- Hardware
- LED Strip
- Connectivity
- Power
- UPDATE (Oct 18, 2018)
- Summary
- Software
- Embedded
- MQTT Callback
- Wifi led light strips
- XIAOOHO USB 16.4ft LED Light Strips,Smart LED Strip Lights for Bedroom16 Million Colors, 150 Light Beads, 3 Control Ways(APP+Remote Control+Control Box)
- DAYBETTER LED Lights for TV 55-75Inch, Led Strip Lights 200ft (4 Rolls of 50ft) Smart Light Strips with App Control Remote
- PAUTIX RGB COB LED Strip Light,UL Listed 24V Color Changing Light Strip with 2520LEDs Multicolor Flexible Tape Light 9.84ft/3m,Wireless Smart Controller,10mm Connectors,24V 5A Power Supply
- WYZE Light Strip Pro, 32.8ft WiFi LED Strip Lights, Multi-Color Segment Control, 16 Million Colors RGB, Kitchen, TV, Party, Works with Alexa and Google & Plug, 2.4GHz WiFi Smart Plug, Two-Pack, White
- WYZE Bulb Color, 1100 Lumen WiFi RGB and Tunable White A19 Smart Bulb, Two-Pack & Light Strip Pro, 32.8ft WiFi LED Strip Lights, 16 Million Colors RGB with App Control and Sync to Music
- DAYBETTER 60ft Smart Led Lights Led Strip Lights 50ft Smart Light Strips with App Control Remote
- DAYBETTER 60ft Smart Led Lights,5050 RGB Led Strip Lights Kits 50ft Led Strip Lights
- DAYBETTER 60ft Smart Led Lights,5050 RGB Led Strip Lights Kits Led Strip Lights, 65.6ft RGB Led Light Strips Kits
- Olafus 32.8ft Smart RGB LED Strip Lights & 65.6ft RGB LED Strip Lights Kit
- Govee RGBIC LED Strip Lights, 65.6ft Smart LED Lights for Bedroom, Bluetooth LED Lights APP Control Bundle 32.8ft RGBIC LED Strip Lights, WiFi Color Changing LED Lights Segmented Control
- Sengled WiFi Smart Light Bulbs That Work with Alxa Daylight 2 Pack Bundle WiFi Smart LED Multicolor Light Strip, 3M (9.8ft), Works with Amazon Echo Devices
- Bundle of Broadlink Wi-Fi Smart Home Hub Universal Remote RM4 Pro and BroadLink LED Strip Lights
- DAYBETTER Led Strip Lights 100ft, RGB Led Lights App Controlled, 24 Keys Remote 5050 for Bedroom, Music Sync Color Changing Lights for Room Party
- DAYBETTER RGB Smart Led Strip Lights 50 ft and 100ft Lights for Bedroom
- DAYBETTER Smart Led Strip Lights 50ft and Music Sync 5050 RGB Color Changing Led Light Strips 2 Rolls of 50ft
- Tenmiro Rock Lights and 100ft LED Lights
- DAYBETTER Led Strip Lights 100ft Smart Light Strips with Bluetooth App Control Remote, 5050 RGB Led Lights for Bedroom, Music Sync Color Changing Lights for Room Home Decor Party Festival (1 Rolls)
- DAYBETTER Led Strip Lights 200ft(2 Rolls of 100ft) Smart Strips with Bluetooth App Control Remote, 5050 RGB Led Lights for Bedroom, Music Sync Color Changing Lights for Room Home Decor Party Festival
- DAYBETTER Smart Led Strip Lights 50 ft,2 Rolls of 25ft and 60ft, 2 Rolls of 30ft Lights for Bedroom
- DAYBETTER Smart WiFi App Control Led Strip Lights Work with Alexa Google Assistant -32.8 feet and USB Led Strip Lights for TV 65-75 inch with Remote Mood Lighting,Gaming Room Decor
- Govee RGBIC LED Strip Lights M1 with Matter, 6.56ft WiFi LED Lights Bundle RGBIC LED Strip Lights M1 with Matter, 3.28ft WiFi LED Lights Extension Without Plug
- Govee RGBIC LED Strip Lights, 65.6ft Smart LED Lights for Bedroom, Bluetooth LED Lights APP Control Bundle 100ft RGBIC LED Strip Lights, LED Lights Work with Alexa and Google Assistant
- TJOY Bluetooth Light Bulb 6 Packs + 50ft Bluetooth LED Strip Light, Smart Light Bulbs with App Control and SMD5050 Music Sync LED Lights Strip
- Govee LED Strip Lights & Light Bars with Camera Bundle RGBIC TV Light Bars, Smart Color Changing Light Bars Suitable for 45-70 inch TVs
- PAUTIX RGB COB LED Strip Light,UL Listed 24V Color Changing Light Strip with 2520LEDs Multicolor Flexible Tape Light 9.84ft/3m,for TV,Room,Bedroom,Party DIY Decoration,Controller,24V 2A Power Supply
- Govee Smart LED Light Bars Bundle with Smart Color Changing Light Bars Suitable for 45-70 inch TVs, 15 Inches WiFi TV Backlight with Double Light Beads
- DAYBETTER Smart Led Strip Lights 100ft and Music Sync 5050 RGB Color Changing Led Light Strips 2 Rolls of 50ft
- DAYBETTER Led Strip Lights 200ft(2 Rolls of 100ft) Smart Strips with Bluetooth App Control Remote, 5050 RGB Led Lights for Bedroom, Music Sync Color Changing Lights for Room Home Decor Party Festival
WiFi Connected RGB LED Strip
LED light strips can make a great accent to your desk, TV, kitchen or elsewhere in your home. Wouldn’t it be great to build one that can be controlled over WiFi? How about making cool animations that go with a holiday, sports team or time of day. Today, I’m giving my implementation of a WiFi Connected RGB LED Strip that you can use to add some lights and fun to your home.
Hardware
I’m going to go over some basics of LED strips and go over how I went about creating mine. There are plenty of tradeoffs when choosing an LED strip including LED density, power consumption, addressability and weather durability. I’m going to touch briefly on those and discuss the LED strip I’m using in this project.
LED Strip
First off, you need to decide if you want to be able to change the color of each LED on the strip individually (digital) or you are okay with the whole strip being the same color (analog). If you want to do “cool” animations or interesting designs usually a digital LED strip is the way to go. If you are just adding some accent coloring underneath your kitchen cabinet, an analog LED strip might be the right choice for you. For this article, I’ll be focusing on a digital LED strip but some of the same concepts will still apply. Digital LED strips are often called “addressable” because you can address each LED individually on the strip. Sometimes the LEDs are actually grouped together in groups of 3, so you address by the group.
Next, you’ll need to consider LED density. This just refers to how many leds are on your strip per meter. The denser the strip the better the color transitions will look, but that comes at a cost. Also, the more LEDs per meter requires more power!
Another thing to consider is the durability of the LEDs. The requirements will be different if you are placing them outside uncovered in the rain versus inside behind a TV. When researching LED strips the IP value will tell you the durability. The first digit of the IP value indicates the dust rating and the second digit indicates the water rating. For a full breakdown of what the values mean check out this resource.
The main LED strip I use is this 12V strip with 60 LEDs/meter and IP65 rating and the WS2811 controller. Definitely look around for deals though and determine what makes sense for your project.
Connectivity
There are several ways to connect your LED strip to your Home Automation system. Today, I’m going to be using a NodeMCU which will connect over WiFi to my MQTT broker. Home Assistant will also connect to the MQTT broker and will allow me to program automations for the lights as well as manually control them. Check out my article on Setting up an MQTT broker if you are not already using MQTT for any Home Automation.
Power
Once you pick out your LED strip, you need to figure out how to plan for power. These LEDs can definitely draw a decent amount of power and you’ll need to plan accordingly. Most LED strips I’ve seen run at 12V or 5V so pay attention when you are reviewing strips. The seller should also list how much current (in Amps) or Power (in Watts) is needed for the strip. Remember that Power = Current * Voltage. Looking at the listing for the strip I posted above the seller says the strip uses 72 Watts at 12 Volts. So we can determine we need a power supply that runs at 12V and can supply 6 Amps of current because 72W / 12V = 6A .
Of course, if you are planning on stringing together multiple LED strips together, you’ll need to provide more current for the additional strips. So if you’re planning on using 5 of these strips at once all connected together, you’ll need a 12V supply that can provide 30 A. In that scenario, it’s best to connect each strip to the power supply directly to reduce voltage drop. You’ll know that you’re experiencing voltage drop if the LEDs at the end of the strip aren’t as bright as the ones near the power supply.
You might have an old laptop charger like this that meets the specs. Or if you’re using multiple strips a beefier power supply like this one might be needed.
Finally, you’ll need to power your Microcontroller. You could plug the NodeMCU into the wall, but that’s kind of awkward. Why should you have to plug two things in? You can get a DC/DC converter to step down the 12V from the power supply to 5V for the NodeMCU. That way you only have to plug in one thing. Finally, because the LED strip is running at 12V and the NodeMCU is running with 3.3V GPIO Pins you need a logic level shifter to correctly shift the data lines to the voltage needed by the LED strip.
UPDATE (Oct 18, 2018)
After some experimentation and more research, I changed logic level converter used in the design. I now recommend the 74AHCT125 that Adafruit sells. This level converter works much faster and can keep up with the speed of data for the WS2811 LED strips. I found a great article here explaining the difference of several logic level converters. I’ve updated the schematic and parts list below.
Summary
So hopefully you’re not scared off from making your DIY WiFi Connected LED strip yet. While it there is a lot of different parts they all work together to make a really flexible system. Here’s a breakdown of all the parts listed in this section.
Item | Comments |
---|---|
LED Strip | The LED Strip! |
Power Supply (72W) | LED Power Supply — 72W |
LED Power Supply (360W) | LED Power Supply — 360W |
DC/DC Converter 12V to 5V | DC/DC Converter to power NodeMCU from LED Power Supply |
NodeMCU | The WiFi programmable microcontroller we can use to control the lights |
Logic Level Converter | Logic Level Converter to convert the 3.3V data signal coming out of the NodeMCU to 5V for the LED strip |
LED Connector Cable | Nice cables for connecting LED strips |
LED Channel Diffuser | Can be useful to diffuse LED lights |
Power Jacks | Power Jack to connect power supply to protoboard |
Protoboard | Protoboard for mounting electronics |
Plastic Boxes | Plastic box to mount electronics. Could also 3D print this. |
Reference the below schematic on how to wire up the strip to your microcontroller. The power coming from the power supply is routed through the DC/DC converter to power the NodeMCU as well as routed to the LED strip connector and the logic level converter. The NodeMCU sends its data signal through the logic level converter before reaching the LED connector. Feel free to leave me comments and/or questions in the comments!
Software
Now let’s get to the software! My implementation allows you to set a color to fill the strip with a single color, change the brightness or choose an effect. Using Home Assistant all those things can be done automatically as well so you can have the LEDs turn on at certain times of the day or any other activity. Want to set it to your team’s colors on game day? Or show a candy cane effect during Christmas? All that can be automated in Home Assistant. This code also supports Over the Air updates so you can upload a new version of the software without having to plug in the USB connection. Learn more about Over the Air updates in my article 4 Essential Tips for Improving Your DIY Home Automation Project.
Embedded
All of my software is available in my GitHub repository for this project. Rename the src/config_template.h to be src/config.h and edit the values for your system. My software uses the Arduino framework for the NodeMCU but I use PlatformIO for doing the build process and managing libraries. Check out the PlatformIO installation page to see how you can install it.
I’m not going to go through all the code in the project but wanted to point out a few high-level things on how it works.
To set the stage, every iteration of the loop() function is essentially a “frame” for an effect. The software uses the FastLED library and essentially there is a global array holding the color of each LED. The main loop logic updates this array once per iteration of the loop and then sends the data to the LED strip.
MQTT Callback
MQTT messages dictate the requested color of the LEDs on the strip. The main loop is responsible for processing those messages and setting up the LED array. Whenever new data comes on an MQTT topic the below MQTT callback function is called process the payload.
Wifi led light strips
XIAOOHO USB 16.4ft LED Light Strips,Smart LED Strip Lights for Bedroom16 Million Colors, 150 Light Beads, 3 Control Ways(APP+Remote Control+Control Box)
DAYBETTER LED Lights for TV 55-75Inch, Led Strip Lights 200ft (4 Rolls of 50ft) Smart Light Strips with App Control Remote
PAUTIX RGB COB LED Strip Light,UL Listed 24V Color Changing Light Strip with 2520LEDs Multicolor Flexible Tape Light 9.84ft/3m,Wireless Smart Controller,10mm Connectors,24V 5A Power Supply
WYZE Light Strip Pro, 32.8ft WiFi LED Strip Lights, Multi-Color Segment Control, 16 Million Colors RGB, Kitchen, TV, Party, Works with Alexa and Google & Plug, 2.4GHz WiFi Smart Plug, Two-Pack, White
WYZE Bulb Color, 1100 Lumen WiFi RGB and Tunable White A19 Smart Bulb, Two-Pack & Light Strip Pro, 32.8ft WiFi LED Strip Lights, 16 Million Colors RGB with App Control and Sync to Music
DAYBETTER 60ft Smart Led Lights Led Strip Lights 50ft Smart Light Strips with App Control Remote
DAYBETTER 60ft Smart Led Lights,5050 RGB Led Strip Lights Kits 50ft Led Strip Lights
DAYBETTER 60ft Smart Led Lights,5050 RGB Led Strip Lights Kits Led Strip Lights, 65.6ft RGB Led Light Strips Kits
Olafus 32.8ft Smart RGB LED Strip Lights & 65.6ft RGB LED Strip Lights Kit
Govee RGBIC LED Strip Lights, 65.6ft Smart LED Lights for Bedroom, Bluetooth LED Lights APP Control Bundle 32.8ft RGBIC LED Strip Lights, WiFi Color Changing LED Lights Segmented Control
Sengled WiFi Smart Light Bulbs That Work with Alxa Daylight 2 Pack Bundle WiFi Smart LED Multicolor Light Strip, 3M (9.8ft), Works with Amazon Echo Devices
Bundle of Broadlink Wi-Fi Smart Home Hub Universal Remote RM4 Pro and BroadLink LED Strip Lights
DAYBETTER Led Strip Lights 100ft, RGB Led Lights App Controlled, 24 Keys Remote 5050 for Bedroom, Music Sync Color Changing Lights for Room Party
DAYBETTER RGB Smart Led Strip Lights 50 ft and 100ft Lights for Bedroom
DAYBETTER Smart Led Strip Lights 50ft and Music Sync 5050 RGB Color Changing Led Light Strips 2 Rolls of 50ft
Tenmiro Rock Lights and 100ft LED Lights
DAYBETTER Led Strip Lights 100ft Smart Light Strips with Bluetooth App Control Remote, 5050 RGB Led Lights for Bedroom, Music Sync Color Changing Lights for Room Home Decor Party Festival (1 Rolls)
DAYBETTER Led Strip Lights 200ft(2 Rolls of 100ft) Smart Strips with Bluetooth App Control Remote, 5050 RGB Led Lights for Bedroom, Music Sync Color Changing Lights for Room Home Decor Party Festival
DAYBETTER Smart Led Strip Lights 50 ft,2 Rolls of 25ft and 60ft, 2 Rolls of 30ft Lights for Bedroom
DAYBETTER Smart WiFi App Control Led Strip Lights Work with Alexa Google Assistant -32.8 feet and USB Led Strip Lights for TV 65-75 inch with Remote Mood Lighting,Gaming Room Decor
Govee RGBIC LED Strip Lights M1 with Matter, 6.56ft WiFi LED Lights Bundle RGBIC LED Strip Lights M1 with Matter, 3.28ft WiFi LED Lights Extension Without Plug
Govee RGBIC LED Strip Lights, 65.6ft Smart LED Lights for Bedroom, Bluetooth LED Lights APP Control Bundle 100ft RGBIC LED Strip Lights, LED Lights Work with Alexa and Google Assistant
TJOY Bluetooth Light Bulb 6 Packs + 50ft Bluetooth LED Strip Light, Smart Light Bulbs with App Control and SMD5050 Music Sync LED Lights Strip
Govee LED Strip Lights & Light Bars with Camera Bundle RGBIC TV Light Bars, Smart Color Changing Light Bars Suitable for 45-70 inch TVs
PAUTIX RGB COB LED Strip Light,UL Listed 24V Color Changing Light Strip with 2520LEDs Multicolor Flexible Tape Light 9.84ft/3m,for TV,Room,Bedroom,Party DIY Decoration,Controller,24V 2A Power Supply
Govee Smart LED Light Bars Bundle with Smart Color Changing Light Bars Suitable for 45-70 inch TVs, 15 Inches WiFi TV Backlight with Double Light Beads
DAYBETTER Smart Led Strip Lights 100ft and Music Sync 5050 RGB Color Changing Led Light Strips 2 Rolls of 50ft
DAYBETTER Led Strip Lights 200ft(2 Rolls of 100ft) Smart Strips with Bluetooth App Control Remote, 5050 RGB Led Lights for Bedroom, Music Sync Color Changing Lights for Room Home Decor Party Festival
After viewing product detail pages, look here to find an easy way to navigate back to pages you are interested in.