This is a generic question that has nothing to do with Arduinos. In my Halloween display I have 2 flicker LED's that I use for fake candles on my cemetery gate. These LED's have some sort of tiny IC inside that makes them flicker like a candle. Unfortunately I don't have a datasheet on these... I got them from a friend. They look like regular LED's except it's a bigger package and you can see some sort of white chip inside the epoxy. I'm using a 12V 2A regulated switching power supply (I know it's overkill, but it's what I had on-hand) and a 470ohm resistor for each LED.
Now the issue... When I cut power to my display, the LED's slowly fade off over about 10 seconds. In actuality it takes about 3-5 MINUTES for the voltage to drop below 1V from the power supply. It takes a full 20 minutes before voltage drops below 10 milliamps. (I hooked up my multimeter to find out). Anyway, this causes a problem. If power slowly fades away from the LED, the IC in the LED gets "locked" in an off state. When I reapply power later, the LED's will not turn on an appear dead. Unplugging the power supply and replugging it in does not fix the problem. The only thing that will fix the problem is disconnecting one of the power leads to the circuit (cutting power instantly versus slowly fading away). Now when reconnecting the wire, the LED's will fire up and all is good again, until the next time the power supply is cut and the power slowly trickles off.
I need to fix this so I don't have to keep going out there and manually resetting the LED's when I power on my display. I first thought of using a 9V zener diode, but it doesn't seem to be working as expected. When hooked up backwards, the LED's still power on (albeit with a slight voltage drop) and they still fade off slowly. I was thinking that once the voltage dropped below 9V the current should stop flowing across the zener, but that isn't happening.
What am I doing wrong and what should I be doing to fix this problem? My friend wants to use a 12V relay to solve the problem but I think that is excessive and wasteful. Thoughts?
What am I doing wrong and what should I be doing to fix this problem? My friend wants to use a 12V relay to solve the problem but I think that is excessive and wasteful. Thoughts?
I think your friend is wise and resourceful. The poor relay gets so little respect in the arduino world.
How about another solution, use a DPST (or of course a DPDT) switch for your main power switch and use one side for applying or removing AC voltage to your power supply and use the other side of the contacts to route the +12vdc on and off to your led(s).
The choice of relay or switch being the best choice depends on the physical location of your AC power source, power supply and existing switch locations.
When I cut power to my display, the LED's slowly fade off over about 10 seconds.
For stability reasons, SMPS do not have a very big capacitor on the output so they tend to die off (voltage drops off) fast. 2 - 3 seconds would be long, in my view and 10 seconds are extreme.
Typically here the solution is to bleed it off, with a small resistor but it wastes energy. Maybe you can parallel a few more of those LEDs and run them at higher current levels.
I'm surprised as well as to how much of a charge this thing holds. I actually have several of them and they all do the same thing. I could probably put on some more LED's (I have about 48 more of them, lol) but I don't have time to build that many candles. Maybe I'll just put on a double throw switch to break the contact to reset them manually.
Try a resistor across the supply terminals, maybe 180 ohm 1W, or if that doesn't work then 100 ohm 2W. As dhenry says, this is inefficient, but should work. More complicated solutions are possible that wait until the voltage drops a fair way before draining current.
Thanks for the suggestions. Can somebody tell me why the zener diode didn't solve the problem? I thought the zener diode would prevent backflow until you reach the breadkdown voltage -- I thought that was the whole point of a zener diode? I'm just wondering why it didn't work. Maybe I needed a zener that could handle more amps, since the power supply is 2A? Did I maybe blow the zener?