Skip to the content
2 layers35.5 × 41.9 mmStair lights, the printed circuit board in 3D

DIY staircase lighting with capacitive touch detection and Home Assistant integration. Touch the handrail → lights fade in. Walk away → lights fade out. All settings tunable live via HA sliders.

Size
35.5 × 41.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
7
Pads
53
Tracks, vias
34, 1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
10 May 2026
Updated
20 May 2026

Overview

Stair lights is an open-source printed circuit board by dreed47, from the dreed47/stair-lights repository on GitHub. It is a 2-layer board of 35.5 × 41.9 mm with 9 parts on 7 nets, routed with 34 tracks and 1 via.

It is built around the IRLZ44N. Its parts include 3 connectors, 1 resistor and 1 transistor.

Main components

1

README

README.md

Smart Staircase Lighting

DIY staircase lighting with capacitive touch detection and Home Assistant integration. Touch the handrail → lights fade in. Walk away → lights fade out. All settings tunable live via HA sliders.

Wiring Schematic


How It Works

  1. Copper tape runs along the underside of the handrail, wired to GPIO1 on the ESP32-S2 Mini as a capacitive touch sensor.
  2. Touch triggers handle_stair_timer — a configurable filter-on delay confirms it's a real touch (not noise).
  3. GPIO18 drives an IRLZ44N MOSFET via PWM, which powers a COB LED strip with a smooth 1-second fade-in.
  4. After the configured duration, lights fade out over 4 seconds.
  5. Touching again during the timer restarts it (script mode: restart).

The COB strip gives a seamless "dot-less" glow. All wiring is routed internally through the wall with low-profile silicone grommets — hardware stays invisible.


Hardware

ComponentDetails
MCUWemos S2 Mini (ESP32-S2)
MOSFETIRLZ44N (logic-level, TO-220)
LED StripCOB (chip-on-board), single color
Touch SensorCopper tape on handrail → GPIO1
PWM OutputGPIO18 → MOSFET gate
PCBCustom KiCad design (see hardware/kicad/)

ESP32-S2 Mini front ESP32-S2 Mini pinout


Firmware

Built with ESPHome. No custom C++ — pure YAML.

Flash

bash
# Install ESPHome if needed
pip install esphome

# Add WiFi credentials
cp firmware/secrets.yaml.example firmware/secrets.yaml
# edit firmware/secrets.yaml with your SSID and password

# Flash
esphome run firmware/stairlights.yaml

secrets.yaml format:

yaml
wifi_ssid: "YourNetwork"
wifi_password: "YourPassword"

After first flash, OTA updates work over WiFi — no USB needed.


Home Assistant Controls

Once the ESPHome integration is added in HA, five sliders appear:

SliderRangeDefaultPurpose
Light Duration5–120 s30 sHow long lights stay on after touch
LED Brightness10–100 %100 %Peak brightness at fade-in
Touch Threshold1,000–300,00050,000Capacitive trigger level — tune for your handrail
Touch Filter On0–100 ms8 msDebounce delay before turning on (rejects noise)
Touch Filter Off0–100 ms50 msExtra hang time before starting fade-out

Calibrating touch sensitivity: Start with Touch Threshold at 50,000. Watch the Staircase Touch Pad binary sensor in HA. Raise the threshold if lights trigger from ambient noise/humidity; lower it if touches aren't registering.


Wiring

See docs/schematic.png for the full Cirkit Designer diagram. Key connections:

text
ESP32-S2 GPIO18  →  IRLZ44N Gate (via 10Ω resistor)
IRLZ44N Drain   →  LED Strip negative
LED Strip +     →  12V supply
IRLZ44N Source  →  GND
ESP32-S2 GPIO1  →  Copper tape (touch sensor)
ESP32-S2 GND   →  GND
ESP32-S2 3.3V  →  (internal, no external connection needed)

File Structure

text
stair-lights/
├── firmware/
│   └── stairlights.yaml        # ESPHome configuration
├── hardware/
│   ├── kicad/                  # KiCad schematic and PCB layout
│   │   ├── StairLights.kicad_pcb
│   │   ├── StairLights.kicad_pro
│   │   ├── StairLights.kicad_prl
│   │   └── StairLights.kicad_sch
│   ├── gerbers/
│   │   └── StairLights.kicad_pcb.zip   # Fabrication-ready Gerbers
│   └── stairs-pcb.step         # 3D model
└── docs/
    ├── schematic.png            # Wiring diagram
    ├── esp32-s2-mini-front.png  # MCU reference photo
    └── esp32-s2-mini-back.png   # MCU pinout

Troubleshooting

Lights trigger randomly — Capacitive drift from humidity or power fluctuations. Raise Touch Threshold or increase Touch Filter On delay.

Touch not registering — Lower Touch Threshold. Ensure copper tape has good contact with the GPIO1 wire.

Fallback AP — If WiFi is unreachable, the ESP32 broadcasts Stairlights Fallback Hotspot. Connect to it and navigate to 192.168.4.1 to reconfigure.

OTA fails — Make sure secrets.yaml OTA password matches what was flashed. Default is in the YAML.

Parts

9
QtyValueFootprintReferences
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
2Screw_Terminal_01x03TerminalBlock_Phoenix:TerminalBlock_Phoenix_MPT-0,5-3-2.54_1x03_P2.54mm_HorizontalJ1, J2
110KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
1Conn_01x05kicad:wemoss2J3
1IRLZ44NPackage_TO_SOT_THT:TO-220-3_VerticalQ1

Similar boards

  • 2 layers304.8 × 170.8 mm00Key, the printed circuit board in 3D

    00Key

    ZeroZeroOne-dev/00Key

    00Key a 75% keyboard

    268 parts241GPL-3.0
  • 2 layers94 × 79 mm5 - Lizard Car, the printed circuit board in 3D

    5 - Lizard Car

    TRD-B/Lizard

    3D printed RC race car with custom electronics

    54 parts129CC-BY-4.0
  • 2 layersMorpheus kicad, the printed circuit board in 3D

    Morpheus kicad

    pscrespo/Morpheus-STM32

    A small 3D printer controller board for use with a "blue pill" STM32F1 generic board. Inspired on http://reprap.org/wiki/SinapTec

    66 parts80GPL-3.0
  • 2 layers157.5 × 97.8 mmEsp32PrinterController, the printed circuit board in 3D

    Esp32PrinterController

    MitchBradley/Esp32PrinterController

    PCB design for 3D printer controller using ESP32 processor

    101 parts16MIT
  • 2 layers99.1 × 99.1 mmFlipDotDriver, the printed circuit board in 3D

    FlipDotDriver

    bitluni/FlippyFlip

    49 parts14
  • 2 layers64.8 × 109.2 mmDmx ledstrip dimmer-32ch, the printed circuit board in 3D

    Dmx ledstrip dimmer-32ch

    robinolejnik/dmx-ledstrip-dimmer-32ch

    Arduino Mini and TLC5940 based 32 channel 12V PWM dimmer with DMX512 and RDM support.

    105 parts14MIT
  • 2 layers101.6 × 53.3 mmBatteryAnalyzer MkII, the printed circuit board in 3D

    BatteryAnalyzer MkII

    Moragor/BatteryAnalyzer_MkII

    Updated Version of the battery analyzer, now with constant current

    25 parts12MIT

Questions

How big is the Stair lights PCB?

It measures 35.5 × 41.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Stair lights use?

9 parts, built around the IRLZ44N. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Stair lights KiCad files?

From the dreed47/stair-lights repository on GitHub, at the commit this page was made from: the board is hardware/kicad/StairLights.kicad_pcb and its schematic hardware/kicad/StairLights.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Stair lights design in my own project?

Its repository states no licence, so its author keeps all rights: ask dreed47 before reusing the design.