A project with which I've been involved is an interactive portrait gallery, with seventy mains LED lamps, turned on and off using VO2223A optocoupler/phototriacs, driven by a microcontroller. The lamps draw only 20mA each, which was one of the reasons they were chosen (negligible heat generation in the display).

All works fine, except that the clients would like the lamps to turn on and off slowly (over a half second, say) rather than simply jolting on and off, as the optocouplers switch the mains.

Below is a small schematic of the lamp circuit, showing the arrangement described above, and (on the right) what I'd like to be able to do. (Note that I've left out lots of components (such as the current-limiting resistors on the PIC outputs), to keep the diagram simple.) lamp circuit http://www.scifun.ed.ac.uk/downloads/atiyah/LED-lamp-switching.gif

Is there a circuit or component that could be installed inline with the mains supply to all of the lamps (via the optocouplers) as shown, such that there would be graceful rises and falls in current, rather than step changes?

As you can imagine, I'd rather that I didn't have to consider some individual circuitry on every lamp input, seeing as how there are seventy of them...

  • \$\begingroup\$ Bit of a case of "don't start from here" - your mains LED's have driver circuits which, as Andy AKA suggests, may not allow dimming via the mains supply. Driving the LED's directly from a driver of your own design would be a better way of doing it, but of course it's probably far too late for that idea... \$\endgroup\$ – John U Sep 24 '13 at 16:23
  • \$\begingroup\$ I know what you mean (as in "don't start from here"); the thermal advantage of the lamps (and it is helpful given the gallery construction) is more than nullified by the extra problems in controlling the display... \$\endgroup\$ – Peter Reid Sep 24 '13 at 17:24
  • \$\begingroup\$ Test #1: Buy a cheap mains dimmer switch and see how the LED's react to that. \$\endgroup\$ – John U Sep 25 '13 at 10:25

There may be one big flaw but first the triac circuits....

It's tricky when using AC and triacs. Once you trigger a triac (with gate current) it stays "on" for the rest of the half power cycle of AC so there are two ways I see that may work: -

  1. You get your micro to monitor the AC waveform and trigger the triac very late in positive and negative cycles to push smaller currents into the LED. Progressively move the trigger point closer to the start of each half cycle as you want brightness to increase
  2. Similar to above but skip cycles of power completely.

And now the potential bad news. Dependent on your LED rectifier and current control circuit it may still try and push constant current into the LEDs until it can't do any more and then switches off. OR it may gracefully allow light intensity reductions below a certain a trigger point on the AC waveform but this may all be very cramped and difficult to control repeatedly. OR you might get smoke (hope not).

  • \$\begingroup\$ Thanks for the info. I take your point about the triacs, and I don't have huge confidence in the quality of the circuitry in the lamps to begin with: in the first three months of use, two of the lamps have failed (one is permanently dimmed, and one goes through periodic on/off flickers), and that's only when being turned on and off once a day. I wouldn't hold out much hope in trying to interfere with the output in a more... imaginative way. Cheers. \$\endgroup\$ – Peter Reid Sep 24 '13 at 17:27
  • 1
    \$\begingroup\$ If the LED lamps aren't rated as being dimmable, you're pretty much out of luck. You'll have to pick a different lamp. \$\endgroup\$ – Dave Tweed Sep 24 '13 at 19:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.