RobotDynOfficial / RBDDimmer

The following library is used for work with dimmer, it gives ability to control large ammoun of dimmer. This lib uses with Leonardo, Mega, UNO, ESP8266, ESP32, Arduino M0, Arduino Zero, Arduino Due, STM32.
236 stars 111 forks source link

Strange behaviour with my LED lamp #1

Open igorantolic opened 5 years ago

igorantolic commented 5 years ago

These are test results with ESP8266 160 Mhz (and also same using 80 Mhz)

With LED bulb (IKEA RYET LED 400lm, 5W, LED1628G5, 220V) 0-28% nothing 29% bulb is on/of with frequency about 2-4 Hz 30% about 80% light 35-99% = maximum light.

With classic bulb - wolfram - (which you canot buy anymore in my country) 0-40% = nothing 40-100% = linear dimming

So great for old bulbs, terrible for LED. Is that as expected by design?

JimmyBondi commented 5 years ago

Yes it is! For LED bulbs you need a special dimmer AND dimmable LED bulbs.

garrettdowd commented 5 years ago

I bought your device - https://robotdyn.com/ac-light-dimmer-module-1-channel-3-3v-5v-logic-ac-50-60hz-220v-110v.html

I am trying to use this library with dimmable LEDs. I am running it on an ESP8266. However the code is not functioning as expected and the LEDs are flickering.

What dimming method does this library use? Skip Pulse? Partial Pulse?

VSneg commented 5 years ago

For LED bulbs you need a special dimmer AND dimmable LED bulbs. (c) @JimmyBondi Dimmer use the Pulse Position Modulation using Zero-Cross signal, in easy way saying) https://oscarliang.com/pwm-ppm-difference-conversion/

garrettdowd commented 5 years ago

@VSneg so you are saying that this library does not support PPM? Could the library be modified to support PPM?

VSneg commented 5 years ago

@garrettdowd sorry, but not, maybe in the future we make another library only for LED lamps.

garrettdowd commented 5 years ago

My DOB LED does support trailing edge dimming. Could you provide a visual example of what this code is doing the the AC waveform? onTimerISR() in RBDmcuESP8266.cpp is a bit confusing.

VSneg commented 5 years ago

@garrettdowd https://www.youtube.com/watch?time_continue=36&v=dXSpunGnRd8

VSneg commented 5 years ago

@garrettdowd LED lamps got their own power driver that's why classical AC dimming may not work or give unexpected results. If you got a dimmable led bulb, it's better to check vendor's instruction to get the dimming working properly.

garrettdowd commented 5 years ago

From the video, it looks like this is leading edge dimming? Most dimmable LEDs use trailing edge dimming from what I understand.

ageurtse commented 5 years ago

Well, i build a leading edge dimmer with led light's which is working great. But i used a attiny dedicated for dimming. When dimming with this library on a ESP8266 i als notice some flickering. i think this is due of code that is holding up the dim timmer.

this is a know problem

vaibhavsharma98 commented 2 years ago

ESP8266 is not good in this library, Esp32 works well with same code