Internet controlled AC dimmer using ESP8266 and MQTT

If you are searching for a project using which you can control the brightness of the bulb and speed of the fan over internet from your phone, then this is the right article you are landed on.

You must have seen my videos in which I’m controlling multiple appliances via Internet but in all those videos, you can only turn on and off the appliances. But what if we want to control the speed of the fan wirelessly?

In this article, I’ll let you know how to make your own Internet controlled dimmer using Generic ESP8266 module.

Components Required.

  • Generic ESP8266 module
  • BT136 Triac
  • MOC3021 IC
  • MCT2e IC
  • 220V AC to 3.3V DC Power supply
  • Couple of resistors
  • Two pin terminal connectors
  • Bridge Rectifier

Connection Diagram


The code used for this project is uploaded on my GitHub account. You can download the code from here.

Note:- This code will only work for ESP8266 boards package version 2.4.1. Kindly install that version of boards Package.

PCB Design

I have designed a 4 layer PCB for this project and the good news is that you can also use the same design or modify it according to your project without any restrictions.

Here is the link for the PCB design.

Tutorial Video

I have recorded a full tutorial video for this project in which each and every detail is available