🛠 Tutorial · ESP32 & LEDs

How to Set Up WLED on an ESP32 With an Addressable LED Strip

From bare strip to Home-Automatable lighting in one evening. Exact wiring, honest power math, and the five mistakes that permanently damage boards.

⏱ In 60 Seconds

  • You need: an ESP32 dev board, a WS2812B-style addressable strip, a 330Ω resistor, a 5V power supply, and a common ground.
  • Wire it as: strip 5V → supply +, strip GND → supply − and → ESP32 GND, strip DIN → 330Ω → ESP32 GPIO16.
  • Never power the strip from the ESP32. A 60-LED strip draws ~1.44A at full white; the board's regulator gives you ~0.5A.
  • Flash it: WLED is prebuilt — use the web flasher, select your board and port, done. No Arduino IDE required.
  • Then: set the LED count and GPIO, save, and add it to Home Assistant in about two minutes.

Bottom line: this is a $20 build that works the first time if you get the power and the ground right — and those are the only two things that matter.

What Is WLED and Why Not Just Use the ESP32 Arduino IDE?

WLED is a free, open-source firmware that turns an ESP32 into a Wi-Fi-controlled addressable LED controller. You install it once, then control hundreds of effects, colors, and presets from your phone or Home Assistant — with no recompiling, ever.

The Arduino route means writing and maintaining your own effect code, handling reconnection logic, and building a UI yourself. WLED ships all of that, plus a REST API and Home Assistant discovery. For a first build it is the correct choice by a wide margin.

WLED runs on ESP32 and ESP8266 boards. This guide uses an ESP32 because it has more GPIO, runs the Wi-Fi stack far more reliably, and leaves the USB port free for power.

What Parts Do You Need for a WLED Strip Build?

PartWhyTypical cost
ESP32 dev board (30-pin recommended)Runs the firmware, gives you Wi-Fi and the control pin$4–8
WS2812B / SK681B addressable stripThe LEDs themselves. SK681B handles white better; WS2812B is cheaper$5–20 per 5m
330Ω resistor (1/4W)<$0.10
5V power supply, sized to the stripFeeds the LEDs. See the power section — this is where builds fail$8–15
470–1000µF electrolytic capacitorBuffers the inrush current spike at power-on<$0.20
Breadboard + jumper wiresPrototyping before you solder$3

Which strip type do you have?

WLED supports both, but they wire differently. Addressable (WS2812B, SK681B, WS2811) has just 5V, GND, and DIN — one data line controls every LED individually. Analog (plain 12V RGB/RGBW) has one wire per color and cannot do per-LED effects. Everything below assumes addressable.

How Do You Wire an Addressable LED Strip to an ESP32?

This is the whole circuit. The only part people get wrong is the ground.

5V supply +5V ────────────────► strip 5V 5V supply GND ──┬───────────────► strip GND │ └───────────────► ESP32 GND ← shared ground strip DIN ──[330Ω]──► ESP32 GPIO16 (data) strip DOUT ──────────► next strip's DIN (chaining) 1000µF cap ── across supply +5V and GND, at the strip

The rule that prevents 90% of failures

ESP32 GND and supply GND must be connected. They are a common reference. Without that link the data line has no meaningful voltage reference, the first LEDs flicker or lock up, and on a longer run you can permanently damage the ESP32's data pin. This applies to any LED strip, any controller, any length.

How Large a Power Supply Does Your LED Strip Need?

Do not guess. Strips draw far more than the price tag suggests, because full white is the worst case — not the colour you will actually run.

LEDsMax current (full white)Minimum 5V supply
30~0.72A1A (5W)
60~1.44A2A (10W)
120~2.88A4A (20W)
300 (5m)~7.2A10A (50W)

The figure is LEDs × 60mA. Divide that by 0.8 to leave headroom for the inrush spike at power-on, and never run a supply above roughly 80% of its rating.

Do not power a strip from the ESP32

The 3.3V pin and the USB supply cap out around 500mA total. A 60-LED strip needs 1.44A. Connecting them directly will brown out the board, corrupt the flash, or destroy the regulator. The strip gets its own supply; the ESP32 only sends data.

How Do You Flash WLED Onto an ESP32?

  1. Install the USB driver and connect the board

    Plug the ESP32 into your computer with a USB data cable (not a charge-only cable — this is the single most common reason flashing appears to fail). If using an ESP32-C3 or S3, you may need the extra driver bundled with WLED's flasher.

  2. Open the WLED web flasher

    Go to https://install.wled.me from a Chrome or Edge browser. WebSerial-based flashing is not supported in Firefox or Safari, so use Chromium.

  3. Pick the device

    Choose ESP32 as the device. If the port does not appear, hit Rescan and check Device Manager for a COM port. Some boards need the BOOT button held while plugging in.

  4. Choose the build and flash

    Use the Standard build — it has everything you need. Click Install, wait about 90 seconds, and the board reboots into WLED.

Prefer a local install?

If you would rather not use a browser, the WLEDPlatformIO build in PlatformIO gives the same result. For a one-off setup the web flasher is faster; for a board you will rebuild often, PlatformIO makes version pinning painless.

How Do You Configure the Strip in WLED?

  1. Open the WLED control interface

    WLED starts a Wi-Fi access point named WLED-AP with the default password wled1234. Join it from your phone or laptop, then open 4.3.2.1 in your browser — or just visit wled.me.

    Change that AP password during setup: wled1234 is identical on every WLED device in the world. On first boot the first 30 LEDs light bright orange — that is the success indicator, not a fault.

  2. Set your Wi-Fi and the LED count

    Go to Config → WiFi Setup, scan for your 2.4GHz network, and enter the password (it is case-sensitive). Then set an mDNS hostname such as wled-livingroom — that becomes the address you use from now on, and unlike the access-point address it keeps working once you are back on your own network. Critically, set LED count to the exact number of LEDs on your strip: too high and unused pixels show as glitchy colours at the end, too low and the pattern cuts off.

  3. Set the GPIO pin

    Under LED & Rack, set the data pin to 16 (or whatever you wired). WLED's own guidance is to use GPIO16, or any of GPIOs 4, 13 and 16–33; other pins are not recommended. Board pin naming varies by manufacturer, so check the pinout for the exact board you bought rather than trusting silkscreen labels.

  4. Set the strip type and colour order

    Choose WS2812B (or SK681B) and the colour order — usually GRB for WS2812B strips. If your colours look swapped (red showing as green), change the order here. It is a one-setting fix and by far the most common "my LEDs are the wrong colour" cause.

  5. Save and apply

    Click Save & Apply. The strip lights up and you now have a live color picker.

How Do You Add WLED to Home Assistant?

WLED broadcasts an MQTT discovery announcement on your network, which means Home Assistant usually finds it by itself.

  1. Confirm ESPHome integration is loaded

    Settings → Devices & Services → Add Integration → search ESPHome. The light should appear on its own within seconds of WLED starting.

  2. If it does not appear, add it manually

    Add Integration → ESPHome → enter the host's IP address. WLED's API is enabled by default on port 80.

  3. Expose a few useful entities

    WLED publishes a full set: brightness, colour temperature (on SK681B), effect selection, palettes, and a nightlight timer. The nightlight entity is the one people use most — it fades lights out over a set duration.

# Optional: control from the terminal (no app) curl -s "http://<esp32-ip>/json/state" \ -H 'Content-Type: application/json' \ -d '{"on":true,"seg":[{"fx":20,"col":[[255,0,0]]}]}' # Effects are listed via: curl -s "http://<esp32-ip>/json/effects" | head -c 400

The REST API also makes WLED scriptable, which is how you drive it from Home Assistant, Node-RED, or a shell script — no MQTT broker required.

Which Five Mistakes Damage ESP32 Boards and LED Strips?

  1. No common ground

    Already covered, and still the number one cause of damage. Symptom is flicker, random colours, or a dead data pin after the first power cycle.

  2. Powering the strip from the board

    Brownout, corrupted flash, dead regulator. Give the strip its own supply sized from the table above.

  3. Skipping the data resistor

    The 330Ω is not optional on runs longer than about 30cm. Reflections on the line cause the first pixels to latch garbage, and repeated stress eventually kills the ESP32 pin.

  4. Reversing the data direction

    DOUT is the output. Feeding data into DOUT does nothing at all — the strip simply never lights. If nothing happens, swap the two data pins before debugging anything else.

  5. Wiring power to a GPIO pin

    ESP32 GPIOs are 3.3V logic and tolerate very little current. Feeding 5V into a data or GPIO pin destroys it instantly, with no fuse.

Can You Run an LED Strip From an Arduino Sketch Instead of WLED?

WLED is not mandatory. If you need custom logic — a sensor-driven pattern, or exact frame timing — drive the strip from the ESP32 directly with the FastLED or Adafruit NeoPixel library. The wiring is identical; only the firmware differs.

#include <FastLED.h> #define LED_PIN 16 #define NUM_LEDS 60 CRGB leds[NUM_LEDS]; void setup() { FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS); FastLED.setBrightness(128); // 0–255, stay well under full to limit current FastLED.clear(); FastLED.show(); }

Use FastLED.setBrightness() rather than scaling colours in software — the library limits current at the driver, which the sketch above relies on. If you drive it with the Arduino core, the ESP32's DAC-style PWM handling is fine, but keep the brightness limit.

How Do You Drive More Than One Strip From One ESP32?

An ESP32 WLED instance supports multiple outputs, so one board can drive several zones. Each strip still needs its own data line and its own power budget.

What Do People Ask About WLED and ESP32 LED Strips?

Do I need to solder to set up WLED on an ESP32?

For the first test, no — a breadboard is fine. For a permanent install, solder the strip's input end, the resistor, and the capacitor directly. A strip that hangs loose will eventually fail at a connection.

Why are my LED colours wrong, showing green where red should be?

WS2812B strips are GRB-ordered. Set Colour order to GRB in WLED's LED configuration. This is not a fault and does not indicate a damaged strip.

How large a power supply do I need for my LED strip?

Multiply your LED count by 60mA for full white, then divide by 0.8 for headroom. 30 LEDs need at least a 1A supply, 60 need 2A, 120 need 4A, and a full 300-LED 5m run needs 10A.

Can I power an addressable LED strip from the ESP32?

A 5V 1A charger is fine for roughly 30 LEDs. Beyond that the supply voltage sags and colours go wrong. Use a properly sized supply and add the capacitor.

Does WLED work without Home Assistant?

Yes. It runs a standalone web interface with every effect and preset. Home Assistant is optional and entirely additive.

How do I update WLED later?

WLED updates itself over Wi-Fi. Set an OTA passphrase (the default is wledota), untick OTA locked in settings and reboot, then go to Security settings, Manual OTA update and upload the latest release binary. Re-lock it afterwards. It is worth doing — the project ships real fixes, especially to the strip libraries.

Can several WLED controllers sync?

Not natively, but both WLED and the Home Assistant wled integration expose a broadcast UDP sync, and community add-ons exist. For most installs a single controller with multiple zones is simpler and more reliable.


📬 Newsletter

One Bench-Tested Hardware Side Hustle. Every Tuesday.

Real teardowns, real profit math, real businesses. No fluff. No spam.

Join 847 makers. Unsubscribe anytime.

📅 Last updated: September 2026