3

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

5
  • here a sample sketch robotdyn.com/pub/media/0G-00005677==Mod-Dimmer-5A-1L/DOCS/…
    – Juraj
    Oct 28, 2018 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, 2018 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, 2018 at 17:10
  • Thank you very much. I appreciate your help.
    – Hira
    Oct 28, 2018 at 17:18
  • I used robotdyn code it works well with esp8266 but I want to use it for esp32. But few libraries of timer.h not supportable with esp32. Anyone tried with esp32. Please help me. Sep 29, 2019 at 7:36

1 Answer 1

1

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.

EDIT: I tested it and it works with fan too. The delay in interrupt is to create a short pulse to turn on the triac. The triac then turns self off on next zero-crossing. And Robotdyn changed the specs to 10 A.

2
  • 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, 2018 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, 2018 at 4:54

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