AC Light Dimmer Module, 1 Channel, 3.3V/5V logic, AC 50/60hz, 220V/110V
Overview
The RobotDyn AC Light Dimmer Module is a single-channel TRIAC-based phase-cut controller designed to regulate AC power to resistive and some inductive loads. It allows microcontrollers like Arduino, ESP8266, ESP32, or STM32 to smoothly adjust brightness of incandescent or dimmable LED lamps, or control the speed of certain AC motors.
The high-voltage section is galvanically isolated from the logic side via an optocoupler, preventing any possibility of mains voltage reaching your microcontroller.
How It Works
The module uses zero-cross detection to synchronize switching with the AC waveform. When the AC voltage passes through zero, the ZC pin sends an interrupt to the microcontroller. The microcontroller then waits a calculated delay before firing the TRIAC via the PSM pin — the longer the delay, the less power reaches the load.
- At 50 Hz, zero-crossing occurs 100 times per second
- At 60 Hz, zero-crossing occurs 120 times per second
Pinout
| Pin | Function | Connect To |
|---|---|---|
| VCC | Logic power supply | 3.3V or 5V |
| GND | Ground | GND |
| ZC | Zero-cross detection output | Digital input with interrupt support |
| PSM | TRIAC gate trigger | Any digital output |
Zero-Cross Pin by Board
| Board | ZC Pin | Available Output Pins |
|---|---|---|
| Arduino UNO / Nano | D2 | D0–D1, D3–D13 |
| Arduino Mega | D2 | D0–D1, D3–D70 |
| Arduino Leonardo | D7 | D0–D6, D8–D13 |
| ESP8266 | D1, D5, D7 | D2, D6, D8 |
| ESP32 | Any GPIO with interrupt | Any GPIO |
Compatible Loads
Works with:
- Incandescent lamps
- Dimmable LED lamps (marked as “dimmable”)
- Halogen lamps
- Heating elements
- Some AC motors (fans, drills)
Does NOT work with:
- Standard (non-dimmable) LED lamps
- Fluorescent / CFL lamps
- Devices with built-in electronic regulators
- Inductive loads without snubber circuit
Arduino Code Example
#include <RBDdimmer.h>
#define DIMMER_PIN 3
#define ZC_PIN 2
dimmerLamp dimmer(DIMMER_PIN);
void setup() {
dimmer.begin(NORMAL_MODE, ON);
}
void loop() {
for (int i = 0; i <= 100; i++) {
dimmer.setPower(i);
delay(50);
}
}
Install the library: RBDDimmer on GitHub
RBDdimmer Library Reference
The library exposes 10 functions:
| Function | Purpose |
|---|---|
dimmerLamp(psm_pin) | Constructor — assigns the PSM (TRIAC trigger) pin. Example: dimmerLamp dimmer(4); |
begin(mode, state) | Initializes ports, timer, and external interrupt. mode is NORMAL_MODE or TOGGLE_MODE; state is ON or OFF. |
setPower(value) | Sets dimming level 0–100 (%). Example: dimmer.setPower(90); |
getPower() | Returns current dimming value (0–100). |
setMode(mode) | Switches between NORMAL_MODE (fixed level) and TOGGLE_MODE (auto-cycling). |
getMode() | Returns current mode (0 = NORMAL, 1 = TOGGLE). |
setState(state) | Turns dimmer ON or OFF. Example: dimmer.setState(ON); |
getState() | Returns current state (0 = OFF, 1 = ON). |
changeState() | Toggles state to its opposite (HIGH ↔ LOW). |
toggleSettings(min, max) | Configures smooth automatic dimming between min and max values when in TOGGLE_MODE. |
Where to Buy in 2026
RobotDyn has discontinued production, but compatible modules are widely available from third-party sellers. The original design is open-source — many clones are functionally identical.
Documentation
- Pinout diagram (PDF) — coming soon
- Schematic (PDF) — coming soon
- Dimension drawing (PDF) — coming soon