Skip to content
MCU Atlas
ESP32ESP32-C6

Drawer lights on an ESP32-C6: per-drawer lighting and Zigbee

Open a drawer and its column lights up: an ESP32-C6 reads its MC-38 contact, lights that 24 V WS2814 COB column, and reports it to Home Assistant over Zigbee.

Difficulty:Intermediate

What it is

Open a drawer and its column lights up: an ESP32-C6 reads its MC-38 contact, lights that 24 V WS2814 COB column, and reports it to Home Assistant over Zigbee.

What you need

  • One Espressif ESP32-C6-DevKitC-1 the exact board the maker names — genuine, as range varies on clones
  • One 24 V WS2814 RGBW COB strip 21 pixels used, seven per column, in a routed groove under the counter
  • One MC-38 wired door contact per drawer normally closed alarm-style contacts, a pair of cores each
  • The maker's carrier board, or your own 24 V power chain Mean Well 24 V PSU, Traco step-down, SN74AHCT125 level shifter; board sold direct by email

How hard

Intermediate — soldering the contact tails, routing the furniture groove and the 24 V power wiring; the firmware side is ESPHome configuration rather than code.

Key Facts

  • What: per-drawer lighting for a 14-drawer dressing area — open a drawer and the 7 pixels above its column light; column goes dark about a second after the last drawer in it closes (maker's build page + Circuit Digest)
  • Light: one 24 V WS2814 RGBW COB strip in a routed groove under the countertop; 21 pixels used, 7 per column, 3 columns; even COB line rather than dots (build page)
  • Sensing: one normally closed MC-38 wired door contact per drawer, magnet on the drawer front; 14 contacts per the parts table (note: carrier board spec lists 12 contact inputs — disclosed in copy) (build page + board page)
  • Wiring: one pair of cores per drawer; one 8-core alarm cable per column into the plinth; at the board one core per GPIO, spare cores to 0 V (build page)
  • Board: Espressif ESP32-C6-DevKitC-1 on the maker's KiCad carrier board, in a box under the left unit — "The same board that runs my drawers." (build + board pages)
  • Power: Mean Well GST60A24 24 V 2.5 A is the only mains part; Traco TSR 1-2450 steps 24 V down to 5 V; SN74AHCT125 lifts 3.3 V data to 5 V (build + board pages)
  • Pins: contacts on GPIO 0–3, 6, 7, 10, 11, 18–21 (12 inputs); strip data from GPIO 22, shifted to 5 V, fused +24 V/0 V (board page)
  • Firmware: ESPHome — the maker's config with its light effects and the Zigbee2MQTT converter, emailed with the board; no public repo (board page + GitHub check 2026-11-29)
  • Zigbee: the C6's own 2.4 GHz radio reports every drawer to Home Assistant; no second radio chip in the build; pairs through Zigbee2MQTT on the HA side (build + Circuit Digest + board pages)
  • Radio gotcha: the C6 time-shares one 2.4 GHz radio between Wi-Fi and Zigbee — Wi-Fi stayed off until the Zigbee join completed (build + Circuit Digest)
  • Home Assistant features: dim red 22:00–06:30; amber breathing before 5-minute auto-off; 15-minute sunrise with birdsong via the bedroom Echo; celebration and Christmas routines; armed-drawer alarm flashing red and blue (build page)
  • Cost: maker's total "About £128 in all" (his table sums to £128.42) — maker's GBP figures, retrieved 2026-11-29
  • Carrier board: £15 plus postage (about £2–3 in the UK), in stock, ordered by email from the maker — checked 2026-11-29
  • Firmware license: no repo, no license — documented build + purchasable board + emailed config; not open source

About This Project

What it is

The Drawer Illumination Subsystem is Marcus of Marcus Lab's answer to a brand-new dressing area that worked perfectly but felt, in his words, like it was missing something: "There simply wasn't enough Zigbee, electronics, complication or lighting involved." Open any of the 14 drawers and the addressable strip hidden in a groove under the countertop lights just that drawer's column — the seven pixels above it — then goes dark about a second after the last drawer in the column closes. One Espressif ESP32-C6-DevKitC-1 running ESPHome does all of it: it reads one wired door contact per drawer, drives the strip, and reports every drawer's state to Home Assistant over Zigbee, no add-on radio chip involved. The build got picked up by Hackaday and Circuit Digest within days of each other, and the maker's parts bill is in the Parts list below (his figure, retrieved with this page's sources). His one-line summary of the whole idea: "One drawer, one column."

How the lighting works: one strip, three columns

There is exactly one LED strip in this build — a 24 V WS2814 RGBW COB strip routed into a groove on the underside of the countertop — but because every pixel is addressable, the board can light only the seven pixels sitting above whichever column has an open drawer. Only 21 pixels are used in total: three columns, seven pixels each. The COB choice matters for how it reads in a room: "It's a COB strip, so the light is one even line rather than a row of dots." The maker's own render caption describes the behaviour precisely: "a column lights while any of its drawers is open, and goes off a second after the last one shuts."

The strip lives in a groove routed with one pass of a 12 mm bit, 4 mm deep and 28 mm back from the front edge, positioned so the top drawers still clear it; a second groove carries the cable back through the gap behind the drawers. The strip is held in with dabs of adhesive and its lead is extended with flexible pond-pump cable to get round the corner, and it is cut to length at pixel 21. Turn-on is not a snap: the light sweeps out from the middle of the column.

Sensing the drawers: one contact per drawer

Each drawer is sensed by a normally closed MC-38 wired door contact — the same reed contact used in burglar alarms — fixed upright to the inside of the cabinet side, 12 mm back from the front edge. Its magnet sits on the back of the drawer front facing it: shut, the magnet holds the contact closed; pull the drawer out a couple of centimetres and it opens. That normally-closed choice is the fail-safe direction — a cut wire or a dead contact reads as "open", not "closed".

Wiring is deliberately boring: each contact's tail runs back along the top of its drawer space to a soldered join with that drawer's own pair of cores, and each column's pairs run down a back corner inside one 8-core alarm cable, dropping through the base into the plinth and on to the board in its box under the left unit. At the board, one core from each pair lands on its own GPIO pin and the spare cores are twisted together into 0 V. One honest wrinkle we could not resolve from the write-up alone: the parts table counts 14 MC-38 contacts ("One per drawer"), while the carrier board's own spec page lists 12 door-contact inputs on three 6-way terminals. Both numbers are the maker's; how 14 sensed drawers map onto 12 board inputs is not explained on either page. It does not change what the build does, but check with him before you scale the input count to a bigger bank of drawers.

The board and the power chain

Everything runs from one board in a box under the left unit: a stock Espressif ESP32-C6-DevKitC-1 (his note: "Genuine, as range varies on clones.") plugged into a carrier board the maker drew in KiCad, with plugs for the three columns, the strip and the 24 V supply. The board handles the whole power chain, exactly as Hackaday put it: "a custom PCB that handles all the power conversion and makes plugging everything in a breeze." Mains enters at exactly one point — a Mean Well GST60A24 24 V 2.5 A supply, and only that: "The only mains part, so a known brand." A Traco TSR 1-2450 step-down converter then makes 5 V for the C6, and an SN74AHCT125 buffer lifts the C6's 3.3 V data line to the 5 V the strip expects. Per the carrier board's spec: the 12 contact inputs sit on GPIO 0–3, 6, 7, 10, 11 and 18–21, the strip data leaves from GPIO 22 (shifted to 5 V, with fused +24 V and 0 V alongside), and everything is through-hole on a 90 × 66 mm two-layer board with four M3 mounting holes.

That power design is a quiet lesson in itself: 24 V for the strip means thin, cheap cable runs with almost no voltage drop, one branded sealed mains brick instead of anything hand-wired at mains voltage, and a single tidy step-down to logic level. Circuit Digest's editor read the build the same way — as a build that "shows the parts that make home automation reliable, from proper level shifting and a branded mains supply to one cable per column and contacts that fail safe".

The firmware: ESPHome config, not a codebase

The firmware side of this project is an ESPHome configuration. The maker's own block diagram for the build labels the board "ESP32-C6 · ESPHome", and the carrier board he sells is described as shipping with "My ESPHome config, its light effects and the Zigbee2MQTT converter, emailed when you order." For a new DIYer this is the friendliest possible shape: the drawer logic, the light effects and the reporting all live in configuration you can read and edit, on a stock devkit you flash yourself — the board page is blunt about the deal: "You buy and solder the parts below, and flash the C6 yourself." There is no public firmware repository: the maker's GitHub (marco308) has no drawer-lights repo (we checked via the GitHub API on 2026-11-29), and the config is distributed directly with the board. So this is a documented build with purchasable hardware and an emailed config — not an open-source project; see the license section.

Zigbee to Home Assistant — and the C6 radio lesson

The C6 reports every drawer to Home Assistant over Zigbee on its own 2.4 GHz radio (the same one that does Wi-Fi) — there is no second radio chip anywhere in the parts list, and no Wi-Fi-to-bridge relay in the signal path. Circuit Digest puts the hardware fact plainly when it says the C6 "shares one 2.4 GHz radio between Wi-Fi and Zigbee". On the Home Assistant side, the maker's setup pairs the board through Zigbee2MQTT — his converter definition for it ships with the carrier board. (Your Home Assistant still needs whatever Zigbee coordinator it already runs to join anything; the write-ups assume one is in place and don't cover that side.)

Which brings us to the gotcha the maker hit, and the single most useful thing in his write-up for anyone building Zigbee on a C6:

Known upstream issueOne radio, two jobs: the ESP32-C6 has to time-share its single 2.4 GHz radio between Wi-Fi and Zigbee. The maker's board would not join Zigbee at all at first — Wi-Fi was hogging the radio. His fix: Wi-Fi stays off until the Zigbee join completes. If your C6 Zigbee device refuses to join while Wi-Fi is enabled, that is the first thing to check.

His own words, from the build page: "At first it wouldn't join Zigbee. The C6 shares one radio between Wi-Fi and Zigbee, and Wi-Fi was hogging it. Wi-Fi now stays off until it has joined."

What Home Assistant does with it

Every drawer's open/closed state lands in Home Assistant, which is where the build stops being a light and starts being an appliance. Reporting each drawer individually means, in Hackaday's phrasing, reporting the state of each drawer — "because who doesn't want to graph their drawer usage?" The maker's Home Assistant routines include: a night mode where "Between 22:00 and 06:30 a drawer gets dim red instead of white"; a nudge where "A drawer left open breathes amber for its last 30 seconds before the light goes off at five minutes"; and a sunrise routine — "Deep red to warm white over the 15 minutes before I get up, then birdsong from the bedroom Echo. Opening a drawer ends it." There is also a celebration routine of ten seconds of rainbow bloom, fireworks, a rainbow chase and a gold finish, and a 56-second Christmas routine timed to Last Christmas played on the bedroom Echo.

The most home-security-flavoured feature is the drawer alarm: "A switch in Home Assistant arms the drawers. Open one and the strip flashes red and blue while the bedroom Echo sounds an alarm." Arm it from a phone before a trip, and the furniture itself becomes a burglar sensor.

What the build actually takes

This is why the project fits our library: the electronics are genuinely simple — one stock devkit, one addressable strip, the cheapest possible door contacts, and an ESPHome config instead of a firmware project — while the parts are all ordinary catalog items, and mains is isolated to a single branded 24 V PSU. The total parts bill is the maker's own figure, reproduced line-for-line in the Parts list below. What you do need beyond the electronics bench is real-world making: soldered joins for every contact tail, a router (the wood kind) for the strip groove, and patience running alarm cable through cabinet backs. We rate the build intermediate for the soldering, the woodwork and the 24 V power wiring — not for the firmware, which is configuration.

Companion pages: lighting and Home Assistant builds

This page joins our addressable-LED and Home Assistant builds. WLED (/projects/wled-wi-fi-control-for-addressable-led-strips-on-esp32/) is the firmware side of the same WS281x strip family, turned into a whole lighting platform. The Mijia bedside lamp rewrite (/projects/esphome-firmware-for-the-xiaomi-mijia-bedside-lamp-2/) is the same ESPHome-plus-Home-Assistant recipe applied to a commercial lamp. Everything Presence One (/projects/everything-presence-one-mmwave-presence-sensor-for-home-assistant/) is a deeper dive into making room-level sensors that Home Assistant can trust.

What we verified vs what the maker claims

A community library page: MCU Atlas has not built this project. We verified by fetching and reading the maker's build page and carrier-board page, plus the Hackaday and Circuit Digest write-ups, on 2026-11-29 (methodology: saved HTML bytes for all four pages, sha256-stamped, read as text; live 200 checks on every cited URL and on our own catalog and companion pages). We confirmed the parts table, the board spec (inputs, GPIOs, power chain), the feature list, the Zigbee2MQTT path and the radio gotcha against his own pages, and checked his GitHub for a firmware repo (none exists). Maker claims we did not measure: every behaviour (the second-long shutoff, the sweep, the sunrise timing), the radio-sharing account, and all prices — they are his figures, attributed. One discrepancy is disclosed in the sensing section: 14 contacts in the parts table vs 12 inputs on the carrier board's spec, unresolved from the sources. His stated parts total matches his own line-by-line table to within pence — his rounding, not a defect.

License, attribution and sources

The build write-up is public on the maker's site, and the carrier board is sold direct — but the ESPHome config and Zigbee2MQTT converter are emailed to board buyers, so this project is not open source in the usual sense; there is no repo and no license file. The project is by Marcus, of Marcus Lab (marcuslab.uk; GitHub marco308, Printables MarcoPolo_2354790). All four sources are linked below. MCU Atlas is not affiliated; ESP32, Espressif, ESPHome, Zigbee, Zigbee2MQTT, Home Assistant, Mean Well, Traco and WS2814 are their owners' marks.

Source & Attribution

Source:
License: No repo and no license file — the write-up is public and the carrier board is sold direct, but the ESPHome config and Zigbee2MQTT converter are emailed to board buyers only; not open source
Last verified: 11/29/2026
Drawer lights on an ESP32-C6: per-drawer lighting and Zigbee

Illustration

Bill of Materials

Parts list

9 parts · 1 linked

Heads up: some Buy links are affiliate links. If you buy through one, MCU Atlas may earn a small commission at no extra cost to you. It never changes which parts we list. How this works

1× Espressif ESP32-C6-DevKitC-1

Maker's cost £11.63 — his figure, retrieved 2026-11-29.

No verified link — check the original project

1× WS2814 RGBW COB strip, 24 V

Maker's cost £12.39 — his figure, retrieved 2026-11-29.

No verified link — check the original project

1× Mean Well GST60A24 24 V 2.5 A PSU

Maker's cost £26.56 — his figure, retrieved 2026-11-29.

No verified link — check the original project

14× MC-38 wired door contact

Maker's cost £8.09 for 14 — his figure, retrieved 2026-11-29.

No verified link — check the original project

1× Traco TSR 1-2450 step-down

Maker's cost £5.87 — his figure, retrieved 2026-11-29.

No verified link — check the original project

5× SN74AHCT125 buffer

Maker's cost £1.51 — his figure, retrieved 2026-11-29.

No verified link — check the original project

1× 8-core alarm cable, 25 m

Maker's cost £12.49 — his figure, retrieved 2026-11-29.

No verified link — check the original project

1× Drawer lights carrier board

Maker's cost £15 plus postage (about £2–3 in the UK) — his figure, retrieved 2026-11-29.

1 set× Terminals, fuse, box, leads, small parts

Maker's cost £34.88 (the "Everything else" line) — his figure, retrieved 2026-11-29.

No verified link — check the original project
Download CSV
ESP32Home Automationesphomehome-assistant

Related Projects

WLED: Wi-Fi control for addressable LED strips on ESP32
Illustration
ESP32
The go-to firmware for WS2812B-style LED strips on ESP32: 100+ effects, sound-reactive audio built in, browser installer, Home Assistant support, stable 16.0.1.
Beginner·Code
4 parts listed
ESPHome firmware for the Xiaomi Mijia Bedside Lamp 2
Illustration
ESP32
Custom ESPHome components that give the Xiaomi/Yeelight Bedside Lamp 2 full local Home Assistant control with no Mijia cloud.
Intermediate·Code
2 parts listed
Everything Presence One: mmWave presence sensor for Home Assistant
Illustration
ESP32
An open ESPHome presence sensor that combines mmWave, PIR, light and temperature/humidity sensing in one small case.
Beginner·Code
1 part listed