MPDMv4 - Universal AC MAINS Dimmer Board usage

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
trackerj
Normal user
Posts: 44
Joined: 01 Dec 2016, 09:57

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#41 Post by trackerj » 01 Feb 2017, 11:31

mkotek wrote:Than you. Will check tonight and also with another board.

What I meant about the video, it shows that dimming works, only not as much as I expected. But maybe because of something unexpected, that is why I asked for advice.
I can also try this separate I2C driver, if that is better than standalone ESP.
Might be a bad wire related thing, might be something else. Once somebody obtained a similar behavior by sending PWM signal on VCC and connecting VCC on VCNT. Tiny wires, might happen, look here at the jonhjore user comments: http://www.esp8266-projects.com/2016/04 ... witch.html

As a quick step-by-step checklist I will take a look at:
- wiring / VCC value, GND, etc
- GPIO pin/ pin change / PWM output measurement
- VCNT voltage control input measurement
- software side

For a deadly simple test, without anything else connected to the MPDMv4 Dimmer board, you can use a 10K potentiometer connected between the VCC and GND with the wiper on the VCNT input pin. Slowly adjust and measure the POT voltage output and I'm sure you will find the dimming interval to be around 0V -> 2.9V. As soon as you are out of the dimming interval you will find it very quck, it will loose sync and start flickering.

Because this is a thing that really matter for me, all the boards are extensively tested before departure. No DOA at all until now.

For any related question you can also directly contact me anytime.

Happy breadboarding,
TJ.
www.esp8266-projects.com - ESP8266 Projects and many more!
MPDMv4 Universal AC Dimmer is available also on TINDIE Store: https://www.tindie.com/stores/nEXT_EVO1/

mkotek
Normal user
Posts: 116
Joined: 15 Dec 2015, 10:58
Location: Lomianki, Poland
Contact:

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#42 Post by mkotek » 01 Feb 2017, 12:14

I am absolutely not suggesting, there is anything wrong with your product.

I have decided to go Forum route, as my issues might help someone in the future.
I like the dimmer very much and I am sure, your suggestions will help me overcome the issues and have fully working solution.

Will let you know tonight.
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.

trackerj
Normal user
Posts: 44
Joined: 01 Dec 2016, 09:57

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#43 Post by trackerj » 01 Feb 2017, 14:20

mkotek wrote:I am absolutely not suggesting, there is anything wrong with your product.

I have decided to go Forum route, as my issues might help someone in the future.
I like the dimmer very much and I am sure, your suggestions will help me overcome the issues and have fully working solution.

Will let you know tonight.
Probably the desired sense lost somehow in translation on my side, as English is not my mother tongue language, what I wanted to say is that I am offering you full support from my side, not only here on the Forum.

I am also very curious to find out what's exactly the issue with your setup and appreciate your detailed feedback here.
The only thing I can think now is that somehow PWM is not working OK on that pin. Was looking on the Witty schematic and looks to have some extra stuff on some GPIO's. Unfortunatelly cannot find a Witty board around to be able to replicate 100% your setup for test now.
www.esp8266-projects.com - ESP8266 Projects and many more!
MPDMv4 Universal AC Dimmer is available also on TINDIE Store: https://www.tindie.com/stores/nEXT_EVO1/

mkotek
Normal user
Posts: 116
Joined: 15 Dec 2015, 10:58
Location: Lomianki, Poland
Contact:

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#44 Post by mkotek » 01 Feb 2017, 15:12

trackerj wrote:Was looking on the Witty schematic and looks to have some extra stuff on some GPIO's.
You can see the assignment of pins here and D0 (GPIO-16) should not be used for anything:
Image

Will test and let you know. Will also try to check with another board, I have only one Witty and it was at hand yesterday :)
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.

trackerj
Normal user
Posts: 44
Joined: 01 Dec 2016, 09:57

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#45 Post by trackerj » 01 Feb 2017, 15:30

mkotek wrote:
trackerj wrote:Was looking on the Witty schematic and looks to have some extra stuff on some GPIO's.
You can see the assignment of pins here and D0 (GPIO-16) should not be used for anything:
Image

Will test and let you know. Will also try to check with another board, I have only one Witty and it was at hand yesterday :)
As I said above, first thing, use other GPIO pin, please try GPIO4 or 5, as far as I remember GPIO16 is a bit different internally and can only be used as gpio read/write. No support for open-drain/interrupt/pwm/i2c/etc.
www.esp8266-projects.com - ESP8266 Projects and many more!
MPDMv4 Universal AC Dimmer is available also on TINDIE Store: https://www.tindie.com/stores/nEXT_EVO1/

mkotek
Normal user
Posts: 116
Joined: 15 Dec 2015, 10:58
Location: Lomianki, Poland
Contact:

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#46 Post by mkotek » 01 Feb 2017, 21:06

OK, so Witty module is behaving really, really strange. Measured difference between VCNT and GND is changing, but the range is unbelievable:
for GPIO-16: 2,35V-5,24V
for GPIO-14: 1,93V-5,24V
for GPIO-5: 1,95V-5,24V
Even I have measured the voltage between VCC and GND and confirmed, this is 5,24V indeed. Seems like Witty is really strange with this double decker construction.

So I scratched Witty and tried the ordinary POT. And here, your advice and assumption has checked (of course) 100% - range being 0V-2,88V and dimming working as it should.

Next I have moved to my target device, so Sonoff, where I want to do cutoff by relay and dimming using GPIO-14.
After connecting everything, dimming works fine. Most likely I will follow the advice to adjust the scale as it seems lower values change rapidly and higher ones not so much, but the idea checks as planned.

Will post the end setup when I receive the rest of Sonos and put them into actual setup.

Once again thank you :ugeek:
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.

trackerj
Normal user
Posts: 44
Joined: 01 Dec 2016, 09:57

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#47 Post by trackerj » 02 Feb 2017, 08:59

mkotek wrote:OK, so Witty module is behaving really, really strange. Measured difference between VCNT and GND is changing, but the range is unbelievable:
for GPIO-16: 2,35V-5,24V
for GPIO-14: 1,93V-5,24V
for GPIO-5: 1,95V-5,24V
Even I have measured the voltage between VCC and GND and confirmed, this is 5,24V indeed. Seems like Witty is really strange with this double decker construction.

So I scratched Witty and tried the ordinary POT. And here, your advice and assumption has checked (of course) 100% - range being 0V-2,88V and dimming working as it should.

Next I have moved to my target device, so Sonoff, where I want to do cutoff by relay and dimming using GPIO-14.
After connecting everything, dimming works fine. Most likely I will follow the advice to adjust the scale as it seems lower values change rapidly and higher ones not so much, but the idea checks as planned.

Will post the end setup when I receive the rest of Sonos and put them into actual setup.

Once again thank you :ugeek:
I must admit that this is one of the strangest things that I've seen, to have over 5V on a GPIO pin of a 3.3V only device like ESP8266. For sure something is going wrong there, might be even a broken board, don't know much about this Witty Boards...

Regarding the dimming interval it's very easy to trim the dimming interval to the desired values as been related with the VCNT Voltage control value only. The human eye is not a liniar light sensor device, so probably you can "see" changes more from 500 upto 890 that 0-500. And to the end of the day you are interested more on the human eye visual brightness perception, so it's plenty of space for experiments with.

Looking forward to see how is looking your setup with the Sonoff when ready.
www.esp8266-projects.com - ESP8266 Projects and many more!
MPDMv4 Universal AC Dimmer is available also on TINDIE Store: https://www.tindie.com/stores/nEXT_EVO1/

mkotek
Normal user
Posts: 116
Joined: 15 Dec 2015, 10:58
Location: Lomianki, Poland
Contact:

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#48 Post by mkotek » 09 Feb 2017, 21:58

My Sonoffs have arrived and so I was able to create the final version of my solution. It involves Sonoff Basic programmed with EasyESP with GPIO-14 used to control the dimmer. It is attached to the ceiling lamp from IKEA http://www.ikea.com/pl/pl/catalog/products/00304493/. Actually I have (on request form my son) split the 5 sockets into 2 groups (2+3), hence I needed 2 dimmers + 2 Sonoffs. Of course I could use different board and 2 GPIOs on it, but Sonoffs are great, because I am using dedicated function on On and Off, so that power is shut down completely from the lights, when switch is in Off position.

To control the dimmers, I am currently using Xiaomi Wireless Switches (the round ones), as they are providing 3 states: click, double click and long click.
I did not have time to design and troubleshoot the logic, so at the moment, all channels are powered by click action and switched off by double click action. Dimming is done by long click. Once I solve the issue with click to turn power on and off, it will relese double click action to powering just one group and at 50% level of dimming or something similar.

You can see the working solution here: Sonoff + AC Dimmer in basic actions with Xiaomi Wireless Switch 201702.mp4

And my ultimate goal is to use Xiaomi Magic Cube to provide multiple actions and scenarios, but snail mail is really slow this days from China, so it will be a while till I can build that.

Anyway, all working as planned and really cost efficient. Once again, thank you trackerj.
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.

trackerj
Normal user
Posts: 44
Joined: 01 Dec 2016, 09:57

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#49 Post by trackerj » 10 Feb 2017, 13:05

mkotek wrote:My Sonoffs have arrived and so I was able to create the final version of my solution. It involves Sonoff Basic programmed with EasyESP with GPIO-14 used to control the dimmer. It is attached to the ceiling lamp from IKEA http://www.ikea.com/pl/pl/catalog/products/00304493/. Actually I have (on request form my son) split the 5 sockets into 2 groups (2+3), hence I needed 2 dimmers + 2 Sonoffs. Of course I could use different board and 2 GPIOs on it, but Sonoffs are great, because I am using dedicated function on On and Off, so that power is shut down completely from the lights, when switch is in Off position.

To control the dimmers, I am currently using Xiaomi Wireless Switches (the round ones), as they are providing 3 states: click, double click and long click.
I did not have time to design and troubleshoot the logic, so at the moment, all channels are powered by click action and switched off by double click action. Dimming is done by long click. Once I solve the issue with click to turn power on and off, it will relese double click action to powering just one group and at 50% level of dimming or something similar.

You can see the working solution here: Sonoff + AC Dimmer in basic actions with Xiaomi Wireless Switch 201702.mp4

And my ultimate goal is to use Xiaomi Magic Cube to provide multiple actions and scenarios, but snail mail is really slow this days from China, so it will be a while till I can build that.

Anyway, all working as planned and really cost efficient. Once again, thank you trackerj.
Very nice setup and interesting findings. That IKEA lamp has by default 2 circuits or you just splitted in 2?
What version of Xiaomi Wireless Switches are you using? What's the best source to search about, Ebay or Aliexpress, etc?

Happy breadboarding,
TJ.
www.esp8266-projects.com - ESP8266 Projects and many more!
MPDMv4 Universal AC Dimmer is available also on TINDIE Store: https://www.tindie.com/stores/nEXT_EVO1/

mkotek
Normal user
Posts: 116
Joined: 15 Dec 2015, 10:58
Location: Lomianki, Poland
Contact:

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#50 Post by mkotek » 10 Feb 2017, 14:45

trackerj wrote:
mkotek wrote:My Sonoffs have arrived and so I was able to create the final version of my solution. It involves Sonoff Basic programmed with EasyESP with GPIO-14 used to control the dimmer. It is attached to the ceiling lamp from IKEA http://www.ikea.com/pl/pl/catalog/products/00304493/. Actually I have (on request form my son) split the 5 sockets into 2 groups (2+3), hence I needed 2 dimmers + 2 Sonoffs. Of course I could use different board and 2 GPIOs on it, but Sonoffs are great, because I am using dedicated function on On and Off, so that power is shut down completely from the lights, when switch is in Off position.

To control the dimmers, I am currently using Xiaomi Wireless Switches (the round ones), as they are providing 3 states: click, double click and long click.
I did not have time to design and troubleshoot the logic, so at the moment, all channels are powered by click action and switched off by double click action. Dimming is done by long click. Once I solve the issue with click to turn power on and off, it will relese double click action to powering just one group and at 50% level of dimming or something similar.

You can see the working solution here: Sonoff + AC Dimmer in basic actions with Xiaomi Wireless Switch 201702.mp4

And my ultimate goal is to use Xiaomi Magic Cube to provide multiple actions and scenarios, but snail mail is really slow this days from China, so it will be a while till I can build that.

Anyway, all working as planned and really cost efficient. Once again, thank you trackerj.
Very nice setup and interesting findings. That IKEA lamp has by default 2 circuits or you just splitted in 2?
What version of Xiaomi Wireless Switches are you using? What's the best source to search about, Ebay or Aliexpress, etc?

Happy breadboarding,
TJ.
By default the lamp has all 5 lights connected in a single bunch, but as they are run separately, you need only to remove the plastic/metal cap on them and split it any way you want. Here they are split 2+3 but you may create any scenario you want, 2 cables are longer, 3 are shorter, but thats not a problem - they are all accessible by removing just 2 screws on the plastic lid.

As for the switches, I am using round Wireless Switch I have bought here
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.

mvveelen
New user
Posts: 4
Joined: 01 Oct 2016, 13:58

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#51 Post by mvveelen » 02 Jan 2018, 19:36

Hi,

making an old topic alive again..... :

I came across this piece of hardware (the MPDMv4) and I'm already using several Sonoff's, Wemos D1 Mini's and Domoticz. Now I want to dim my Halogen lights and this should be THE solution for me.

But I have a few questions and I hope someone can give me a quick reply:

1. How exactly is the MPDMv4 connected to the Sonoff Basic ?
2. What setup is used in the ESPEasy firmware (what device, are there some extra settings I need to change) ?
3. Is dimming smooth with the Sonoff in combination with this MPDMv4 ?
4. I love the plastic container, could you give a link to this container so I can order 1 (or two) myself ?

Thanks in advance, I really love this stuff but I need some extra pushes in the right direction :oops:

Richie1972
New user
Posts: 2
Joined: 16 Apr 2018, 14:40

Re: MPDMv4 - Universal AC MAINS Dimmer Board usage

#52 Post by Richie1972 » 19 Apr 2018, 10:42

Hi,
Having bought a few of these MDPMv4 devices and some Sonoff Basics I am also looking for some info regarding the question raised by the previous poster:

1. How exactly is the MPDMv4 connected to the Sonoff Basic ?
I would expect them to be connected to the Vcc, GND and GPIO14 connections that are in the same "row" as the TX & RX connections.
However, can the Sonoff Basic provide enough power for the MDPMv4? I've only seen one mention of anyone using this combination, but no info as to whether it actually worked.

2. What setup is used in the ESPEasy firmware (what device, are there some extra settings I need to change) ?
Using ESPEasy would be great, but I've only used it for a Sonoff S20, so any help here would be appreciated - especially to make sure that the push button for turning on/off also synchronises with Domoticz (for example)

3. Is dimming smooth with the Sonoff in combination with this MPDMv4 ?
Any info on this?
I know you have to keep to PWM values between a certain range (0-1024???)

Thanks,
Richie

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 24 guests