AC Light Dimmer Module, 1 Channel, 3.3V/5V logic, AC 50/60hz, 220V/110V

Discontinued RobotDyn SKU: RD-AC-DIM-1CH
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.

Pinout

PinFunctionConnect To
VCCLogic power supply3.3V or 5V
GNDGroundGND
ZCZero-cross detection outputDigital input with interrupt support
PSMTRIAC gate triggerAny digital output

Zero-Cross Pin by Board

BoardZC PinAvailable Output Pins
Arduino UNO / NanoD2D0–D1, D3–D13
Arduino MegaD2D0–D1, D3–D70
Arduino LeonardoD7D0–D6, D8–D13
ESP8266D1, D5, D7D2, D6, D8
ESP32Any GPIO with interruptAny GPIO

Compatible Loads

Works with:

Does NOT work with:

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:

FunctionPurpose
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