Oscillators & timers

Amplification & analog design · tree view

Regenerative (positive) feedback plus an RC network turns an amplifier into an oscillator: the Wien network picks 1/(2πRC) as the sine frequency, and the 555 timer's 1/3–2/3 threshold comparators give square waves and timed pulses.

Prerequisites

op-amp symbol
op-amp
555-timer symbol
555-timer
resistor symbol
resistor
capacitor symbol
capacitor
wien-bridge-oscillator.svg
wien-bridge-oscillator.svg
555-astable.svg
555-astable.svg

An oscillator can be regarded as an amplifier which provides its own input signal. Oscillators are classified according to the waveshapes they produce and the requirements needed for them to produce oscillations.

— Naval Education and Training, NEETS Module 9 — Introduction to Wave-Generation and Wave-Shaping, Chapter 2, “Oscillators” (introduction)

First, amplification is required to provide the necessary gain for the signal. Second, sufficient regenerative feedback is required to sustain oscillations. Third, a frequency-determining device is needed to maintain the desired output frequency.

— Naval Education and Training, NEETS Module 9 — Introduction to Wave-Generation and Wave-Shaping, Chapter 2, “The Basic Oscillator” (requirements — the qualitative Barkhausen criterion)

For a given RC network, only one frequency of the initial noise signal will be shifted exactly 180 degrees. In other words, the network is frequency selective. Therefore, the RC network is the frequency-determining device since the lengths of the vectors and their phase relationships depend on frequency. The frequency of oscillations is governed by the values of resistance and capacitance in these sections.

— Naval Education and Training, NEETS Module 9 — Introduction to Wave-Generation and Wave-Shaping, Chapter 2, “Sine-Wave Oscillator” (RC network)

Because their outputs are generally characterized by a sudden change, or relaxation, they are often referred to as RELAXATION OSCILLATORS.

— Naval Education and Training, NEETS Module 9 — Introduction to Wave-Generation and Wave-Shaping, Chapter 2, “Classification of Oscillators” (nonsinusoidal)

The 555 integrated circuit is the most popular chip ever manufactured. Independently manufactured by more than 10 manufacturers, still in current production, and almost 40 years old, this little circuit has withstood the test of time.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. VI (Experiments), Chapter 8, “The 555 IC” source

This is a hysteretic oscillator, which is a type of relaxation oscillator. It is also an astable multivibrator.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. VI (Experiments), Chapter 8, “555 hysteretic oscillator” (theory of operation) source

This is one of the most basic 555 circuits. This circuit is part of this chips datasheet, complete with the math needed to design to specification, and is one of the reasons a 555 is referred to as a timer.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. VI (Experiments), Chapter 8, “555 monostable multivibrator” (instructions) source
Show alternative explanations

The type of circuit most often used to generate square or rectangular waves is the multivibrator.

— Naval Education and Training, NEETS Module 9 — Introduction to Wave-Generation and Wave-Shaping, Chapter 3, “Multivibrators”

The astable circuit has no stable state.

— Naval Education and Training, NEETS Module 9 — Introduction to Wave-Generation and Wave-Shaping, Chapter 3, “Multivibrators” (types)

This is one of the most basic RC oscillators. It is simple and very predictable.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. VI (Experiments), Chapter 8, “555 hysteretic oscillator” (instructions) source

An oscillator is a device that produces an alternating (AC), or at least pulsing, output voltage.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. III (Semiconductors), Chapter 8, “Positive feedback” (op-amp oscillator) source

Oscillation occurs because the positive feedback is instantaneous and the negative feedback is delayed (by means of an RC time constant). The frequency of this oscillator may be adjusted by varying the size of any component.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. III (Semiconductors), Chapter 8, “Positive feedback” (RC astable mechanism) source

They are also used as frequency meters, because the balance of the bridge is frequency-dependent.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. II (AC), Chapter 12, section “Wien bridge” (the measurement bridge the oscillator is named after) source

Will it oscillate? The Barkhausen criterion as a checklist

Break the loop and look at it: a circuit oscillates at the frequency where loop gain |A·β| ≥ 1 AND the net phase around the loop is 0° (or 360°). NEETS states it in words — amplification, regenerative (in-phase) feedback, and a frequency-determining device. Wien-bridge rows use β = 1/3 (the RC network's attenuation at f_osc) and the amp gain set by R_f/R_g.

To predict the outcome:

  1. Break the loop mentally: find the amplifier gain A at the candidate frequency and the feedback network attenuation β.
  2. Compute the loop-gain magnitude |A·β| and add up every phase shift around the loop.
  3. Verdict: |A·β| < 1 → decays, never starts. |A·β| = 1 with 0° → steady sine. |A·β| > 1 with 0° → starts and grows until something clamps the amplitude.
  4. Any net phase other than 0°/360° at that frequency means the feedback arrives out of step — no oscillation there.
  5. Wien rows: network phase is 0° at f_osc = 1/(2πRC), so the amplifier must be non-inverting with gain ≥ 3.
loop_gain_a_betanet_phasewill_it_oscillateoutcome
1.00°YES — sustainedsteady sine at the frequency-determining network's pick
0.60°NOany noise dies out — feedback returns less than it borrowed
1.50°YES — grows, then clampsstarts up but amplitude limiting clips the sine (distortion) unless a stabilizer sets the level
1.0180°NOfeedback arrives inverted — degenerative at that frequency, no build-up
Wien: A = 3.0, β = 1/3 → 1.00° (network + non-inverting amp)YESclean sine at 1/(2πRC)
Wien: A = 2.5, β = 1/3 → 0.830°NOamp gain below 3 — network attenuation wins, dead circuit
Wien: A = 4.0, β = 1/3 → 1.330°YES — until clippingoscillates but the op-amp rails set the amplitude; add diode/lamp stabilization

Wien bridge frequency prediction: f = 1/(2πRC)

The Wien network (series RC into parallel RC, equal R and C pairs) is phase-zero with attenuation exactly 1/3 at one frequency: f_osc = 1/(2πRC). The op-amp must make up that loss with gain ≥ 3, i.e. R_f ≥ 2·R_g. Values python-verified. (Gap note: the in-library books cover the Wien measurement bridge, not the oscillator wiring — the 1/(2πRC) result is the standard Wien-network formula.)

To predict the outcome:

  1. Read the equal pair values R and C from the series and parallel legs.
  2. Compute f_osc = 1/(2πRC).
  3. Check the amplifier gain 1 + R_f/R_g: below 3 → no start-up; 3 → clean sine; well above 3 → oscillates with clipped/ distorted tops.
  4. Tune by ganging the two resistors (or two capacitors) together so the ratio — and the phase-zero point — moves without breaking the Barkhausen balance.
rcpredicted_f_oscamp_gainverdict
10 kΩ15 nF1,061 Hz3.2 (R_f = 22 kΩ, R_g = 10 kΩ)oscillates ≈1.06 kHz, slight distortion
4.7 kΩ10 nF3,386 Hz3.0 (R_f = 20 kΩ, R_g = 10 kΩ)oscillates ≈3.4 kHz, cleanest amplitude
16 kΩ4.7 nF2,116 Hz2.5 (R_f = 15 kΩ, R_g = 10 kΩ)DEAD — gain under 3, network attenuation not made up
10 kΩ100 nF159.2 Hz3.2 (R_f = 22 kΩ, R_g = 10 kΩ)oscillates ≈159 Hz — ×10 C moves the pitch an octave-plus decade down

555 astable: frequency and duty from R1, R2, C

Standard astable: R1 from V_CC to pin 7 (discharge), R2 from pin 7 to pins 6+2, C from pins 6+2 to ground. C charges through R1+R2 to 2/3 V_CC and discharges through R2 alone to 1/3 V_CC, so output-high time always exceeds output-low time. Constants 0.693 = ln 2; f ≈ 1.44/((R1+2R2)C). All rows python-verified.

To predict the outcome:

  1. Output high: C charges through R1+R2, t_high = 0.693·(R1+R2)·C.
  2. Output low: C discharges through R2 only (pin 7 pulls low), t_low = 0.693·R2·C.
  3. Frequency f = 1/(t_high + t_low) = 1.44/((R1+2R2)C); duty = (R1+R2)/(R1+2R2).
  4. Duty is always above 50% with this wiring — t_low can never catch t_high because R1 is only in the charge path.
r1r2ct_hight_lowfrequencyduty
1 kΩ68 kΩ1 µF47.8 ms47.1 ms10.5 Hz50.4%
10 kΩ10 kΩ10 µF138.6 ms69.3 ms4.8 Hz66.7%
4.7 kΩ4.7 kΩ0.1 µF0.65 ms0.33 ms≈1.02 kHz66.7%
1 kΩ100 kΩ10 µF699.9 ms693.0 ms0.7 Hz50.2%

555 monostable pulse width: T = 1.1·R·C

One-shot wiring: trigger pin 2 below 1/3 V_CC starts the pulse (output high, discharge pin 7 released); C charges through R from 0 V toward V_CC until it reaches 2/3 V_CC, which ends the pulse. Crossing 2/3 from a 0 V start takes ln(3/2) ≈ 1.1 time constants. The book experiment picks Rt = 27 kΩ, Ct = 100 µF for a "3 seconds" timer — python gives 2.97 s, and its ×10 swap gives 29.7 s ("close to 30 seconds").

To predict the outcome:

  1. Confirm the trigger: pin 2 must dip below 1/3 V_CC briefly to start the timing cycle.
  2. Compute the pulse width T = 1.1·R·C (the trigger-retry point: the input must be released before T or the pulse just stretches).
  3. Watch tolerance: 5% resistor + 20% capacitor tolerance can shift a real circuit by up to ~25% — measure, don't trust the datasheet number blindly.
  4. Scale intuition: doubling R or C doubles the pulse; the 555's thresholds track V_CC, so the width barely changes with supply voltage.
rcpulse_width_tnote
27 kΩ100 µF2.97 sthe Vol. VI experiment's 3-second LED timer — count it against your watch
270 kΩ100 µF29.70 sthe experiment's ×10 swap: 'close to 30 seconds'
100 kΩ10 µF1.10 sone-second one-shot for a relay hold
9.1 kΩ1 µF10.0 msmillisecond pulse for logic-level timing

Candidate projects — awaiting review

  • 555 LED metronome/flasher: pick R1, R2, C for a target flash rate with the astable formulas, then verify with a stopwatch or frequency counter — and explain why the duty never hits 50%. (r/AskElectronics — “Noob here, what can I do with fifty 555 timers?” (LED flash + tone generation), community)
  • 555 PWM LED dimmer: astable running fast, diode steering the charge path so the pot varies duty from ~5% to ~95% — then swap the LED for a fan. (r/AskElectronics — “Advice on LED PWM with 555 Timer” (working breadboard, community critique), community)
  • Wien bridge sine oscillator around 1 kHz: two equal RC pairs plus an op-amp gain-of-3 stage, with diodes (or a small lamp) stabilizing amplitude; check distortion on a scope and tune by ganging the resistors. (r/electronics — “What does it take to build a really low-distortion audio sine generator?” (+ EEVblog “Wien Bridge project” thread), community)
  • 555 one-shot touch timer: rebuild the Vol. VI monostable with Rt = 27 kΩ and Ct = 100 µF, predict 2.97 s, and race your watch against the LED. (Kuphaldt, Lessons In Electric Circuits Vol. VI Ch. 8, “555 monostable multivibrator”, book)