Dimmer controller lamp flickering issue

Madhav
Posts: 8
Joined: Fri Dec 07, 2018 12:04 pm

Dimmer controller lamp flickering issue

Postby Madhav » Tue Apr 12, 2022 9:35 am

Greetings!

We are developing ESP32 based Phase dimmer controller to control lamp intensity or fan speed.
Here we are facing problem of lamp flickering.

Please find following details of the functionalities/logic implemented to achive lamp dimming.

1. We are using ESP32 Wi-Fi module.
2. The application is to control the intensity of Lamp by changing the firing angle of a Triac
3. We are receive an GPIO interrupt at every 10 Milli-sec (50Hz signal) from Zero Crossing Detector (ZCD)
4. Earlier we have used timer to trigger triac on reception of ZCD interrupt and in ZCD GPIO ISR, however it is not working as desired and resulting into lamp flickering as timer ISR control is not that fine to trigger triac at exact timer interval.
5. Now we have implemented pwm method to control triac trigger.
In this process we reset PWM timer (ledc_timer_rst) with refrence to ZCD GPIO ISE and PWM signal triggers triac as per the PWM duty count.
6. With this method also we observe lamp flickering issue.
7. We observed that some times Triac's signal get triggered delayed by approximately 10% (shared signal's screen shot)
8. To minimize code length of ZCD interrupt function it is as simple as single line code as follows.

static void zcd_isr_handler(void* arg)
{
// Zero the PWM timer at the zero crossing.
ledc_timer_rst(ledc_channel[0].speed_mode, ledc_channel[0].timer_sel);
}
9. After adding any logic / function to check pin status, etc. in zcd_isr_handler() then flickering problem increases.


Request you to guide us and help to resolve lamp flickering issue.


Regards,

Madhav Lohar
Gladiance Automation(India) Pvt.Ltd.
Attachments
FalseTrigger.jpg
7.787m Sec duration shows delayed trigger pulse
FalseTrigger.jpg (156.59 KiB) Viewed 1792 times
CorrectTrigger.jpg
6.994m Sec duration shows correct trigger pulse.
CorrectTrigger.jpg (156.31 KiB) Viewed 1792 times

rpiloverbd
Posts: 101
Joined: Tue Mar 22, 2022 5:23 am

Re: Dimmer controller lamp flickering issue

Postby rpiloverbd » Tue Apr 12, 2022 3:09 pm

Hello, what power supply are you using? It's possible that there is no problem in your circuit and code but it's not getting enough voltage and current. Here is a small discussion regarding flickering that you may find helpful.
https://electronics.stackexchange.com/q ... n-flickers

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 330 guests