Author Topic: Universal AC MAINS WIFI Dimmer solution - Arduino/ESP8266  (Read 6461 times)

0 Members and 1 Guest are viewing this topic.

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Universal AC MAINS WIFI Dimmer solution - Arduino/ESP8266
« on: April 20, 2016, 11:14:26 am »
A short example of how easy is to build a WIFI Dimmer unit with a ESP8266 Module and a Universal AC MAINS Dimmer Driver like the MPDMv4:



And the realated articles, explaining in more details about:
- Universal AC MAINS Dimmer unit - MPDMv4
- ESP8266 Driver example
« Last Edit: April 30, 2016, 04:16:08 pm by TJ232 »
ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: ESP8266 - AC MAINS WIFI Dimmer solution
« Reply #1 on: April 30, 2016, 04:15:17 pm »
Arduino IDE code example (yes, it is THAT simple!), using Serial Input for reading Brightness values and PWM with a simple RC filter for VCNT:

Code: [Select]
int VCNT = 3;    // MPDMv4 Voltage Control Pin (VCNT) connected to Arduino PIN3

void setup()
{
  // initialize the serial communication:
  Serial.begin(9600);
  // initialize the VCNT pin as an output:
  pinMode(VCNT, OUTPUT);
}

void loop() {
  byte brightness;

  // check if data has been sent from the computer:
  if (Serial.available()) {
    // read the most recent byte -> range from 0 to 190 : MPDMv4 Calibrated range
    brightness = Serial.parseInt();
    Serial.print("Command received : ");
    Serial.println(brightness);   
    // set the brightness -> range from 0 to 190 : MPDMv4 Calibrated range

    analogWrite(VCNT, brightness);
  }
}

GitHUB Link : MPDMv4 Examples


ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Offline Martini

  • Regular Contributor
  • *
  • Posts: 89
Re: Universal AC MAINS WIFI Dimmer solution - Arduino/ESP8266
« Reply #2 on: May 01, 2016, 11:45:29 am »
Great!

That MPDMv4 is interesting.
 
The following users thanked this post: TJ232

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Universal AC MAINS WIFI Dimmer solution - Arduino/ESP8266
« Reply #3 on: May 01, 2016, 09:56:36 pm »
I assume this is a product for sale.  Saw information on the zero cross detector and driver, but nothing on the middleman mcu that is driving the dimmer.

As an almost related side note, I recently made a dimmer with a LPC8xx driving it and used the SCT (timer module) for the first time and the SCT timer is amazing.  The most flexible timer I have ever seen.  The triac trigger function could be made totally using the timer setup.  No running code or even interrupt code needed.  Everything setup in the timer and only need to change the reload register to change the dimmer value.
Mark Higgins
 
The following users thanked this post: TJ232

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: Universal AC MAINS WIFI Dimmer solution - Arduino/ESP8266
« Reply #4 on: May 02, 2016, 08:37:54 am »
I assume this is a product for sale.  Saw information on the zero cross detector and driver, but nothing on the middleman mcu that is driving the dimmer.

As an almost related side note, I recently made a dimmer with a LPC8xx driving it and used the SCT (timer module) for the first time and the SCT timer is amazing.  The most flexible timer I have ever seen.  The triac trigger function could be made totally using the timer setup.  No running code or even interrupt code needed.  Everything setup in the timer and only need to change the reload register to change the dimmer value.

Yes, it is. Don't know if is allowed to put here a link from where but if somebody wants to give it a try can contact me directly.

Nice approach with the LPC8xx  :-+

The idea behind MPDMv4 AC Dimmer driver was to have a AC Dimmer module that will put 0% overhead on the existing App MCU.
After struggling with the MPDMv3 and the ESP8266 software PWM and Intrrupts limitations that are complicating even more a software ZCD implementation I decided that it's enough and designed the new module with integrated Phase detection and ZCD.

ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: Universal AC MAINS WIFI Dimmer solution - Arduino/ESP8266
« Reply #5 on: May 16, 2016, 11:14:41 am »
Youtube Video Tutorial:

How to drive a MPDMv4 AC Dimmer Board with your Arduino:

ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: Universal AC MAINS WIFI Dimmer solution - Arduino/ESP8266
« Reply #6 on: June 09, 2016, 06:43:28 am »
Giving a try also to the ESPBasic firmware:



In terms of speed and PWM accuracy is working way better than NodeMCU LUA, on par with Arduino IDE I can say. The ESPBasic evolution is quite interesting, soon the version 3 will be released and seems to be full of a alot of goodies, including websockets!



« Last Edit: June 09, 2016, 06:47:37 am by TJ232 »
ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf