Control your 6 LEDs in series via AC Dimmer Module with a modern web interface!
- Arduino board (Uno, Nano, Mega, etc.)
- AC Dimmer Module (240V/8A)
- 6 LEDs in series (or incandescent lamps)
- Connecting wires
- USB cable for Arduino
Arduino to AC Dimmer Module:
- Dimmer Zero Pin → Arduino Pin 2 (MUST be interrupt pin - D2 on Uno/Nano)
- Dimmer DIM Pin → Arduino Pin 9 (can be any digital pin)
- Dimmer VCC → Arduino 5V
- Dimmer GND → Arduino GND
AC Dimmer to LEDs:
- Connect your 6 LEDs in series to the AC dimmer module's output terminals
- Connect AC input (120V or 240V) to dimmer's input terminals
⚠️ WARNING: Handle AC connections with extreme care!
Arduino to Computer:
- USB cable from Arduino to your laptop
- Open Arduino IDE
- Go to: Sketch → Include Library → Manage Libraries
- Search for: "RBDdimmer"
- Click Install on "RBDdimmer by RobotDyn"
- Wait for installation to complete
- Open
led_controller.inoin Arduino IDE - Select your Arduino board: Tools → Board
- Select the correct COM port: Tools → Port
- Click the Upload button (→)
- Wait for "Done uploading" message
- Open
control_center.htmlin Google Chrome or Microsoft Edge - Click "Connect to Arduino"
- Select your Arduino's COM port from the popup
- Click "Connect"
- Connect to Arduino: Opens port selector
- Disconnect: Closes serial connection
- Green indicator: Connected and ready
- Power Toggle: Turn LEDs ON/OFF
- Brightness Slider: Adjust from 0% to 100%
- ☀️ Sunrise Button: Automatically fade from 0→100% over 5 minutes
- State: ON/OFF status
- Brightness: Current percentage
- Mode: NORMAL or SUNRISE
- Shows all commands and responses
- Color-coded: Green (sent), Blue (received), Red (errors)
ON- Turn LEDs onOFF- Turn LEDs offBRIGHTNESS75- Set brightness to 75% (0-100)SUNRISE_START- Start 5-minute sunrise simulationSUNRISE_STOP- Stop sunrise simulationSTATUS- Request current status
STATUS:ON:75:NORMAL- LEDs ON at 75%, normal modeSTATUS:ON:45:SUNRISE- LEDs ON at 45%, sunrise mode activeSUNRISE:STARTED- Sunrise simulation startedSUNRISE:COMPLETE- Sunrise simulation finished
- Close Arduino Serial Monitor (locks the port)
- Check USB cable connection
- Verify correct board and port selected
- Install RBDdimmer library (see Step 1 above)
- Restart Arduino IDE after installation
- Check Zero pin: MUST be on interrupt pin (D2 on Uno/Nano)
- Verify wiring: Zero → Pin 2, DIM → Pin 9
- AC power: Ensure AC dimmer has proper AC input
- Load type: Works best with incandescent/resistive loads
Different Arduino boards use different interrupt pins:
- Uno/Nano: Pin 2 (INT0), Pin 3 (INT1)
- Mega: Pins 2, 3, 18, 19, 20, 21
- Leonardo: Pins 0, 1, 2, 3, 7
If using a different board, change ZERO_CROSS_PIN in the code to match available interrupt pins.
- AC dimmers work best with incandescent bulbs
- Some LED bulbs may not be dimmable
- Ensure proper load (not too low, not exceeding 8A)
- Control Method: AC phase-angle control with zero-crossing detection
- Library: RBDdimmer.h by RobotDyn
- Interrupt Pin: Pin 2 (INT0 on Uno/Nano)
- Control Pin: Pin 9 (digital)
- Baud Rate: 9600
- Brightness Range: 0-100%
- Sunrise Duration: 5 minutes (300 seconds)
This project involves AC mains voltage (120V/240V) which can be LETHAL!
- Only work on AC connections when power is OFF
- Use proper insulation and enclosures
- If unsure, consult a licensed electrician
- Never touch AC connections while powered
- This is for educational purposes only
✨ Professional AC dimming control
🌅 5-minute sunrise simulation
🎨 Dark mode with premium UI
⚡ Real-time serial communication
🔌 Web Serial API (no drivers needed)
📊 Live status and mode indicators
🎯 RBDdimmer library integration
Enjoy your smart LED dimming system! 💡