Loading 3D model… large boards can take a moment.
trailing-edge dimmer for LED bulbs
LEDDs is an open-source hardware, DIY, smart dimmer for 230 V LED bulbs. It is built around the ESP32-C3-12F and is designed to sit on a desk or table, replacing standard inline cord switches.
The project consists of a PCB, a 3D-printable chassis, and a top plate designed as a PCB. It runs ESPHome for integration with Home Assistant and features a rotary encoder so it can be controlled easily or used as a standalone device.
[!CAUTION] MAINS VOLTAGE: This device operates at 230 VAC. Touching live components can result in serious injury or death.
- Only build if you have relevant experience with high-voltage electronics.
- Always unplug before opening!
- While the design includes safety features (fuse, MOVs), it is not a certified design and should be treated with caution.
This project is suitable if you:
This project is NOT suitable if you:
Most dimmers use leading-edge (TRIAC) dimming (designed for incandescent bulbs). They modulate power to the load by cutting the beginning of the AC half cycle. This creates a voltage spike that can cause buzzing and reduced lifespan in the capacitive power supplies found in LED bulbs.
LEDDs uses trailing-edge dimming. By using MOSFETs to cut the waveform at the end of the AC cycle, there isn't a positive voltage spike. This results in:
The schematic and PCB can be viewed in KiCanvas.
| Parameter | Value |
|---|---|
| Input voltage | 230 VAC |
| Maximum output power | 100 W |
| Idle power draw | ~0.3 W |
| Protections | fuse and MOVs |
| Microcontroller module | ESP32-C3-12F 1 |
| Dimensions | 100 × 51 × 25 mm (W × D × H) |
| Connectivity | Wi-Fi, USB-C (programming) |
[!IMPORTANT] Designed for 230 VAC at 50 Hz.
Usage with 120 VAC at 60 Hz will probably require adjusting the component values of the zero-cross and the voltage regulator circuits.
Status: Verified working. The fabricated board from this release is fully functional. Minor issues may exist but do not affect operation: /doc/releaselog.md v2.0.
:memo: Recommended for fabrication.
├── hw/ # main PCB design (KiCad project)
│ ├── lib/ # symbols and footprints
│ ├── assets/ # fonts and graphics
│ └── export/ # scripts for exporting gerbers, BOM and schematics/PCB PDFs
├── fw/ # ESPHome YAML configurations and firmware binaries
├── doc/ # additional documentation
│ ├── releaselog.md # main PCB release log
│ ├── changelog.md # main PCB change log
├── enclosure/
│ ├── chassis/ # 3D printable chassis
│ │ ├── releaselog.md # chassis release log
│ │ ├── changelog.md # chassis change log
│ │ ├── vX.Y-variant_a/
│ │ └── vX.Y-variant_b/
│ └── top_plate/ # top plate design (KiCad project)
│ ├── releaselog.md # top plate release log
│ ├── changelog.md # top plate change log
│ ├── vX.Y-variant_a/
│ └── vX.Y-variant_b/
└── img/ # photos and renders
Check out the BOM provided in the release bundle for complete components list.
Building LEDDs consists of four main steps:
Download the release bundle.
[!TIP] Use the provided interactive BOM ("ibom.html") as a soldering guide.
ESP32-C3-12F (recommended)
ESP8266 doesn't support native USB and requires an external USB to serial adapter for programming.
The PCB has footprints for a choice between 2 optoisolators that connect the zero-cross signal to the MCU.
H11L1SR2M
This optoisolator is the same as the one used for controlling the MOSFET's gate, but didn't work well for the zero-cross circuit.
The relay is used to power off the mains part of the circuit when the load is turned off. This is intended as a peace of mind feature and can be omitted.
If the rotary encoder is not required - solder a push button (SW2) so boot mode can be entered manually.
A modified top plate (without a hole in the middle) is recommended for safety reasons (not currently available).
Use a USB to serial adapter.
[!TIP] The YAML configurations of the provided binaries are available under /fw/esphome/yaml/.
Directly (possible with all firmware variants):
Home Assistant (included in hass.bin):
Integrating the device in Home Assistant: https://esphome.io/guides/getting_started_hassio/#connecting-your-device-to-home-assistant.
The "Configuration" section allows customization of the device:
Web server (included in web_server.bin):
This is useful if you don't have Home Assistant, but want to control the device remotely.
There are three LEDs on the board:
Light effects can be cycled with the rotary encoder or chosen directly from a UI.
Each fabrication run results in a GitHub release.
Every type of contribution is welcome, like improvements or corrections to the:
Contributions can be made as improvements or as variants (e.g. different enclosure design, ESPHome configuration, etc.).
gitGraph
commit tag: "v1.0"
branch improve_x
checkout improve_x
commit id: "Improve x"
commit id: "Re-generate exports"
commit id: "Update board documentation"
checkout main
merge improve_x tag: "v1.1"
branch replace_y
checkout replace_y
commit id: "Replace y"
commit id: "Generate exports"
commit id: "Compile binaries"
commit id: "Update all documentation"
checkout main
merge replace_y tag: "v2.0"
You're welcome to post your builds in Discussions: Show and tell.
This project is licensed under the MIT License.
Disclaimer: This project involves mains voltage electricity. The author assumes no liability for injury, damage, or regulatory violations. Build and use at your own risk. Ensure compliance with local electrical codes and regulations.
No comments yet. Be the first to ask about this board.