Sample content. This page shows how a tutorial reads. Replace the text with your own, then delete sample: true from the front matter.

ESP Web Server for Addressable Lights · Part 1 of 6

Power and Wire 200 Addressable LEDs

Size the power supply, add power injection, and wire the data line so 200 pixel lights run reliably from a Wi-Fi microcontroller.

Sheet
ELE-001
Level
Beginner
Build time
60 min
Est. cost
$40 to $90
Revised
Oct 27, 2026

Video goes here

Add youtube: VIDEO_ID to this page's front matter. The video loads when a reader presses play.

What you will do

  • Work out how much current 200 pixels can draw and pick a 5 V supply
  • Inject power along the strand so the far end stays the right color
  • Wire the data line with a level shifter, a resistor, and a capacitor

Bill of materials

ItemPartQtyNotes
1ESP8266 or ESP32 development board1Any board with a free GPIO pin and a USB port
2200 addressable pixels, 5 V WS2812B type200Strips, strings, or loose pixels all work. Check the voltage on the label.
35 V DC power supply, 10 A or larger1Sized in step 1. Use an enclosed supply.
474AHCT125 level shifter1Turns the board's 3.3 V data into a clean 5 V signal
5Resistor, 330 to 470 ohm1Goes in series with the data wire
6Electrolytic capacitor, 1000 uF, 10 V or higher1Across the power input at the first pixel
7Stranded wire, 16 to 18 AWG, red and black1For power. About 3 m total.
8Inline fuse holder and fuse1Rated for your supply's output
9Screw terminal block or lever connectors3For the power injection points

Tools Wire strippers Screwdriver Multimeter Soldering iron

A single string of 200 pixels looks simple, but it can pull more current than any USB port or development board can give. This part gets the power and data wiring right, so the sketches in the next parts behave the same way every time.

Step 1: Work out the power budget#

Each pixel has three tiny LEDs. At full white, with all three on, one pixel can draw about 60 mA. Multiply that by the number of pixels to get the worst case.

Pixels Worst case at full white Supply to buy
50 3 A 5 V, 5 A
100 6 A 5 V, 8 A
200 12 A 5 V, 10 to 15 A

Real animations almost never light every pixel at full white. The sketch in the next part caps the brightness, which lets a 10 A supply run 200 pixels comfortably. If you want headroom to go brighter later, buy the larger supply now.

  • Count your pixels and write the number down
  • Multiply by 0.06 to get the worst-case amps
  • Pick a supply rated at or above your planned brightness

Step 2: Fuse and connect the supply#

Put the fuse in the red wire, as close to the supply as you can. The fuse protects the wire. If something shorts, the fuse opens before the wire gets hot.

  1. Cut a length of red and a length of black wire for the supply side.
  2. Fit the fuse holder in the red wire.
  3. Connect red to the supply's +V terminal and black to -V (also marked COM).
  4. Leave the supply unplugged.
  • Fuse installed in the red wire
  • Red on +V, black on -V, screws tight
  • Supply still unplugged

Step 3: Inject power along the strand#

Power drops as it travels down a long string of pixels. The far end gets less voltage, and the colors there turn orange or dim. The fix is to feed power in at several points, not only at the start.

For 200 pixels, feed power at the start, about a third of the way in, about two thirds of the way in, and at the far end. Each feed runs back to the supply on its own pair of wires.

  1. Run a red and black pair from the supply to the first pixel.
  2. Run another pair to pixel 67 or so, and another to pixel 134.
  3. Run one more pair to the last pixel.
  4. Join all the red wires at the supply with a terminal block, and all the black wires the same way.
  • Four red and black pairs run from the supply
  • Reds joined together, blacks joined together
  • Capacitor fitted across red and black at the first pixel, stripe on the black side

Step 4: Wire the data line#

The pixels listen for a 5 V signal, but the board puts out 3.3 V. Many pixels work with that, and many fail in odd ways. A level shifter makes it reliable.

  1. Power the 74AHCT125 from the same 5 V as the pixels.
  2. Connect the board's data pin to one input on the level shifter.
  3. Connect that gate's output through the 330 to 470 ohm resistor to the first pixel's data input.
  4. Tie the level shifter's output-enable pin to ground so the gate stays on, and tie the unused inputs to ground.

Now join the grounds. The supply ground, the pixel ground, the level shifter ground, and the board's ground must all connect together. Without a shared ground the data signal has no reference, and the pixels flicker or show random colors.

Step 5: Check it before you program it#

Use the multimeter before the first power-up.

  1. With everything unplugged, measure resistance between red and black at the first pixel. It should not read as a short.
  2. Plug in the supply and measure voltage at the first pixel and at the last pixel. Both should read close to 5 V.
  3. Unplug the supply again before changing anything.
  • No short between red and black
  • About 5 V at the first pixel
  • About 5 V at the last pixel

Troubleshooting#

The last pixels look orange or dim. Voltage is dropping along the strand. Add another power injection point near the dim section.

The first pixel flickers or shows random colors. Check the shared ground first. Then check that the resistor is in the data line and the level shifter has power.

The supply clicks on and off, or the lights reset. The supply is too small for the brightness you are asking for. Lower the brightness in code or use a larger supply.

Nothing lights. Check the data direction. Pixels have an input end and an output end, usually marked with an arrow. Data must enter at the input end.

What is next#

With power and data wired, the next part loads a first test sketch and lights the whole string with a moving rainbow. See Part 2: Hello, pixels.

Got stuck, or got a different result?

Leave a comment on the video with what you see. Include your board, your power supply, and what you see happening.

Open the video comments