Introduction: Fireflies - Analog Version...

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

Step 1: The Chips

This circuit used two separate IC chips. A 555 timer and a 4026 counter. Both are actually pretty simple devices. It can be a little confusing and scary the first time you have to deal with ICs, but we will go slow.

The 555 chip is just a timer. It works by taking in electricity, and depending on the combination of resistors and capacitor you connect, it will output a pulse of electricity on pin 3. This is a very useful chip that has been perverted in a huge number of ways for many.. many purposes:
http://home.cogeco.ca/~rpaisley4/LM555.html

In this case, we are just going to use it as a basic timer just putting out a simple pulse. The pulse will go to the input pin of the 4026 counter.

The 4026 counter is pretty much what it sounds like. It counts. when power is applied to the chip, it will count up from 0 every time it receives a pulse on pin 1. Where it gets useful for us is that it will try to display that count on an 7 segment LED display it *assumes* we have attached to it. Now, if we instead attach a separate LED to each of these segment-outputs, it will appear to be flashing the LEDs randomly.

I know this is not true randomness, but you do have to watch it for quite a while before you see it repeat.

"But Photozz.. you said a 7 segment LED...Why are there 8 LEDs in the diagram"..

Thanks for asking, Timmy, I'll tell you. The eighth LED is driven by an output that is normally used for connecting to more counters. You could have several of the 4026s in a row, and each one would count to 10, then trigger the next.. etc..

Step 2: The "Fader" Part.

OK.. this took some screwing around. This circuit is not nearly as scary as it looks. It's basicaly the same as the previous diagram, but with a few added parts.

I cut the diagram down to just show two lights. Keeps it simple to understand. The value of the resistor is one of two factors that will affect the fade time. The other is the Capacitor.

On the output from the counter, there is a standard diode. This keeps the stored up charge in the capacitor from draining back into the counter chip.

The resistor mostly affects the "drain" time. This is how long the LED takes to fade after the signal is cut off. larger values mean more fade, as it takes longer to drain the capacitor, but slightly dimmer light.

The Capacitor mostly affects the "charge" time. When the pulse comes in from the chip, it will start to charge up the capacitor. the LED won't light up, for the most part, until the cap is charged. this leads to a fade-in effect.

Feel free to play with the values. I actually use a different value for each LED.

Step 3: ASEMBLY

I highly recommend laying this out on a proto-board first, like the one below, just so you can play with the values without having to unsolder stuff continuously.

Start by assembling the 555 circuit first to assure that you have a working "pulse". connect the resistors and capacitor. then run a LED between pin 3 (positive) and ground. then connect the power. If everything is right, the LED should blink. If not, disconnect the power and check all your connections.

Once you have a pulse, connect up the counter IC. output of the 555 (pin three) to pin one of the counter IC. then connect a few LEDs to the output pins. add jumpers as per the diagram for the power and see what happens. the LEDs should start blinking somewhat randomly. If not, disconnect the power and check all your connections.

Once you have pretty blinking lights, you could just stop here and solder it up. I'm not going to go into techniques for layout or soldering. There are a lot of other great tutorials in here for those skills, and it's getting late. I'm sleepy.

If you want the fade effect, then it's time to start wiring in the extras.
First, wire in the diodes. this is important, as you don't want the capacitors discharging back through the counter IC.

start wiring in the capacitors and resistors. Play with different values to get the effect you want.

Oh, and before anyone asks me, the animation below is a GIF. I made it in Photoshop, but there are a lot of other software packages that can do it.

Step 4: Add a Housing

Now that you have it assembled, it time to find a housing of some kind. Admittedly, this would have been something to think of earlier, but I just don't work that way, baby.

For this lamp, I took an old Weston meeter I had laying around. I removed all the old internal mechanism.

I then fitted the board to some of the old mounting points, and arranged the LEDs on their stalks to about where I wanted them.

For the front cover, I just removed the existing glass, then used some decoupage to past on a firefly pattern I had printed out on the computer using tissue paper. I can go into that technique later if anyone asks. I remounted the glass.

The power source shown is scavenged from an old DVD player. One of those cheap ones that you get from Walmart for $29.95. The laser had died. When I checked, it was putting out a nicely regulated 5v. perfect for this.

That's about it. I'm open to questions and suggestions. Good luck.