Boneyard Tools

Designing a 555 astable oscillator

How the 555 charges and discharges its capacitor, how to choose R1, R2 and C, and how to reach a 50 percent duty cycle.

How the astable oscillates

In astable mode the 555 has no stable resting state; it flips back and forth on its own. The timing capacitor charges toward the supply voltage through R1 and R2 until it reaches two thirds of Vcc, at which point the chip's upper comparator trips and the output goes low. The capacitor then discharges through R2 into the discharge pin until it falls to one third of Vcc, the lower comparator trips, and the cycle restarts. Those two thirds and one third thresholds are why the natural log of 2 appears in every timing equation.

Choosing R1, R2 and C

The frequency depends on the product (R1 + 2 R2) times C, so many combinations hit the same target. The practical trick is to fix the capacitor first, then compute the resistors. Pick a larger capacitor, such as 10 uF or more, for slow visible blinking, and a small one, such as a few nF, for audio tones and higher frequencies. Keep the resistors between roughly 1 k and 1 M: too small and the discharge current stresses the chip, too large and stray leakage and capacitor tolerance start to dominate the result.

Getting a 50 percent duty cycle

Because the charge path uses R1 and R2 while the discharge path uses only R2, the standard astable can never output a symmetric square wave; its duty cycle is always above 50 percent. Making R1 much smaller than R2 pushes the duty toward 50 percent but never quite reaches it, as the near 50.365 percent blinker example shows. To get a true 50 percent wave, place a diode across R2 so charging bypasses it, which makes the charge and discharge paths symmetric.

Practical limits and tolerances

Real components rarely match their printed values exactly. Carbon film resistors are typically 5 percent and metal film 1 percent, while electrolytic capacitors used for slow timing can be off by 10 to 20 percent and drift with temperature and age. Stacked together, these tolerances can move the built frequency several percent from the calculated figure. For timing that must be precise, use low-tolerance film capacitors, trim one resistor with a small potentiometer, or measure the output and adjust.

Frequently asked questions

Does the supply voltage change the frequency?

Barely. The thresholds are fixed fractions of Vcc, so the charge and discharge times track the supply and cancel out. The frequency is set by R1, R2 and C, which is why supply voltage does not appear in the formula.

Can I use an NE555 and a CMOS 7555 interchangeably here?

The timing formula is the same for both, so the calculator applies to either. The CMOS 7555 draws far less current, works to higher frequencies and tolerates larger timing resistors, but the astable equations do not change.

Why is my measured duty cycle a little off?

Component tolerance is the usual reason, along with the small time the capacitor spends crossing the exact thresholds. Using tighter tolerance parts and keeping R1 well below R2 brings the measured duty closer to the calculated value.