

The Modulo Dimmer (RobotDyn AC Light Dimmer Module) is an electronic device designed to control the brightness of AC-powered lighting fixtures. By varying the voltage or current supplied to the load, it enables precise dimming of incandescent, halogen, and some dimmable LED lights. This module is widely used in home automation, theatrical lighting, and energy-saving applications.








The Modulo Dimmer has a 4-pin interface for connecting to a microcontroller and AC load.
| Pin Name | Description |
|---|---|
AC-IN |
AC input terminals for connecting to the mains power supply (110V-220V AC). |
AC-OUT |
AC output terminals for connecting to the load (e.g., light bulb, fan). |
VCC |
Power supply input for the control circuit (3.3V-5V). |
GND |
Ground connection for the control circuit. |
PWM |
Pulse Width Modulation input for dimming control (from microcontroller). |
Z-C |
Zero-cross detection signal output (used for synchronization with AC cycles). |
Connect the AC Input and Output:
AC-IN terminals to the mains power supply (110V-220V AC).AC-OUT terminals to the load (e.g., a dimmable light bulb).Connect to a Microcontroller:
VCC and GND pins to the 3.3V or 5V power supply of your microcontroller.PWM pin to a PWM-capable pin on the microcontroller.Z-C pin to a digital input pin for zero-cross detection.Write Control Code:
Below is an example of how to use the Modulo Dimmer with an Arduino UNO to control the brightness of a light bulb.
/*
Example Code for RobotDyn AC Light Dimmer Module
This code demonstrates how to control the brightness of a light bulb
using PWM and zero-cross detection with an Arduino UNO.
*/
#define ZC_PIN 2 // Pin connected to the Zero-Cross detection signal
#define PWM_PIN 3 // Pin connected to the PWM input of the dimmer module
volatile boolean zeroCross = false; // Flag for zero-cross detection
int dimValue = 128; // Brightness level (0-255)
int delayTime; // Delay time for dimming
void zeroCrossISR() {
// Interrupt Service Routine for zero-cross detection
zeroCross = true;
}
void setup() {
pinMode(ZC_PIN, INPUT); // Set Zero-Cross pin as input
pinMode(PWM_PIN, OUTPUT); // Set PWM pin as output
attachInterrupt(digitalPinToInterrupt(ZC_PIN), zeroCrossISR, RISING);
}
void loop() {
if (zeroCross) {
zeroCross = false; // Reset zero-cross flag
delayTime = (128 - dimValue) * 75; // Calculate delay for dimming
delayMicroseconds(delayTime); // Wait for the calculated delay
digitalWrite(PWM_PIN, HIGH); // Turn on the dimmer
delayMicroseconds(10); // Keep it on for a short duration
digitalWrite(PWM_PIN, LOW); // Turn off the dimmer
}
}
The light does not dim or flickers:
The module overheats:
No response from the module:
Zero-cross detection not working:
Z-C pin is properly connected to the microcontroller.Can I use this module with a 3.3V microcontroller?
Yes, the module is compatible with both 3.3V and 5V logic levels.
Is this module suitable for non-dimmable LEDs?
No, non-dimmable LEDs may not work correctly and could be damaged.
Can I control multiple dimmers with one microcontroller?
Yes, but ensure each dimmer has its own zero-cross detection and PWM control pin.
What happens if I exceed the power rating?
Exceeding the power rating may damage the module or cause overheating. Always stay within the specified limits.
This concludes the documentation for the RobotDyn AC Light Dimmer Module.