In this project I will show you how to build a controller for led rgb ws2812b using Wemos D1 Mini and WLED application.
This project was found when I tried to search for an easy to use "led rgb controller". So, this WLED is an application name and also a group of developer who develop this controller so everybody can control led rgb easily.
Ws2812b is one of the type of led that can be controlled by this WLED app. Previously I have built easy to install ws2812b with Arduino Uno. But in the next I want to control the led rgb so I can change the light effect according to my wish easily whether through wifi or through internet. Thanks to the WLED team
Wemos D1 Mini is a development board based ESP8266. Wemos is a microcontroller same as Arduino but it has already wifi on chip module in it. So, I would say the Wemos is more than enough for this project.
Below is my documentation but in Bahasa Indonesia, hope you will understand :)
Ultimate Photon Engineering: The WLED Architecture
The WS2812B Wi-Fi Control via WLED project enables intuitive and dynamic control of addressable LED strips. WLED is a powerful, open-source firmware that transforms an ESP8266 microcontroller into a feature-rich LED controller, accessible via Wi-Fi.
WLED Hardware Architecture
The core hardware setup is elegantly simple, requiring just a few key components:
- ESP8266 Wemos D1 Mini or NodeMCU: This serves as the brain of the operation, running the WLED firmware and handling network communication.
- WS2812B NeoPixel Strips: These are the addressable LEDs that will be controlled. Each LED contains an integrated driver chip, allowing individual pixel control via a single data line.
- A 5V Dedicated Power Supply (Not a phone charger!): A robust power supply is critical. WS2812B strips can draw significant current, especially at full white brightness. An underpowered supply (like a typical USB phone charger) will lead to voltage drop, erratic behavior, and brownouts.
Implementing 5A Power Supplies
Power management is the most critical aspect of a reliable LED project. A correctly specified power supply ensures stable operation and protects your components.
- Calculate Your Needs: Determine the maximum current draw. A common rule of thumb is 60mA per LED (20mA each for Red, Green, and Blue) at full white brightness. For a strip of 30 LEDs, that's 30 * 0.06 = 1.8A. Always add a 20-30% safety margin, so a 5V, 3A supply would be appropriate for this example.
- Use a Dedicated Supply: As mentioned, a standard USB charger is insufficient. Use a regulated 5V DC power supply (like those used for CCTV or LED projects) with adequate amperage.
- Power Injection: For longer strips (over 1-2 meters), you must inject power at both ends or multiple points along the strip to prevent voltage drop, which manifests as LEDs becoming dimmer and shifting color towards red the farther they are from the power source.
Demystifying Flashing Binaries (esptool)
Installing the WLED firmware involves flashing a binary file to the ESP8266's memory. This process, often done with a tool called esptool, is straightforward:
- Prepare the Binary: Download the latest WLED binary (.bin file) from the official WLED GitHub releases page.
- Connect the Board: Connect your Wemos D1 Mini to your computer via a USB cable. Ensure the correct USB drivers are installed so your system recognizes the board as a serial (COM) port.
- Flash the Firmware: You can use the WLED web installer, the standalone
esptoolcommand-line utility, or a GUI tool like NodeMCU PyFlasher. The process involves putting the ESP8266 into flash mode (usually by holding a button while plugging it in or toggling GPIO0 to GND), selecting the correct serial port and binary file, and initiating the write process. Upon successful completion, the board will reboot and create a Wi-Fi access point named "WLED-AP".
Once flashed, you can connect to the "WLED-AP" network, open a browser to 4.3.2.1, configure the device to connect to your home Wi-Fi, and begin creating stunning light effects.