I would like to use ESP32 to speed control my AC ceiling fan which is 220V AC 100 W.

Will the below AC dimmer work with ESP32 to speed control the ceiling fan which is 220V AC 100 W?

If not, kindly suggest a commonly used PWN dimmer that works with ESP32 to speed control ceiling fan with 220V 100W?

This is the link to Speed controller available on Amazon.

enter image description here

  • here a sample sketch robotdyn.com/pub/media/0G-00005677==Mod-Dimmer-5A-1L/DOCS/… – Juraj Oct 28 '18 at 16:51
  • Hi, I follow the attached code very well ! What I would like to know if the model of dimmer okay to take speed control and is okay to take the load of 220v 100W ceiling fan? – Hira Oct 28 '18 at 17:01
  • it is for 2 A (5 A peek), so yes, it is good for 230V/100 W motor. the information about current is on the photo of the backside of the module. and it supports 3.3V logic for esp32 – Juraj Oct 28 '18 at 17:10
  • Thank you very much. I appreciate your help. – Hira Oct 28 '18 at 17:18

In theory, it should work to control the speed of fan. The manufactures description mentions "fan regulator". One of the pictures shows on the backside of the module that it is for 2 A (5 A peek). This should be good for 230 V / 100 W motor.

The module gives you a basic circuit to control AC. It reports zero-crossing and has an optocoupler switch to turn AC on and off. The dimming does your sketch, by cutting parts of the AC wave out in precise timing.

The example sketch is not good. It has delay in interrupt. With this implementation the sketch will not be able to do much else.

  • I want to use this dimmer in blynk along with other IoT devices. The code you metioned has delays, can you suggest a code without delay function? – Hira Oct 29 '18 at 0:38
  • sorry. no. perhaps a second interrupt to turn AC back on after some microseconds. at 50 Hz one oscillation takes 20 miliseconds. a half wave takes 10 millisecs. you turn AC off at zero-crossing at turn it back after time between 0 and 10000 microseconds. longer time - less electricity - slower motor. other method, perhaps better for motor, is to take out entire half oscillations (this is described on the manufacturers page for the module) – Juraj Oct 29 '18 at 4:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.