Blinking LED Resistor/capacitor question

Greetings.

I am helping my son with some Halloween props he is making and I need
some help.

He wants to make some flashing eyes that he can place in the woods
along a trail for a creepy hike the cub scouts are doing next
weekend. I have some ping pong balls and LEDs that I am going to use
to create the eyes. I want to use 9V batteries since I have several
wiring harnesses already so it would be easy to set up. (and I
wouldn't be too upset if they were lost in the woods)

The question is what resistors/capacitors would I need to have the
LEDs blink slowly. (there will be two LEDs in serial, one for each
eye) He wants them to be on for about a second and then off for 3-5
seconds.

Any suggestions would be greatly appreciated.

--Ed

I do not think this can be done with just a battery, capacitor, resistor & LED. I think you will also need a chip like the 555 timer: http://en.wikipedia.org/wiki/555_timer_IC

I am not sure exactly how to wire it up, but I know the 555 timer could be used for something like this.

I don’t know if there is a simpler solution though.

What i meant w/ that last line is that there is almost certainly a simpler solution, but I do not know what it is.

Yea, I was wondering if a simple timer chip would make more sense. I did find this reference:

http://www.cappels.org/dproj/simplest_LED_flasher/Simplest_LED_Flasher_Circuit.html

that was interesting, although I don’t know how to modify it to meet my requirements. I’ll continue to look around and see what I can find. I need to order the components tomorrow if I want to have a few built by October 9.

–Ed

555 chips are used for this purpose extremely often. They cost about 10 to 20 cents a piece and the method to use it to make blinking LED circuit is all over the web. Check out the wiki article on 555 timers for the equations on the actual timing part.

Jon

Ed,

The circuit you linked to was very interesting, but there will be little you can do to modify it. The 1K resistor is controlling how long in-between each blink - a larger resistor value will slow the blink rate. However, the length of the ON time is always going to be pretty quick. Maybe a higher value cap would give you a longer blink? You would probably need a very, very large cap to get anything more than a blink, I’m guessing.

If you go with a 555 you’ll have complete control over the timing, both ON and OFF. Other than the 555 itself, you’ll need two resistors and a cap (values would need to be figured based on desired timing), and probably something like a 470 ohm resistor (assuming 9V) to limit the current through the LED.

I have a ton of work to catch up on RIGHT now, but if I’m not too tired I can take a look at figuring those values later tonight. Say, 1 second ON, 4 seconds OFF?

TP

Thanks TP. I went ahead and placed an order for 555s earlier today since that appeared to be the right direction to go. The price dropped to $0.27 when ordering 100 so that’s what I did. :slight_smile:

Yes, 1 second on and 4 seconds off would be great. I would like to understand the formula at some point I can generally modify the on/off duration (or at least know what affects each). I want to be able to write up the process and submit it as an Instructable for the Halloween contest.

Thanks again for your help.

–Ed

It sounds like you already have it solved. I’ve been messing with Arduinos and Paul’s LEDs are bright (red, green, and/or blue) and work great without resistors. I think you can run the Arduino off a 9 volt battery. If you already have a spare Arduino lying around, then it would be programmable. You can also use the one I have for haloween.

Jim

Thanks Jim. I could do it with an Arduino but I want to make 12 sets of eyes to put around the path. :slight_smile: I guess I could wire several sets off one controller, but I wanted to learn about the 555 chip.

–Ed

The issue with what you want ed, is that due to how 555 timers the “high” part of the duty cycle (the part where the output is driven to a high voltage, lighting the LEDs) has to be of a time equal to or great than the low part of the duty cycle. However, I think the output is actually driven to ground during the low part of the duty cycle. If this is the case then it’s rather easy to do what you want. You will need to test this when you get your electronics as all of mine are at home while I am at college.

http://upload.wikimedia.org/wikipedia/commons/3/3d/555_Astable_Diagram.svg
That is the circuit you will be using. According to you we want 1s on and 4s off. This means we want the low time to be 1s and the high time to be 4s. I will show you the calculations for the capacitor and the two resistors in case you want to change these to different times. Pick a random capacitor value! For blinking leds I have used 10uF caps because they are pretty common. Make sure the cap voltage is higher than Vcc (input voltage). Other than that it doesn’t matter. Also, Vcc has to be between 4.5-15v for standard 555 timers. This means you’ll need to put a current limiting resistor(s) in place so you don’t roast your leds.

Anyhow, back to the topic! First we need to figure out the value of R2 by using the low time equation.
time on = ln(2) * C * R2
1 = ln(2) * (10/1000000) * R2
R2 = 144KOhm

Now we need to get the value of R1 by using the equation for the high time:
time off = ln(2) * C (R1 + R2)
4/(ln(2)
(10/1000000)) - 144,000 = R1
R1 = 433KOhm

You can round these variables a fair amount before you really start to notice.

Here’s the trick part:
The cathode (flat side of led) of the leds need to be connected to the output pin, and the anode needs to be connected to Vcc. Normally it’s in most circuits so the anode is connected to the output and the cathode to ground, but that would not work in the circuit and would turn the leds on for 4s and of for 1s.

I know this is a long email so if you are confused about anything just ask. I hope I’ve been more of help than confusing! haha

Jon

Jon:

Thanks for finding those equations! I am so tired right now…

Ed:

To restate Jon’s point - you’ll need to hook the LED up ‘backwards’, so that the light comes on when the 555 turns off and vice-versa. To do this, connect the longer lead on the LED to the battery, and the shorter one to the 555 output pin (put a 470 ohm resistor in between the LED and the 555 or your LED will quickly fry, probably taking the 555 with it). Basically, you will be treating the 555’s output as your ground for the LED.

Looking at the wikipedia image Jon linked to (a great find), I think you can leave out the cap connected to pin 5, leaving pin 5 unconnected to anything, to save on the extra part. I think… it’s good practice to have that cap and pin, but since you’ll be driving it will a 9V battery, it shouldn’t be necessary.

Also, feel free to round the resistor values Jon came up - as long as you stay in the ballpark you’ll get ‘close enough’ (like 150K and 440K).

Thanks again Jon!

TP

Oh, another thought - DebCo sells 100-count packs of resistors for something like a dollar… unfortunately they are not open on the weekends :frowning:

Ed, once this is done please document this on our wiki as well. I would love to have Jon’s and TP’s info posted on our site somewhere. When I was reading this thread I wanted to bookmark the thread :slight_smile: Great info!

Great point Craig. I will create a page to document this and everyone can add to it, fill in the gaps or clarify my interpretations.

–Ed