Instructables
Or, How to randomly flash 8 LEDs

OK. I'll admit that the fireflies in a jar thing has been done already. The difference here will be that this version will be done entirely with an analog circuit.

For anyone without a lot of electrical knowledge, what that means is that you can do the firefly circuit without needing to buy a PIC micro controller or do any programing on your computer. This circuit can be put together entirely from parts available at Radio Shack for a reasonable amount of money.

The one or two I have built are being used in enclosed projects with a translucent lens. I'm using them as night lights. The one pictured below is built from an old Weston meeter. You could easily use the micro LEDs and finer wire to simulate free-flying fireflies. I used green and yellow LEDs, and arranged them so some are closer to the front than others. The effect is somewhat hypnotic and organic. like there is something really alive in there.

The primary difficulty in designing this was in finding a way to randomly flash the LEDs. Much of the project was based off the very good instructions found here:
http://www.kpsec.freeuk.com/projects/random.htm

The Decade counter chip (LED driver) can actually drive up to 8 LEDs. I kept it to 5 just to keep the size and complexity down.

The second difficulty was finding a simple way to get a fade-effect in the LEDs. After a long series of fruitless searches and overly complex ideas, I found a few posts suggesting the use of a large capacitor and resistor combination. I worked it in, and the results were good enough. It does require some experimenting, though, to get the effect to work to your taste.

Parts List:
1 lm555 timer chip
1 cd4026b combined counter and display driver IC
16v 47uf capacitor
2 - 10k resistors
Jumper wire, a few feet.
LEDs. used 5-6 here, but with some creativity you could add more.
5-6 large capacitors. I'm using 1500uf
5-6 resistors of varying values
5-6 diodes.
5v to 9V DC power source of some kind. You can use 4 AA batteries as well. It's not that fussy. I would not go any stronger than 9V without a 7805 power regulator or something.

Equipment:
Soldering Iron
Solder
Wire Cutters
Housing of some kind
 
Remove these adsRemove these ads by Signing Up
geovatt2 years ago
radio shack does not carry the cd4026b that i can find
emada.adame2 years ago
so i got the 555 part working but when i connect 2-8-15 on the counter to ground all the lights stop blinking. what am i doing wrong?
circuit5553 years ago
hi good work could you post a few more pics of the breadbord layout
thanks having trouble converting circuit diagram onto bread board ,do have any suggestions
Montrose3 years ago
Hello
I built this circuit but I only get a flash if I
1: Disconnect and re-connect the reset pin on the 555 over and over again.
2: I Disconnect the output pin from the 555 to the counter then I get a rather fast sequence.
Do you have any suggestions?
Thanks
skkeairns5 years ago
It doesn't blink. Cap?
Jack Place5 years ago
so your saying to change the 47k Restore to a 10k and the CAP to a 47uf then each line to have a 1500uf with a range of Restores starting form where?
Wheats5 years ago
I have built a number of the controllers but would like some advice on the in-line cap-restores. this is a first hobby and not sure where to start. the lights all come on with different flashing and could use some help on which cap and restore by lead number W
raphihell6 years ago
that 1500uf cap is sort of pricey if you are going to start geting into dozens of them... any suggestions on how to tweak this to get away with a smaller one? what about some r/c combo with a transistor? R
1F caps are quite cheap....
start collecting old junk and stuff - soon youll have a pile of old pcbs and you will be able to get all sorts of stuff off them
raygromer7 years ago
If you want more lights, you could use two 4026s and two 555s (or a 556 dual timer). By using different resistor & capacitor values, one 555/4026 pair would run faster than the other pair, giving more randomness to the LEDs.
John Smith7 years ago
Where did you find the counter?
That's Interesting, I'm guessing that the 57K produced by the resistors is doing the current limiting that you need on the LEDs? There isn't an LED in the world that I know can take 9V....but then again, my world of LEDs is limited to 18,000 mcd and lower.
photozz (author)  SoundTechie20077 years ago
nope.. the 57K actually helps regulate the pulse length with the 555. The 4026 has an internal regulator and is designed for driving LED's. It will output a constant voltage to the LED's regardless of the input voltage. For that reason, I usually limit the input to 5-6 volts so the chips don't heat up too much. Some resistors may be necessary depending on what type of LED's you use, but I found with standard red/yellow LED's it's not really necessary.
theres actually a simpler way to make flashing LEDs you can buy LEDs that flash for a few pennies extra each sp get ones of different times for one big circuit with a single switch or get a set of flashing ones and ten switches, this is one for people that don't like using even simple chips but the 555 one works well as i used it in technology class and my teacher was absolutely lost as to how i created a horse racing game that looked random (relays added and a few random input changers but settled on the microphone as it made the timer completely randomised by the pulses
photozz (author)  killerjackalope7 years ago
Yes, FLEDs are a cheap solution, but you can't make them fade in and out, and the timing of the flashes is fixed. Using the 555 and other discrete components, you can get a better effect. FLEDs would give more of a computer like blink instead of an organic fade.
yeah but a handy option for the less observant person if you have a few real fading ones in the front
Daddio_UK7 years ago
Seeing that cat reminded me of when my cat bit through the xmas lights lead .. mains ones, he came home again after 3 days, after a rapid exit. Sorry, irrelevant comment.
Irrelevant, but very funny nonetheless! LOL >oD
very very cool
photozz (author)  master-of-chaos7 years ago
thx!
vortexz_837 years ago
So I've been meaning to make some kind of random lighting feature for a while now, but I've had all kinds of trouble (mostly motivational, I admit) getting my ISP dongle built so I can use a microcontroller. I'm a mechatronic engineer, so it could be considered sacrilege to say it, but I love the idea of doing this with prepackaged ICs. Nice and clear instructions, too. (Except for the fact that you never mention why you're using a 5V supply on a circuit rated at 9V. Not that it matters, I know, just might confuse a couple of people when the diagram says 9 and you say 5.) So here's the main reason for my post: Great simple idea, but the random sequence isn't anywhere near long enough for my liking. So my plan is to implement it with two 555s running at different frequencies (even better, have a pot on one or both of them to make it variable), fed into two separate 4026 counters, then combine the results with a pair of 4070s (quad-XOR chips). That way if you have, for example, one path with a cycle time of 10 seconds and one with a cycle time of 13 seconds you'll have a combined cycle time of 130 seconds. That should be nice and long, hopefully long enough that my brain doesn't pick out the pattern easily and see it as an annoyance rather than a soothing distraction. Just thought I'd flag the idea here in case anybody else was interested in a potential extension to this Instructable.
I have two suggestions for you, one minor upgrade, and one nearly complete change of the project. 1) A possibly more efficient way to get apparently random sequences is to build a pseudo-random bit sequence counter. Google it to find out the details, but in short you take a bank of flip-flops as your state register and a bunch of XOR gates to interconnect them in just the right way that the bank will go through every possible binary value but do it in an apparently random order. (It's still clocked by a 555, or half a 556) 2) A somewhat different project that I've always wanted to do but never followed through on is individual 'fireflies' with CdS light sensors that allow them to synchronize. How? The resistive light sensor is used to set the off period of the 555 such that it shortens (hurries to the next blink) when another firefly blinks. You can Google pulse-coupled oscillators, and I also highly recommend the book Sync by Stephen Strogatz, which covers this exact phenomenon happening with real fireflies. I know this circuit has been done before, but I don't have any references off the top of my head. So now you've got these fireflies with batteries all over your room that should synchronize but only if it's dark enough that the ambient light doesn't wash out the coupling... as a last touch, they could be powered by solar cells that charge up a capacitor during the day and have an anti-hysteresis circuit to switch them on when it gets dark. At best, this would probably work out such that for the first 30-45min the circuits can't synchronize because there's still too much ambient light, but eventually they should. A good reference for the charging circuit is the Wikipedia page on solar engines, but don't get sidetracked by BEAM robots. I'd love to hear if anyone successfully implements some or all of these ideas. Maybe I will if I get motivated and have enough free time.
photozz (author)  vortexz_837 years ago
Yeah, sorry about the 5v/9v thing. That's what I get for using other peoples graphics. You can run it off 9v. Both chips are rated for it, but I usually prefer to run at 5v. Less chance of cooking things. If you want to save some space, go with a 556. it's two 555 in one package. You could also have the second 555 circuit triggered off the decade pin on the first counter. This can be configured so many ways its silly.
photozz (author)  photozz7 years ago
Fixed the instrucatble to list it as 5 to 9 volt. :)
Keso7 years ago
Nicely done, I particularly like the retro case you found to house them in. Quite classy. Kudos!
photozz (author)  Keso7 years ago
Thanks. It's the result of lot's of dumpster diving. :)
jarv347 years ago
great instructable, I think I might try this one out..
photozz (author)  jarv347 years ago
Thanks!
wayn3w7 years ago
Check the roller caption/tag/thingy with the capactor: it can't be 47K. My guess is that you are using 1 uF... but the 47K is for the resistor above it.
photozz (author)  wayn3w7 years ago
Thanks, Fixed. It should have been 47uf. I was typing late at night :)
jeffreyf7 years ago
Great Instructable! I love the animated gif too.

If anyone is curious how to make them, there are two Instructables up about them:
http://www.instructables.com/id/E6V837A9HDEP287PCC
http://www.instructables.com/id/EGYVYFWI2EEP286DZL