> ## Content Index
> Fetch the complete content index at: https://broddin.be/llms.txt
> Use this file to discover other available public pages before exploring further.

# How I turned our stairwell into a nightclub
- URL: https://broddin.be/how-i-turned-the-stairwell-into-a-nightclub/
- Published: 2021-01-05T12:00:00.000Z
- Updated: 2026-07-19T19:05:23.000Z
- Author: Tim Broddin
- Tags: arduino, esp8266, wled, #english, #wordpress, #Import 2024-02-03 13:15, #broddin, #Migrated-1784487752640, #wp, #wp-post, #Import 2026-07-19 19:02

Recently we transformed our attic into a bedroom for our eldest daughter. There was no door before, so we had had a closet made with a sliding door in it. As a result, the attic is divided into a bedroom on one side and a dark staircase on the other.

That dark stairwell begged for lights. After some playing around, this is the result.

![](https://broddinblog.on-forge.com/storage/490/f1ec4baf-28ee-49af-b46f-22b093efdfaa.jpg)

## TL;DR;

Order this:

- [ESP8266-board](https://www.aliexpress.com/item/4001278785276.html?spm=a2g0o.productlist.0.0.2fc2129e62VkAC&algo%5Fpvid=9e8575c2-7bd7-4427-8b00-22bda93b0c8a&algo%5Fexpid=9e8575c2-7bd7-4427-8b00-22bda93b0c8a-1&btsid=0b0a050116097480144134899ed1a5&ws%5Fab%5Ftest=searchweb0%5F0,searchweb201602%5F,searchweb201603%5F&ref=broddin.be)
- [Power supply](https://www.tinytronics.nl/shop/nl/voedingen/5v/mean-well-voeding-5v-10a-switching-power-supply-lrs-50-5?ref=broddin.be)
- [Power Cord](https://www.tinytronics.nl/shop/nl/kabels/230v-voeding/standaard-230v-voedingskabel-1.8m-haakse-stekker?ref=broddin.be)
- [Jumper cables](https://www.kiwi-electronics.nl/componenten-onderdelen/prototyping/jumperwires-kabeltjes/Premium-Jumperwires-40-stuks-op-strip-20cm-male-female?ref=broddin.be)
- [2 LED strips (5m IP30 60 leds/m)](https://nl.aliexpress.com/item/4000148759042.html?ref=broddin.be)
- Micro-USB cable

If you follow my fantastic schematic below and flash WLED to your ESP8266, you’re done.

## Introduction

Two years ago, I began to immerse myself in the beautiful world of Arduino. For the novice: an **Arduino** is a small development board with a **microcontroller**, with which you can program circuits.

Arduino’s are somewhat limited in terms of computing power, and if you want to connect to the Internet, you’ll have to put in a lot of effort.

## ESP

Luckily other development boards are very good at that. Those boards contain the **ESP8266** microchip. That chip can be programmed in the same way as an Arduino but has **built-in WiFi** and the necessary libraries to enable IoT applications. His big brother, the ESP32, is also equipped with Bluetooth (and is twice as fast).

The ESP family also has **a great price**. ESP8266 and ESP32 plates can be found on Aliexpress for less than 5 euros, which’s way less than the 30 euros you pay for a real Arduino UNO.

Such an ESP board is ideal for connecting some sensors to, for example, to monitor the temperature of a room in real-time, but they are also suitable for controlling LEDs from a distance.

## Lights

On Aliexpress, you can find LEDs of all shapes and sizes for almost no money. The easiest to control are 5V LEDs with **WS2812B** pixels (chip+LED). These are individually addressable (so each light can get a different color) and controlled with a high refresh rate.

I have already ordered these lights myself:

- [Christmas tree lights, 50 pieces for €5,44](https://nl.aliexpress.com/item/32963242773.html?ref=broddin.be).
- [Flexible panels, around €10 for 256 LEDs](https://nl.aliexpress.com/item/1005001274718003.html?ref=broddin.be).
- [LED strips of 5 meters with 300 LEDs for €11,39](https://nl.aliexpress.com/item/4000148759042.html?ref=broddin.be)

In this post, I’m going to focus on the **LED strips**. I ordered 2 of them for the staircase, 1 for each side, so that’s 600 LEDs in total.

![Just a stock photo](https://broddinblog.on-forge.com/storage/491/9-image.png)

Just a stock photo

## Power supply

The easiest way to power an ESP8266 is via the micro USB port found on most boards. This has the disadvantage that you have relatively little amperage to control your LEDs. Knowing that each LED requires 60 milliamperes (20 milliamperes per color: red-green-blue at maximum brightness), you will be able to provide some 15 to 30 LEDs with full brightness **without an external power supply** (depending on the current of your USB adapter). The amount of LEDs you can drive is always higher in practice because you will not be showing bright white light a lot.

If you want to control 600 LEDs, you can’t get around an **external power supply**. The math 600 \* 0.06A comes to a power supply of **36A**. But to test, I used [a power supply of 10A](https://www.tinytronics.nl/shop/nl/voedingen/5v/mean-well-voeding-5v-10a-switching-power-supply-lrs-50-5?ref=broddin.be), and it works perfectly. Because playing with 220 volts involves a little more risk, I also ordered locally and not on Aliexpress.

![A 10A power supply](https://broddinblog.on-forge.com/storage/492/10-image-1.png)

A 10A power supply

## Connecting

Connecting the LED strip itself is painless. The WS2812B strips have three wires: **red** (current), **black** (ground), and **green** (data). I have placed a diagram of my connection below:

![](https://broddinblog.on-forge.com/storage/493/untitled-artwork-3.jpg)

As you can see (or not – because it’s really a lousy scheme), I connect the power supply to the board (via the VIN and GND pins) and different locations on the LED strips. 5V LEDs lose some voltage along the way, and by supplying them with power in different places, you **prevent the start of your ribbon from being brighter than the end**. I also connect the black wire of the strip to a GND pin of the ESP8266\. Otherwise, the data line would not work.

Attentive readers will now say: the ESP8266 works on 3.3V, and your power supply and strip are 5V. How does that work?

- For the board, it’s not a problem. The boards I use (and I suspect almost all ESP8266’s) convert power via USB and VIN internally to 3.3V.
- **In theory**, you should convert the data signal on pin D4 via a level shifter, but I have never had to do this in practice. If you get funky things like flashing LEDs or pieces of the strip that do nothing, I recommend adding a level shifter in between.

![The power supply (top) and ESP8266 (bottom)](https://broddinblog.on-forge.com/storage/494/8c67726d-cbea-44bf-bf1a-2b603ec26428.jpg)

The power supply (top) and ESP8266 (bottom)

## Software

1. Write a sketch yourself in the **Arduino IDE**, using an existing library such as [FastLED](http://fastled.io/?ref=broddin.be). This gives a lot of flexibility, but you have to do everything yourself.
2. Put [ESPHome](https://esphome.io/?ref=broddin.be) on your board. This is a firmware that focuses on **smart home applications** and makes it easy to make all kinds of **sensors**, **buttons**, and LEDs accessible via, for example, [Home Assistant](https://www.home-assistant.io/?ref=broddin.be). I use ESPHome to pass the temperature in my server cabinet and the humidity in the basement to HomeAssistant. For each application you want to create, you write a simple configuration file ([example](https://gist.github.com/TimBroddin/230bb7674a7171ced76286797d4f1a4c?ref=broddin.be)). You say which data pin each sensor is connected to, and after you flash it, you will see the necessary entities HomeAssistant.
3. Put [WLED](https://github.com/Aircoookie/WLED?ref=broddin.be) on your board. WLED is a bit like ESPHome, but just for LEDs. Where ESPHome comes with a dozen (reasonably basic) **effects**, there are more than a hundred in WLED. You’ll also get beautiful c**olor palettes**, the ability to create different **segments** (each with a different effect or mirrored), and lots of crazy extras like a custom app, user-friendly website, Philips Hue sync, and Home Assistant integration.

The most user-friendly and comprehensive way is WLED. To put this on your ESP8266 using a Mac:

- Open a Terminal
- `pip3 install esptool.py`
- [Download the latest version](https://github.com/Aircoookie/WLED/releases?ref=broddin.be) of WLED (WLED\_0.11.1\_ESP8266.bin at time of writing)
- Go to the right folder
- `esptool.py write_flash 0x0 ./WLED_0.11.1_ESP8266.bin`
- You should be able to connect to the WiFi network *WLED-AP* with password *wled1234*.
- If you browse to [http://wled.me](http://wled.me/?ref=broddin.be), you should get to the setup page where you need to set up your WiFi, among other things.

Once connected to your WiFi, you can set up your LEDs via the **app** ([iOS](https://apps.apple.com/us/app/wled/id1475695033?ref=broddin.be) and [Android](https://play.google.com/store/apps/details?id=com.aircoookie.WLED&ref=broddin.be)) or in the browser ([http://wled.local](http://wled.local/?ref=broddin.be)). For example, you’ll have to indicate **how many LEDs** you want to control and how many amperes your power supply delivers, so WLED won’t overload. You can also divide your LEDs into multiple **segments**.

You can find additional explanations [here](https://github.com/Aircoookie/WLED/wiki?ref=broddin.be) and [here](https://github.com/Aircoookie/WLED/wiki/Install-WLED-binary?ref=broddin.be) if it doesn’t work out.

![Not the prettiest app, but it works!](https://broddinblog.on-forge.com/storage/495/img-3934-1.png)

Not the prettiest app, but it works!

After installing, you can start playing with the many **effects**, **palettes**, and other fun stuff. If you have Home Assistant installed, the integration will also appear automatically.

WLED effectjes

## Conclusion

The total cost of this project was **less than 50 euros**. That’s 10 meters of LEDs for [much less](https://www.beaumotica.nl/philips-hue-lightstrip-plus-wit-en-gekleurd-licht-2m-basis-8718699703424?channable=0208b4736b750038373138363939373033343234f1&gclid=Cj0KCQiAlsv%5FBRDtARIsAHMGVSbSWjeD83MqyI-%5FK2-Tf7o9hRc92iBYF7Wz3fBkTLk164oAmx8B8IEaAtBzEALw%5FwcB&ref=broddin.be) than Philips sells you for only 2 meters (which can not even display different colors).

Looking for a new hobby for 2021? Then I can only recommend playing with **microcontrollers** and home automation. By the way, I still have a few posts in the pipeline about ESPHome and HomeAssistant. So stay tuned.

Any questions or comments? Leave them below!

\---

- The **double-sided tape** that hangs on the LED strips is not of excellent quality. I expect I’ll have to replace it with something more decent.
- Jumper wires tend to **loosen**. In time, I’m going to solder everything up.
- The power supply dares to make a [squeaking sound](https://www.diyaudio.com/forums/power-supplies/321472-meanwell-epp-200-27-whining-hissing-2.html?ref=broddin.be) at low loads. That’s normal.
- Are the **colors wrong**? Is red displayed as green and green as red? In the settings of WLED, you can choose the order. The order of the LED strip I use is GRB (green-red-blue).
- I plan to equip this project with a motion sensor and a switch. WLED is easy to **customize**, and there are already many [usermods](https://github.com/Aircoookie/WLED/tree/master/usermods?ref=broddin.be).
- There is also [a fork](https://github.com/atuline/WLED/wiki?ref=broddin.be) of WLED that responds to sound, interesting for cool visualizations.