555 Timer Astable Simulator Back
Electronics

555 Timer Astable Simulator

Design a free-running oscillator built from a 555 timer IC in astable mode. Adjust resistors R1 and R2 and capacitor C to see the oscillation frequency, period, charge and discharge times and duty cycle update in real time, with the capacitor voltage and the output square wave animated live.

Parameters
Resistor R1
Upper resistor of the charging path (supply to discharge pin)
Resistor R2
Resistor used for both charge and discharge (discharge pin to threshold pin)
Capacitor C
µF
Timing capacitor that charges and discharges
Supply voltage Vcc
V
A standard 555 runs on 4.5-16V. It does not affect the frequency
Results
Charge time (output H) (ms)
Discharge time (output L) (ms)
Period T (ms)
Oscillation frequency f (Hz)
Duty cycle (%)
Frequency band
Oscillation — capacitor voltage and output waveform animation

Top: the capacitor voltage charges and discharges as a sawtooth between the 1/3 Vcc and 2/3 Vcc thresholds. Bottom: the output square wave is HIGH while charging and LOW while discharging. The waveforms scroll left in real time.

Waveform — capacitor voltage and output
Oscillation frequency vs capacitance
Theory & Key Formulas

$$f=\frac{1.44}{(R_1+2R_2)\,C},\qquad D=\frac{R_1+R_2}{R_1+2R_2}$$

Oscillation frequency f [Hz] and duty cycle D. R1, R2: resistors, C: timing capacitor. The frequency is independent of the supply voltage Vcc, and in the basic circuit the duty cycle always exceeds 50%.

$$t_H=0.693\,(R_1+R_2)\,C,\qquad t_L=0.693\,R_2\,C$$

Output-HIGH (charging) time t_H and output-LOW (discharging) time t_L. The coefficient 0.693 is ln2, which comes from the thresholds being fixed at 1/3 Vcc and 2/3 Vcc.

$$T=t_H+t_L=0.693\,(R_1+2R_2)\,C$$

The period T is the sum of the charge and discharge times. The frequency f is the reciprocal of the period, f = 1/T.

What is the 555 Timer Astable mode?

🙋
The "555 timer" is that 8-pin IC that shows up in every electronics hobby book, right? What does using it in "astable mode" actually mean?
🎓
Exactly — it is one of the most famous ICs in the world. "Astable" means it has no stable state. The output keeps flipping between HIGH and LOW on its own — in other words it becomes an oscillator that produces a square wave with no input. All you need is two resistors (R1 and R2) and one capacitor (C). With just that you can build an LED flasher or a buzzer tone source, which is why it is the classic beginner circuit.
🙋
How can it keep oscillating forever with just resistors and a capacitor?
🎓
The key is the charging and discharging of the capacitor. The capacitor charges toward the supply through R1+R2. The instant its voltage reaches 2/3 Vcc, the comparators inside the 555 flip the output LOW and switch on the internal discharge transistor. Now the capacitor discharges through R2 alone. The instant its voltage falls to 1/3 Vcc, the output goes HIGH again and charging restarts... and this repeats forever. Look at the canvas above — the sawtooth of the capacitor voltage is bouncing exactly between those two threshold lines.
🙋
I see! But looking closely at the waveform above, the output is HIGH longer than it is LOW. The duty cycle reads 54.8%. Isn't that a bug?
🎓
Good eye — that is exactly as designed. Charging goes through R1+R2, but discharging goes through R2 only. The charging path has more resistance, so charging (output HIGH) takes longer. That is why the duty cycle of the basic circuit is always greater than 50%. If you want an exact 50% square wave you have to add a diode in parallel with R1 to bypass the charging path. Making R1 small and R2 large brings it close to 50%, but you can never reach exactly 50% with the basic topology.
🙋
When I move the supply voltage Vcc slider, the frequency doesn't change at all. Why is that?
🎓
That is another pleasant property of the 555. The oscillation frequency is set by R1, R2 and C only, and does not depend on Vcc. The thresholds 1/3 Vcc and 2/3 Vcc, and the charging target voltage Vcc, all scale with the supply — so Vcc cancels out of the equation. Even as a battery runs down and the voltage drops, the frequency barely changes. The only thing Vcc affects is the amplitude of the output (the HIGH-side voltage). That is why the 555 is so handy when you want a stable oscillator.
🙋
So how do I pick R1, R2 and C to get the frequency I want?
🎓
The rule of thumb is "choose C first, then trim with the resistors." If you want an LED to blink, that is a few Hz, so use a large C (a few µF to ten µF). If you want a buzzer tone, that is in the audible range of hundreds of Hz to a few kHz, so use a small C around 0.01-0.1µF. Keep the resistors between 1kΩ and 1MΩ to be safe — below 1kΩ a large current flows into the discharge transistor, and above 1MΩ the capacitor's leakage current throws off the calculation. Try the "frequency vs capacitance" chart below to see how the frequency moves as you change C.

Frequently Asked Questions

The oscillation frequency is f = 1.44 / ((R1 + 2·R2)·C), where R1 and R2 are the resistors and C is the timing capacitor. The capacitor charges through R1+R2 and discharges through R2 alone. The output-HIGH time is t_H = 0.693·(R1+R2)·C, the output-LOW time is t_L = 0.693·R2·C, and the period is T = t_H + t_L. This tool performs the calculation in real time and shows it together with the waveform.
In the basic circuit the duty cycle is D = (R1+R2)/(R1+2·R2), which is always greater than 50%. The charging path (R1+R2) has more resistance than the discharging path (R2 alone), so the output stays HIGH longer than it stays LOW. Making R1 small and R2 large brings D closer to 50%, but to reach exactly 50% or below you need to add a diode that bypasses the charging path, or use a different circuit topology.
No. The oscillation frequency is set only by R1, R2 and C and is independent of the supply voltage Vcc. This is because the 555's thresholds (1/3 Vcc and 2/3 Vcc) and the charging target voltage Vcc all scale with the supply, so Vcc cancels out of the equation. Thanks to this property the 555 keeps a stable oscillation frequency even when the supply voltage drifts, which makes it an easy-to-use oscillator.
The usual approach is to pick the capacitor C first, then trim the frequency with the resistors. Use a large C (a few µF to tens of µF) for low frequencies (LED flashing, a few Hz) and around 0.01-0.1µF for the audible range (hundreds of Hz to a few kHz). Keep the resistors roughly between 1kΩ and 1MΩ. Below 1kΩ the discharge current becomes excessive; above 1MΩ the capacitor's leakage current is no longer negligible. Use the sliders in this tool to dial in your target frequency.

Real-World Applications

LED flashers and blinking indicators: The most basic use of the 555 astable circuit is a circuit that makes an LED blink. A slow few-Hz blink is built with a large capacitor (around 10µF), and you just connect the LED and a current-limiting resistor straight to the output pin. It is the classic first step in electronics, and is widely used for warning lamps, "running" indicators and decorative toys.

Tone and alarm generators: Set the frequency in the audible range (hundreds of Hz to a few kHz) and connect a speaker or piezo buzzer to the output to produce a beep or alarm tone. The trick is to make the capacitor small (0.01-0.1µF) to raise the frequency. It is used as an introduction to audio circuits — electronic-organ tone sources, alarm devices and the "done" buzzer on a timer.

Clock pulses and PWM dimming: Using the 555 output as a clock source for digital circuits gives the pulses needed to drive counters and shift registers. The fact that the duty cycle is set by the resistor ratio is also exploited for PWM (pulse-width modulation) applications such as LED dimming and simple DC-motor speed control. Changing the ratio of R1 to R2 adjusts the brightness or the speed.

Hobby, education and industrial timing circuits: Since its introduction in 1972, the 555 is said to be one of the most-produced ICs of all time, and it is still in active use everywhere from hobby electronics to industrial equipment. Frequency calculations like those in this tool serve as the "first step of design" for estimating component values before building the circuit. You can grasp the approximate frequency and duty cycle before measuring on a breadboard.

Common Misconceptions and Pitfalls

The most common one is assuming the duty cycle can be made exactly 50%. As the formula in this tool shows, the basic astable circuit has D = (R1+R2)/(R1+2R2), which is always greater than 50%, because charging goes through R1+R2 while discharging goes through R2 alone. Making R1 very small and R2 large brings D close to 50%, but in principle it never reaches exactly 50%. If you need a clean 50% square wave, add a diode in parallel with R1 so that R1 is bypassed during charging, or feed the output through a divide-by-two flip-flop.

Next, expecting the calculated frequency to be measured exactly. f = 1.44/((R1+2R2)C) is an idealized formula. In practice the capacitor's tolerance (±20% or more for electrolytics), the resistor tolerance, temperature drift and the saturation voltage of the 555's internal discharge transistor make the measured frequency deviate from the calculated value by a few percent to tens of percent. For accuracy-critical applications, make one of the resistors a trimmer and adjust while measuring, or use a film capacitor with good temperature stability. Using an electrolytic as the timing capacitor causes especially large deviation.

Finally, the 555 does not work with any arbitrary resistor and capacitor values. If the resistors are too small (below 1kΩ), an excessive current flows into the internal transistor during discharge, risking overheating and damage. Conversely, if the resistors are too large (above 1MΩ), the capacitor's leakage current and the bias current of the 555's threshold pin become non-negligible, and oscillation can become unstable or stop. In practice it is safest to keep R1 and R2 between 1kΩ and 1MΩ. When aiming for a high frequency, also watch the upper limit at which the 555's output rise and fall can keep up — around a few hundred kHz for standard parts.