Skip to main content
Wi-Fi LED Fairy Light Controller with ESP8266
  1. Blog/

Wi-Fi LED Fairy Light Controller with ESP8266

Albert David
Author
Albert David
Electronics, IoT, and Embedded Systems

A DIY Wi-Fi-controlled 5 V switcher for USB LED fairy lights, built around an ESP-12F module running Tasmota firmware. Powered by a battery bank, it lets you toggle garden lights remotely from your phone — no 230 V wiring outdoors and no freezing walks to the power outlet.

LED fairy lights in the garden
LED fairy lights switched on at night

The lights
#

“USB Fairy Lights” or “USB String Lights” — 10 m / 100 LEDs, available from China for under ~$3. They are 5 V USB-powered and weather-proof (except the USB connector).

USB LED string light product photo
Close-up of the LED string circuit
The 100-LED circuit with 5.1 Ohm series resistor — consumes ~1.8 W at 5 V.
Close-up of a single LED
Close-up of a single LED — brightness difference between first and last LED is barely noticeable from a distance.

The ESP-12F 5 V switcher
#

An ESP-12F module with a MOSFET switches the USB 5 V supply to the LED string. Running Tasmota firmware, it connects to your Wi-Fi network and can be controlled from a phone or any MQTT/HTTP client.

ESP-12F switcher board — front
ESP-12F switcher board — rear
Complete setup — battery bank, ESP switcher, and LED string
Complete setup — battery bank, ESP-12F switcher, and LED fairy lights.
Tip

With Tasmota’s default configuration (no deep sleep), the battery bank needs recharging every few days. A larger battery and ESP8266 deep sleep could extend runtime to weeks.

Assembly
#

Note

Before starting, ensure the ESP-12F module is pre-programmed with Tasmota (or any OTA-capable firmware). See ESP-12F programming guide for first-time flashing.

Items needed:

Parts laid out for the build

Step 1:

Assembly step 1

Step 2:

Assembly step 2

Step 3:

Assembly step 3

Step 4:

Assembly step 4

Step 5:

Assembly step 5

Step 6:

Assembly step 6

Step 7:

Assembly step 7

Step 8:

Assembly step 8

Step 9:

Assembly step 9

Final assembly:

Completed switcher assembly
Switcher connected to battery bank and LED string
Completed setup — ESP-12F switcher between battery bank and LED fairy lights.

Related