Dimmable Switch Tutorial using RobotDyn AC Light Dimmer Module

In this section we’ll walk through creating a Light dimmer with RobotDyn and then control the light brightness via Alexa, GoogleHome or SmartThings.

Prerequisites :

  1. ESP32 or ESP8266 x 1.
  2. RobotDyn AC Light Dimmer.
  3. Dimmable Light Bulb.
  4. Jumper Wires.

Not all the light bulbs are dimmable. Please check the manufacturer’s label to see if the bulb is dimmable.

Quick introduction to RobotDyn AC Light Dimmer Module

The RobotDyn AC Light Dimmer Module is a device that allows you to control the brightness of AC lights using a microcontroller. It is a small and easy-to-use module that can be used with microcontrollers, such as the ESP8266, ESP32. The module works by using a triac to control the flow of current to the light bulb. The triac is a semiconductor device that can be used to switch AC current on and off. The RobotDyn AC Light Dimmer Module uses a PWM signal to control the triac, which in turn controls the brightness of the light bulb.

Wiring RobotDyn AC Light Dimmer

You can use the below pin mapping table to connect your ESP32/ESP8266 with RobotDyn AC Light Dimmer module.

 *  +---------------+-------------------------+-------------------------+
 *  |   Board       | INPUT Pin               | OUTPUT Pin              |
 *  |               | Zero-Cross              | PWM                     |
 *  +---------------+-------------------------+-------------------------+
 *  | ESP8266       | D1(IO5),    D2(IO4),    | D0(IO16),   D1(IO5),    |
 *  |               | D5(IO14),   D6(IO12),   | D2(IO4),    D5(IO14),   |
 *  |               | D7(IO13),   D8(IO15),   | D6(IO12),   D7(IO13),   |
 *  |               |                         | D8(IO15)                |
 *  +---------------+-------------------------+-------------------------+
 *  | ESP32         | 4(GPI36),   6(GPI34),   | 8(GPO32),   9(GP033),   |
 *  |               | 5(GPI39),   7(GPI35),   | 10(GPIO25), 11(GPIO26), |
 *  |               | 8(GPO32),   9(GP033),   | 12(GPIO27), 13(GPIO14), |
 *  |               | 10(GPI025), 11(GPIO26), | 14(GPIO12), 16(GPIO13), |
 *  |               | 12(GPIO27), 13(GPIO14), | 23(GPIO15), 24(GPIO2),  |
 *  |               | 14(GPIO12), 16(GPIO13), | 25(GPIO0),  26(GPIO4),  |
 *  |               | 21(GPIO7),  23(GPIO15), | 27(GPIO16), 28(GPIO17), |
 *  |               | 24(GPIO2),  25(GPIO0),  | 29(GPIO5),  30(GPIO18), |
 *  |               | 26(GPIO4),  27(GPIO16), | 31(GPIO19), 33(GPIO21), |
 *  |               | 28(GPIO17), 29(GPIO5),  | 34(GPIO3),  35(GPIO1),  |
 *  |               | 30(GPIO18), 31(GPIO19), | 36(GPIO22), 37(GPIO23), |
 *  |               | 33(GPIO21), 35(GPIO1),  |                         |
 *  |               | 36(GPIO22), 37(GPIO23), |                         |
 *  +---------------+-------------------------+-------------------------+

High Voltage Connectors

Connect the RobotDyn module to the microcontroller as follows:

MCU Zero Cross Pin PWM/ADC Pin
ESP32 4 2

Let’s verify that RobotDyn AC Light Dimmer Module is wired correctly and working.

Arduino IDE Serial Monitor will show the dimming like this:

Step 1 : Create a new device in Sinric Pro

Sinric Pro create device alexa

Sinric Pro copy device id

Step 2 : Connect to Sinric Pro

Step 2.1 Install Sinric Pro Library

Sinric Pro install SinricPro library

2.2 Complete Code

Sinric Pro dimmer with Alexa, SmartThings

Troubleshooting

dimmable light bulb example

Sinric Pro dimmer YYAC-3S via Alexa, SmartThings

Above LED lights up when the module recevice the PWM signal from MCU.

This document is open source. See a typo? Please create an issue