Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By trackerj
#60080 New MPDMv4 Universal AC dimmer examples below. This time using the Domoticz + ESPEasy Firmware:

1. ESPEasy Series - Part 1 - Firmware upload and MPDMv4 driver simple test :



2. ESPEasy - P2 - Domoticz - RPi - MPDMv4 AC Dimmer setup example

a full ESP8266 / Domoticz Dimmer setup on a RPi2 Board using the MPDMv4 Universal AC Dimmer Board :





3. ESPEasy - P3 - Domoticz - Windows - MPDMv4 AC Dimmer setup example

In this part of the ESPEasy series we are talking about the changes that need to be done for a Windows 7 Domoticz installation.


As usual more details, code examples, etc are available in the original articles, links above.

Happy breadboarding,
TJ.
User avatar
By trackerj
#60160 If you just want the quickest/easiest done Web interface, I think ESPBasic firmware is the answer:

Code: Select allcls
let PWMpin = 5
let Brightness = 890
print "Control PIN"
textbox pinNo
print " Brightness"
textbox Brightness
button " Set Brightness ",[SetBrightness]
button " Exit ", [TestExit]
wait

[SetBrightness]
io(pwo,PWMpin,Brightness)

wait

[TestExit]
end


If you want a slider, I've just add one quickly:

Code: Select allcls
let xpv = 0
let PWMpin = 5
slider x,150,900
timer 500, [set.dimmer]
wait

[set.dimmer]
 if x <> xpv then
   serialprint "new value received : "
   serialprintln x
   io(pwo,PWMpin,x)
   xpv = x
 end if
wait

[TestExit]
end


Deadly simple :) . If anybody knows a simpler way to do it, please feel free to post here.

For a more complex setup you can use ESPEasy + Domoticz, as in the previous examples above.

Happy breadboarding,
TJ.

Daveps wrote:@trackerj

Do you perhaps have some code (or a web link) for an ESP8266 with a web interface (slider or similar) for a light dimmer using the MPDMV4 board please ?
tia
User avatar
By trackerj
#64648 RaspberryPi - MAINS AC Dimmer Setup:

This time we will directly connect the MPDMv4 MAINS AC Dimmer board to a Raspberry PI and we will drive it using the PWM signal provided by the RPi Board thru the onboard gpio extension header:




Related Article with source code: http://www.esp8266-projects.com/2017/04 ... art-1.html

In Part 2 we will continue with the related Domoticz setup & tests.