I'm running ESP Easy on 2 Wemos D1 Mini's for DS18B20 temperature readings and also to control relays, and it works very well.
I would like to add in a AC Dimmer and wonder if ESP Easy can output a stable PWM signal which I can convert into a DC voltage using a low pass filter and then connect to a voltage controlled dimmer such as this one
http://www.esp8266-projects.com/2016/04 ... witch.html
The designer cautions against using an ESP directly with PWM but doesn't mention using a low pass filter to create DC.
Alternatively can anyone suggest a way of getting a MQTT Mains Dimmer? Its a Linear Halogen Bulb so I can't easily replace it with a dimmable LED
ESP PWM output possible to control a dimmer?
Moderators: grovkillen, Stuntteam, TD-er
Re: ESP PWM output possible to control a dimmer?
Hi, I'm looking for the same.
Did you order that dimmer? Did some testings?
Thanks!
Did you order that dimmer? Did some testings?
Thanks!
Located in Belgium, Bruges. Working on a full DIY domoticz setup with ESPEasy.
Re: ESP PWM output possible to control a dimmer?
Hello,
surely the output can be used for that.
I know there are some commercial devices using an ESP and some power FET's for that.
But be aware that some other devices / tasks may interrupt the PWM for a short moment.
I have this effect with using PWM for fan speed control and some rules aside.
The fan is without power every second or two for a moment. On a LED stripe this says it flickers.
A PCA9685 might be a nice answer for that problem and gives more possible channels.
It's a 16chan PWM chip driven via I²C. A breakout board can be obtained at elecronic shops or Aliexpress.
I'm waiting for a PCB i've ordered for building a prototype of a multichannel dimmer based on ESP-01 and PCA9685 breakout.
For directly dimming mains voltage i would prefer to use a ready made dimmer module.
Mains voltage is dangerous!
Regards
Shardan
surely the output can be used for that.
I know there are some commercial devices using an ESP and some power FET's for that.
But be aware that some other devices / tasks may interrupt the PWM for a short moment.
I have this effect with using PWM for fan speed control and some rules aside.
The fan is without power every second or two for a moment. On a LED stripe this says it flickers.
A PCA9685 might be a nice answer for that problem and gives more possible channels.
It's a 16chan PWM chip driven via I²C. A breakout board can be obtained at elecronic shops or Aliexpress.
I'm waiting for a PCB i've ordered for building a prototype of a multichannel dimmer based on ESP-01 and PCA9685 breakout.
For directly dimming mains voltage i would prefer to use a ready made dimmer module.
Mains voltage is dangerous!
Regards
Shardan
Regards
Shardan
Shardan
Re: ESP PWM output possible to control a dimmer?
Thanks for the PCA9685 hint!Shardan wrote:Hello,
surely the output can be used for that.
I know there are some commercial devices using an ESP and some power FET's for that.
But be aware that some other devices / tasks may interrupt the PWM for a short moment.
I have this effect with using PWM for fan speed control and some rules aside.
The fan is without power every second or two for a moment. On a LED stripe this says it flickers.
A PCA9685 might be a nice answer for that problem and gives more possible channels.
It's a 16chan PWM chip driven via I²C. A breakout board can be obtained at elecronic shops or Aliexpress.
I'm waiting for a PCB i've ordered for building a prototype of a multichannel dimmer based on ESP-01 and PCA9685 breakout.
For directly dimming mains voltage i would prefer to use a ready made dimmer module.
Mains voltage is dangerous!
Regards
Shardan
Located in Belgium, Bruges. Working on a full DIY domoticz setup with ESPEasy.
Re: ESP PWM output possible to control a dimmer?
It is working very well if your setup will respect some simple conditions.
I have opened a related post, so everybody that has related questions about, can keep an eye here:
viewtopic.php?f=2&t=2362
Happy breadboarding,
TJ.
I have opened a related post, so everybody that has related questions about, can keep an eye here:
viewtopic.php?f=2&t=2362
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/
MPDMv4 Universal AC Dimmer is available also on TINDIE Store: https://www.tindie.com/stores/nEXT_EVO1/
Re: ESP PWM output possible to control a dimmer?
confirmed
Only when cold boot, I see that my pwm is giving a sort of signal;
Only when cold boot, I see that my pwm is giving a sort of signal;
Located in Belgium, Bruges. Working on a full DIY domoticz setup with ESPEasy.
- ledfreak3d
- Normal user
- Posts: 48
- Joined: 21 Oct 2016, 12:41
Re: ESP PWM output possible to control a dimmer?
Here you go this script will control all your espeasy lights both rgb and single channel lights can be dimmed
Code: Select all
local lights = {
['Aqua Dimmer R/W'] = {ip = '192.168.1.98', pin = '14', rgb = false},
['Aqua Dimmer B/W'] = {ip = '192.168.1.98', pin = '4', rgb = false},
['keuken'] = {ip = '192.168.1.65', pin = '12', rgb = false},
['Blokhut'] = {ip = '192.168.1.93', pin = '14', rgb = false},
['Lampjes'] = {ip = '192.168.1.93', pin = '4', rgb = false},
['Trap'] = {ip = '192.168.1.40', pin = '5', rgb = false},
['Kontorhylde W'] = {ip = '192.168.33.67', red = '15', grn = '13', blu = '12', rgb = true},
['Stuereol W'] = {ip = '192.168.33.61', red = '15', grn = '13', blu = '12', rgb = true},
['Seng W'] = {ip = '192.168.33.66', red = '15', grn = '13', blu = '12', rgb = true}
}
function setlight (ip, pin, dvalue)
os.execute("curl 'http://" .. ip.. "/control?cmd=PWM,".. pin .."," .. tostring(dvalue) .. ",1150'")
end
commandArray = {}
for deviceName,deviceValue in pairs(devicechanged) do
if (lights[deviceName]) then
if (deviceValue == 'Off') then
dvalue = 0 ;
elseif (deviceValue == 'On') then
dvalue = 1024
else
inputValue = tonumber(otherdevices_svalues[deviceName])
curve = 1.5848931924611
normalizedCurVal = (inputValue - 1.0) / 99.0
rangedValue = (math.pow(normalizedCurVal, curve) * 1023.0) + 1.0
dvalue = math.ceil(rangedValue)
end
if (lights[deviceName]['rgb']) then
setlight(lights[deviceName]["ip"], lights[deviceName]["red"], dvalue)
setlight(lights[deviceName]["ip"], lights[deviceName]["grn"], dvalue)
setlight(lights[deviceName]["ip"], lights[deviceName]["blu"], dvalue)
else
setlight(lights[deviceName]["ip"], lights[deviceName]["pin"], dvalue)
end
end
end
return commandArray
Domoticz Synology Esp easy Location Netherlands /Hoorn
Who is online
Users browsing this forum: No registered users and 21 guests