Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Matys
#60082 Hello there!
im trying for days to implement 2 channel dimmer using ESP8266 but i cannot find any usable timer to achieve that.
neither timer0, timer1, ticker library ( with US function implemented ) does not work properly. I cant even make it to work using micros() to avoid delays.

is there any progress with the timers to fire below 100us ?
User avatar
By trackerj
#60136 Been there, done that for a while. Conclusion: Use a dimmer that has integrated Phase detection/ZCD functions and let ESP8266 be exactly what is designed to be, the application WIFI controller.

An example of such a board can be find here: http://www.esp8266.com/viewtopic.php?f=13&t=10331

Combine it with a PWM extension board like this one and you have a 16 CH AC MAINS Dimmer solution.

Also integration example with Domoticz: http://www.esp8266.com/viewtopic.php?f=12&t=12812
Last edited by trackerj on Wed Jan 04, 2017 4:00 am, edited 1 time in total.
User avatar
By Matys
#60340 Yeah, the thing is that i dont want to use any external PCBs as it has to fit in wall behind the switch :)
i have managed to use NMI timer to dim 2 channels , control it via buttons and inlcude MySensors gateway for Domoticz controler and yet, get a temperature readings from DS18B20 ! 8-)

at the moment it works stable for like an hour or so, but during development it crashed at random ( due to weak power sorce perhaps - im using FTDI232 but it will get its own stable power source so i will let you know if that was the case )

Another problem is flickering.. at lower levels its noticable , not much but still annoying.
User avatar
By Jesper Dam
#62085 Hello Matys. Did you ever manage to remove the flickering?. I have the exact same problem with my dimmer circuit. The hardware timer isn't accurate enough and I see flickering in the lower levels. I'm using Sming and it seems that the NMI timer interrupt isn't implemented yet.

Matys wrote:Yeah, the thing is that i dont want to use any external PCBs as it has to fit in wall behind the switch :)
i have managed to use NMI timer to dim 2 channels , control it via buttons and inlcude MySensors gateway for Domoticz controler and yet, get a temperature readings from DS18B20 ! 8-)

at the moment it works stable for like an hour or so, but during development it crashed at random ( due to weak power sorce perhaps - im using FTDI232 but it will get its own stable power source so i will let you know if that was the case )

Another problem is flickering.. at lower levels its noticable , not much but still annoying.