AC Led dimming (zero cross) : Flickering and flashing

Hello everyone,

I reactivated one of my old projects (had problems there too: post) ran into new set of problems.

My new setup includes a 3-color changable dimmable LED-Spot, which can be changed using fast switching (Warmwhite, Neutral white, Blue white). It is the only one I found which is not controlled using remote, Wifi, bluetooth.

The spot is a direct AC-Led using a Mb10F rectifier and DF6610E constant current driver. I was able to switch to the desired diodes and memory the last state using a Nano (otherwise it needs to be cycled). The problem once again is the dimming. The setup consists of:

  • Power relay: Switch on/off the spot
  • Rotary encoder: Set dimming level
  • Robodyn AC dimmer:link

The code is written using the example from robodyn.
This board uses a zero cross detection to delay the phase angle between two halfcycles. With the classic bulb there was no problem with the detection and the output signal to the bulb, but with the spot the signal seems to induce some inductive load and therefore distort the output. The beginning and end is usually not supported even by commercial dimmer (10-90% range), but I do not understand why there are spikes at the end of the phase.

At the lower periods it does not (visible) affect the light, but at the higher (8000us) the effect is clearly visible since the spikes are almost as high (and wide) as the desired signal itself. The spot is still very bright.

My question now: Is it even possible (recommended) to drive the LED-spot with my setup, or do I need a designated filter, smoother for the output signal?

20190227224549_71237.zh-CN.en.pdf (1.17 MB)

AC_LED_Dimming.ino (2.58 KB)

ADDON: a picture of the real circuit. The transformer is used to measure the AC-Signal via an oscilloscope

A lot of my code was from this post. Especially the timing and the interrupt of the zero cross.

I am not sure if it is possible with a bridge-driven LED, since I do not observe the signal fluctuation with a filament bulb.

I tested a few different configurations:

  • Removing the relay: Signal improved slightly. Still peaks and sometimes a full wave slips through. Maybe the inductance of the switching coil and that everything is powered over the 5V of the Nano induces some troubles
  • AC-LED: Flickering in the range of 0-2500us and 8500-9800us delay. Therefore the valid range is between 25-85% of the max lumination. (Standard dimmer 10-90%)
  • Filament-Bulb: Signal still shows behavior of my measurements above (no true cutted sine, peaks), but not as dominant than with the LED.
  • Commercial AC-dimmer: Smooth dimming in increments of the switch position. The measured sine wave shows a nice cut of the sine wave.

The flashing, regardless of the delay time still persists. I was able to catch a flash with my osci and it showed a full wave was slipping through.

My conclusions:

  • The AC-Dimming board (with bridge and Triac) is a nice toy to experiment, but not applicable to serious projects
  • The interrupt of the Nano is too slow or too unreliable to trigger such fast signals.
  • The LED or Bulb needs additional filtering to remove unwanted parts of the signal

Possible solution for Nano application:

  • DC-LED with dedicated LED-Driver and external PWM input to control via Nano
  • Controll the potentiometer of a commercial AC-Dimmer with a bridge and the PWM of the Nano
  • LEDs with bluetooth/Zigbee connection already in the bulb. Controlled via remote (This is my least favorable solution since I want my connections cable based) (

Are may conclusion somewhat reasonable?
Are there better solution to Cable (uC)-controlled LED lighting?

Hi,
I think the problem is a standard dimmer system assumes a resistive load, that is a power factor of 1.
This means that the current and voltage waveform are in phase and the triac circuit can track and turn off at zero current when voltage is also zero.

However an LED light does not have a power factor of 1, more likely less than 0.75.
This means that voltage and current are not in phase and so a triac cannot turn off when needed.

There are dimmable LED globes.
https://www.luxreview.com/2016/02/16/10-things-you-must-know-before-you-dim-led-lamps/

Tom... :slight_smile:

Thanks for the nice article. That cleared up a lot.

Looking inside a LED-dimmable driver revealed also that there is far more hardware inside as on my board. I would prefer DC-LED driven by a driver, but I was unable to find a LED (spot) that I need. The only ones I found were remote controlled ones.

The only LED spot that has three changeable white settings was an AC-LED from China, and I thought I am able to build a dimming/ switching board myself.

I looked at the LED renowned manufacturers here in Germany, but was unable to find the product I need. Most either have full RGB capability (which I probably never use) or are only dimmable/ switchable via remote.

I still do not understand that there are so many remote but almost no wired options?

you could disassemble the 'AC LED' and use the DC side only.

for AC dimming this 'library' implements the dimming with AVR timer registers:

I think it is the same code as in the second sketch in the Stack Exchange answer

Update: I was unable to generate smooth dimming conditions with the Robodyn board. Commercial dimmer worked better but still not satisfying (see answer #5 from TomGeorge).

I currently testing a constant voltage and a constant current DALI driver in order to build some light elements myself. Here I am still weighing on the better drive option.

In conclustion: I will use the TRIAC controlled dimming only with filament bulbs and use DC-Driver for SMD-Led applications.

Thanks for the help