A place to put your YouTube video that is ESP8266 related.

User avatar
By freedom2000
#28560 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
You do not have the required permissions to view the files attached to this post.
User avatar
By trackerj
#28728 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
You do not have the required permissions to view the files attached to this post.