-->
Page 1 of 9

Wifi controlled 220V AC dimmer

PostPosted: Mon Sep 07, 2015 4:19 pm
by freedom2000
Hi,

Please take note that this design is connected to Mains Power ...
If you don't know how dangerous it can be, do NOT try to replicate this design. MAINS can be letal...

This being said, here is how you can control any incandescent light or electrical fan with your favorite ESP8266 over internet :

schematics.png


This schematics is showing only the "power part" of the design

Basically R1, R2 and D1 feed an optocoupler with AC signal clamped at 0.6V by D1 and the opto LED.
Thus it produces a square signal crossing 0V when the Mains itself is at 0V. This signal is output on the isolated side of the optocoupler and is sent to the ESP8266.

ESP8266 is then computing a delay to switch on the MOC during a very short pulse. Doing this enables the triac to switch on only during a short fraction of the 50Hz (or 60Hz) period. Thehigher the delay the more the light is dimmed.

Here is an example showing an almost full brightness (most of the power is kept "ON")

199.png


And now a video explaining and showing all this :




JP

Re: Wifi controlled 220V AC dimmer

PostPosted: Tue Sep 08, 2015 3:29 pm
by freedom2000
Hi again,

I have just added a simple Android App to control the dimmer.

It's surprisingly smooth with a very good response time of the ESP8266



JP

Re: Wifi controlled 220V AC dimmer

PostPosted: Wed Sep 09, 2015 1:07 pm
by freedom2000
And it works as well to control an inductive load : a fan for example



JP

Re: Wifi controlled 220V AC dimmer

PostPosted: Wed Sep 09, 2015 1:40 pm
by trackerj
Nice , well done!

You can use also a AC input opto in the ZCD stage: MainPower Dimmer/Switch Design

Zero Cross Detection :


Load dimmer test:


Web Interface Example code for the MAINS DIMMER Module (MPDMv3)

Web interface - interactive dimmer slidebar test:


MPDMv3_top_small_1.jpg