ESP8266 / ESP32 Pixel Controller

WiFi Pixel Controller for WS2812 LED strips and fairy lights based on WLED firmware

Looking for an easy way to control WS2812 / SK6812 „NeoPixel“ LED strips and light chains, I came across the free firmware WLED. It comes with numerous features like light effects, color palettes, segments and presets. You can control the lights via a web interface. In addition, an integration into various home automation systems is possible. Whether for decorative, party or Christmas lighting; the application possibilities are almost unlimited. After a short test on the breadboard, a suitable circuit board was needed. I decided to build one myself.

Picture: Construction of the ESP8266 Pixel Controller

The ESP8266 pixel controller is based on a Wemos D1 module. Operation with 5V or 12V LED strips is possible. The input voltage must match the voltage of the strip. The output is either a 5V TTL or RS485 signal. The latter can be converted back into a TTL signal in case of long cables, because it is insensitive to interferences, or it can be used as DMX-Artnet interface (event technology) with appropriate configuration of the WLED firmware. In addition, a micro SD slot is available. It cannot be used by WLED at the moment, but it might be interesting for own implementations. The external connections are made by a 6-pin pluggable terminal block. It has screw connections and can also be pulled out of the module completely for quick replacement without disconnecting all cables again.

Picture: Schematic

Circuit description

Power supply and LED strips are connected to connector K1. To be able to use both 5V and 12V LED strips, the appropriate input and corresponding output voltage must be selected with jumper JP1. In case of 12V LEDs the DC-DC converter IC1 generates the necessary 5V for the rest of the circuit. A protection against short-time overvoltage is realized with the TVS diodes D1 and D2. The self resetting fuse F2 protects the diodes against overload. In case of a short circuit, the pot fuse F1 responds.

TThe heart of the circuit consists of IC2, the ESP8266 module (Wemos D1 mini) or ESP32 module (Wemos C3 mini). The output of the data signal for the LEDs is done via D4 (GPIO2) on the ESP8266 or 8 (GPIO8) on the ESP32, an additional line for the clock signal is led out via D2 (GPIO4) on the ESP8266 or 6 (GPIO6) on the ESP32 from v1.1 on. The clock signal is only required for certain LED variants (APA102, SK9822, etc.). As memory extension for own implementations there is a micro SD card holder K2 on the bottom side of the board. This uses the same pinout as the official Wemos SD Shield.

The jumper JP2 selects between output as TTL or DMX (RS485). Two 74LV1T125 (IC3, IC4) are used as buffer and level converter for the TTL data signals for direct operation of the strips. The converters to 5V logic voltage are necessary because the 3.3V of the GPIO output pin does not guarantee an error-free transmission in all cases. For longer data lines the output can also be a noise insensitive RS485 differential signal. The RS485 signal is generated by IC5. Since this type of transmission requires two lines, in this case only the data signal is transmitted. A bus termination can be activated with JP3. The TVS array D3 protects the data outputs against overvoltage.

Picture: Prototype assembly of the circuit board
Picture: Circuit board with oscilloscope

A suitable module housing was drawn using OpenSCAD. The STL file can be printed directly with a 3D printer. If no micro SD slot is desired, the necessary cutout and cover can be deactivated in the source code. The housing cover is fixed with two screws.

Picture: Finished enclosure
Screenshot: Enclosure in OpenSCAD

For outdoor use I chose an IP65 housing type RP1285C. It contains the pixel controller together with a Meanwell switching power supply. The cables are lead through with PG glands. As a protection against condensation, it is recommended to put a package of desiccant (silica gel) inside or to install a climate plug in the housing. The connection to the LED installation is made via Neutrik NC4 HD connectors. These are also waterproof when plugged in.

Picture: Pixel controller in outdoor enclosure


The firmware is installed via the USB interface on the Wemos D1 mini. Instructions can be found in the WLED documentation under „Install WLED Binary“. Afterwards the connection via WLAN to the access point „WLED-AP“ is possible with the password „wled1234“. The user interface can first be reached with a browser at From there, the integration into the home network can be carried out. After the configuration is completed, the controller can be reached via its internal IP address in the entire LAN. A detailed description can be found in the „Getting Started“ section of the WLED documentation.

Picture: Screenshot of the WLED webinterface

The screenshot shows the various color palettes and light effects.