3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Flickering LED Candle

Flickering LED Candle
Take a dollar-store "flickering" LED candle, add an AVR ATtiny13 and a little code, and you get an LED candle that looks almost real.


 
Remove these adsRemove these ads by Signing Up
 

Step 1Open up the candle casing

Open up the candle casing
A thumbnail seemed to be the best tool for this job. The casing isn't glued. There's just a friction-fit post that goes into a receiving hole in the cover. Work around the cover edge and the base part will begin to come loose. Don't get into a hurry because the wires connecting to the LED module inside are very fine and easy to break. We'll be re-using these wires, so be careful.
« Previous StepDownload PDFView All StepsNext Step »
25 comments
Nov 6, 2011. 8:43 AMsteve0701 says:
The latest tea lights from Dollar Tree have eliminated the circuit board, but they still flicker. HOW? There is nothing but an LED, a CR2032 button cell and a switch. The plastic case is the same as in your photos.
Dec 10, 2011. 6:37 PMmguima says:
I think that the led has a built-in chip for flickering the light. Just as those multi-color-changing leds that does have a built-in chip too.
Dec 11, 2011. 7:35 PMsteve0701 says:
Yes, that's it! Totally amazing, a little chip encased in the diode. Thank you for pointing this out.
Oct 21, 2008. 8:30 AM2wistd says:
I wanted to use one of these with a solar panel out of a garden light and have a remote way of turning off several (like 100 at a time) of these....any ideas would be welcomed
Jun 16, 2011. 5:15 AMscottinnh says:
Replying to an old post I know, but what he said about the common PS.

Then, wirelessly control the PS on the cheap by using a low cost RF transceiver pair from Sparkfun or Modern Device (check out the Arduino JeeNode!)
Aug 1, 2009. 2:07 PMTravis_Flepper says:
hundreds of leds rock! just get a common power source and wire everything together and put a switch on the power unit
Sep 6, 2010. 12:26 AMGrantLevy says:
Does the flame have a slow or fast flicker, or both? It's hard to tell from the video you uploaded. Is it possible to slow the flicker down, or make it flicker less often? (Of course, that maybe what "flicker2.zip" does in one of it's 2 patterns.) Could this circuit drive a warm white LED? (The amber LEDs used in most of the LED candles I've seen are amber or orange.) Of course if one could make up a whole group of these with orange and amber LEDs and put them into a group to make a glowing embers effect for a fire place. Thanks for a great Instructable! Viva LInux!
Sep 20, 2010. 1:18 AMGrantLevy says:
Thanks, SolidSilver. I'm looking forward to making this. I don't have any experience with coding, but I'm sure that if I follow your directions it'll all work just fine.
Mar 26, 2010. 4:03 PMtrainables says:
Step 4, learn Latin.  (Sorry, I don't know Latin well enough to teach you.)
Oct 11, 2008. 12:46 PMMixMasterM says:
I just whacked this up on a breadboard using an ATtiny45 (pretty similar to the 13 you used, but lots more memory so I can do more eventually). I adjusted the Makefile for the device and the 8MHz internal clock and it flashed and works for a while. However, after a couple minutes, it seems to lock-up and the LED just stays at one brightness. Pulling the 5V briefly resets it and it runs for a while longer. This is my first time using AVR and also programming a microcontroller in C (I used asm on PICs before) but I'm wondering if the gcc is generating a leak of some sort that eventually causes something to fill-up/overflow/whatever and that's what locks the AVR up? Has anyone else seen any problems like this? Any tips/input/ideas? Anyway, this is a nice Instructable and one I've kept bookmarked for when I finally got my USBtiny built and working (aka earlier this morning ;) ) Mike
Jan 5, 2010. 7:37 AMspandox says:
How are you storing your timers?  What do you do if your time to wait is negative?

Both millis() and micros() are unsigned long
check for overflow.

int moo;

if (millis() - moo > DELAY)
{
   moo = millis();
}

Will lock up on moo overflow.

better:
unsigned long moo;

if (millis()  - moo > DELAY)
{
   moo = millis();
} else {  if (moo > millis(){moo=millis();}}




Oct 20, 2008. 6:35 PMMixMasterM says:
Hi SolidSilver, I just tried the new code on the Tiny45. I re-compiled it again after adjusting the makefile for 8.0MHz and attiny45, using the AVRmacpack. It's running nicely and the new feature with the "low ficker high" and "high flicker low" works fine. I've run it for over 5 minutes without any lockup. Not sure if it was something with the gcc generated code or maybe I had some noise in the circuit (I have a couple fluorescent lights on the same 120v circuit and have seen the project lock-up when I switch a light off). Anyway, I definitely like the "low flicker high" mode best, so I'll modify the code to use that entirely. Now to find a good LED/etc. to make an old "Pirates of the Carribean" lantern for my back porch. Thanks for the great project and continued work!
Sep 11, 2008. 7:50 AMzanfr says:
a while ago i saw a similar tutorial but done with a zener diode i believe, the idea was to build a zener-based "noise" generator and use it to power the LED
Nov 18, 2009. 1:57 AMsubrotos says:
 Zanfir:
Can you publish a link for the zener based circuit? (I'm requesting on a year old comment -- sorry about that.)

Subrotos
Sep 11, 2008. 10:36 AMzanfr says:
well it woudl likely flicker alot more; of course sometimes it would drop below the "starting" voltage of the LED but only so briefly i dont know if it would be objectionable
Sep 4, 2008. 12:12 PMStrublay says:
Very nice Instructable, on a project that not many people have posted about (I've found plenty of massively complicated flicker circuits on other sites for big projects but no small [as in one led] applications.) This is going to help make my Halloween projects a lot cheaper and less.... combustible... Thank you!
Sep 3, 2008. 4:44 PMTool Using Animal says:
You might want to move a picture into the first step so it displays in the listing.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
1
Author:SolidSilver