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.
228 stars 104 forks source link

Severe pulsing when using multiple dimmers. #6

Open garrettdowd opened 5 years ago

garrettdowd commented 5 years ago

I am using this library with a Arduino Uno (AVR ATMEGA328P). I have come across two main problems.

1) The frequency of dimming drops (pulses are more noticeable) as more dimmers are used (single zero-cross with multiple output/"PWM" pins). Beyond 3 dimmers the timing is not consistent enough to use with dimmable LEDS. The pulses are clearly visible on incandescent bulbs.

2) The timing is unreliable. Adding dimmers seems to alter the timing of the dimming and thus the brightness. So a power level of 50% with 2 dimmers is visibly different than a power level of 50% with 6 dimmers.

I need to be able to use 5 dimmers for my project and at this point the library seems unusable for this case.

Is this somehow related the the interrupt capabilities of the arduino? Can a faster timer interrupt be set?

sircommitsalot commented 4 years ago

@garrettdowd I'm encountering this issue as well. Did you come up with a solution?

garrettdowd commented 4 years ago

@jkprow Yeah, I used a different library. https://github.com/circuitar/Dimmer

sircommitsalot commented 4 years ago

That library works great, thanks for the tip.

HFsi commented 4 years ago

Does anyone tested it in ESP8266?

fabianoriccardi commented 4 years ago

It seems that Circutar's library doesn't work on ESP8266 (neither ESP32), it's only AVR compatible (it depends on specific hardware timer). You may try this alternative