I'm building the circuit for a star trek model and need to get,the flashes for the navigation lights.
So if its out by a fraction of a second, no one is going to notice.
You could put some trimpots in there if you want to be able to adjust the flash rate a small amount. But just going for the closest values in solid resistors will probably be close enough.
To work out your resistor value. Take the 9v rail to rail voltage, and subtract 4v for your LED. you now have a 5v difference, between one side of the led and a rail (Doesn't matter which way you do this, I like to put current limit resistors on neg side). Which you want to current limit to 100ma. amps x resistance= voltage drop across the resistor. So 5v / 0.1a =50 ohm resistor.
So lets check that in the
sim and we can see its pretty close. there are a few things to address though. There are no 50 ohm resistors in my catalog. 51 and 47 are both common. We want the 51. except thats for exactly 9v, and is actually right on the limit of what the LED can take. As it only on 20% of the time, it may take a bit of punishment, or it may not. At $3 each, lets not find out. 56 ohm is the next value on my list. so 5v/56ohm=a fraction under 90ma. Much safer, you can now put a battery with 9.2v in before the led is in blow out territory... Except a fully charged 9v battery can show as much as 9.8v.... so we still need to get bigger resistor. lets try working it out for 10v battery, just to be safe. 10v - 4v led leaves 6v to current limit. 6v / 100ma is 60 ohms. I have a 62 ohm resistor in my cat, so lets use that. Your led will now survive a full battery being put in, but what happens as the battery goes flat? Try changing the input voltage to 7v and see how much current is still flowing.. 7v -4v = 3v/62ohms= 48ma. so at 7v your led is half as bright..... With the load you are putting on the 9v battery. You can expect to have it down to 7v after a few hours running. This may be ok for you. those leds at half power are still pretty bright. If its not, you have options. First and worst, overdrive the led at higher voltages, wit the lower value resistors. This may work as it has cool off time between pulses, but the pulses are fairly long, and its likely to smoke around the 100ma mark. The other option is voltage regulator. a cheap 9v regulator, that can take input over a range from 5 or 7v up to 10 or 12v. and put out a steady 9v. or 8v. an 8v regulator will be easy to find if your salvaging for parts.
I have actually been on the hunt for a good 9v regulator, for use with 9v batterys and 555. I'd like something that can go from 5 or 7v up to 10v and put out a flat 9v. I figure it would be a common need, so there is likely cheap regulator to do the job. I'm not finding it though, so if any other members now a good one, I'm open to suggestions
Try working out some of the maths yourself, then check in the sim, then check it in real life (Sims are almost always a little bit wrong). Hopefully by the time you finish the project, you will be better with ohms law, and 555 timers. As well as having tools to check your own work