ESP8266 + MPDMv4 Universal AC MAINS Dimmer


I really cannot think at a more simpler way to do a AC Dimmer than Blynk & MPDMv4. I am new to Blynk but I must say that I am really impressed how simple was the entire Project Setup process.

My Setup:

  1. ESP8266 nEXT EVO board
  2. MPDMv4 Universal AC Dimmer
  3. Arduino IDE 1.6.5

The Arduino IDE sketch code for using the MPDMv4 Dimmer is the one from below, nothing else necessary to run your AC Dimmer. Deadly simple!!

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "add you key";

void setup()
  Blynk.begin(auth, "WIFI_SSID ", "passwd here");

void loop()

On the Android phone that I used, in Blynk App, just created a new app & defined a new Slider in it, added desired PWM pin to it ( I have used GPIO5 ), defined slider values from 0->880 and that’s it.

Delightful :slight_smile:

Soon also a Youtube Video with the Blynk MPDMv4 AC Dimmer Setup & software example will follow.

Happy Breadboarding,


This is how is looking the Project Setup:

1 Like

Youtube video published : Using MPDMv4 AC Dimmer with Arduino IDE & Blynk

is the MPDMv4 open source so any one will have no copyright issue on it??

Any reason why you didn’t go 0 to 1023?


MPDMv4 by is released under a Creative Commons Attribution-NonCommercial 4.0 International License. For more details please contact me directly about.

HI Pete,

It is like that because of the defined VCNT (voltage control) interval betwee 0V and about 2.85V.
For more details please take a look here:
And also here where you can find links to a lot of related projects and video tutorials:

Hello sir I want a help.
Can I connect nodemcu to triac BT139 and with blynk slider (PWM) can I control ac (alternating current 220v) fan speed .

Sir can i control pwm value by google assistant.