Result
I’d never made a permanent blinking light circuit before, so I thought I’d try adding cool, blinking lights to a pin from my FIRST Robotics Competition team. It turns out that a 9-volt battery is too heavy for a pin, so I ended up making it into a necklace.
In order to hold everything together I used a lot of hot glue. I made the electronics as small as I could on a little piece of perfboard.
One problem is that the only way to change the battery is to pry the existing one off and glue a new one on (I didn’t have room for a holder).
Circuit
I used a 555 timer IC in as an astable multivibrator with a bypass diode to get a 50% duty cycle.
The six LEDs are connected to the output of a standard 555 timer based astable multivibrator. When the output goes high, however, the voltage across the LEDs is lower because the “high” output of the 555 timer doesn’t go all the way to the supply voltage though it does go all the way to ground when the output is low. As a consequence, three of the LEDs light dimmer (I should have used smaller resistors for those). This is more noticeable at lower supply voltages. The diode is present in order to achieve a 50% duty cycle. Capacitor C1 charges through R2 and discharges through R1.
555 Timer Theory
The THR output turns the Q output high when higher than 2/3 of the supply voltage and turns it low when lower than 1/3. The DIS or “discharge” pin is connected to ground when the Q output is high so that the capacitor can discharge.
The time it takes for the capacitor C1 to charge through R2 or discharge through R1 can be found by solving the following series of differential equations for Vc.
Vr = I * R (for the Resistor)
I = C * dVc/dt (for the Resistor)
Vs = Vr + Vc (Resistor and capacitor are in series, so voltages add up)
Yielding,
Vc = Vs + (Vo – Vs) * e ^ (-t / (R * C))
C1 charges from 1/3 of Vs to 2/3 of Vs. Therefore, we substitute Vo = Vs / 3 and Vc = 2 / 3 * Vs and solve for t yielding:
t = ln(2) * R * C
Therefore, assuming R1 = R2 so that the duty cycle is 50%,
The period is: T = 2 * ln(2) * R * C
The frequency is: f = 1 / ( 2 * ln(2) * R * C)
For a more detailed explanation of the 555 timer, see this page.



