NE555 Explainer — How a Timer Chip Becomes an Oscillator

Text written by Claude Opus 4.8 (claude-opus-4-8).

NE555 Explainer — How a Timer Chip Becomes an Oscillator

This is the “before you build” companion to Project 6. It assumes you’re comfortable with RC circuits and exponentials, but have never met an IC like this one — no prior electronics needed. The goal: by the end you should be able to derive the pitch formula yourself and know why every wire in the schematic is where it is.

The one piece of jargon you need first: a comparator. It’s a device with two voltage inputs (+ and −) and one output. It does exactly one thing: asks “is the + input higher than the − input?” If yes, the output snaps to its high state (≈ the supply rail); if no, it snaps to low. A one-bit “which input is bigger?” detector with a digital output — no gain, no feedback, no frequency response to track. On a schematic it’s drawn as a triangle with + and − inputs (the same symbol as an op-amp, but don’t read anything op-amp-ish into it — a comparator is the simpler device, built to slam fully to one rail). Everywhere below, “comparator trips” just means “threshold crossed, output flipped.”

The second piece: an SR latch (set–reset flip-flop). It’s a one-bit memory. Two inputs — Set and Reset — and an output Q. Pulse S and the output goes to 1 and stays there even after S returns to rest; pulse R and it goes to 0 and stays. The crucial word is stays: with neither input asserted, the latch holds its last state indefinitely. Physically it’s a bistable element — two stable states held by positive feedback, exactly like a particle sitting in one well of a double-well potential until something kicks it over the barrier. (S and R both asserted at once is the one forbidden/ambiguous input, but the 555’s two comparators can never trip simultaneously, so that case never arises here.) Below, “the latch is set” = output high = capacitor charging; “reset” = output low = discharging.

The punchline up front: the 555 is a hysteretic relaxation oscillator with the hysteresis band pre-wired to ⅓ and ⅔ of the supply. Everything else is packaging. If you’ve ever analysed a Schmitt-trigger-plus-RC relaxation oscillator, you already know the physics — the chip just hands you the comparators and the latch in one 8-pin package.


1. What the thing actually is

The NE555 (1972, Signetics, designed by Hans Camenzind) is an 8-pin analog timer / oscillator chip — one of the best-selling ICs ever made, still manufactured by the billion. It contains roughly two dozen transistors but presents itself as a small number of recognisable functional blocks.

A myth worth puncturing immediately, because you’ll read it everywhere: the “555” is not named after the three 5 kΩ resistors inside it. The chip really does contain a three-resistor divider, and in the original bipolar design those resistors are nominally 5 kΩ each — but Camenzind said in interviews the number was chosen arbitrarily by the marketing manager (Art Fury) because it sounded like it would sell. Nice coincidence, not an etymology.

What it’s meant for: producing precisely-timed events. Two canonical jobs:

The reason it’s so beloved is that the timing depends only on an external resistor and capacitor and is independent of the supply voltage (we’ll see why that falls out of the math) — so it’s cheap, stable, and forgiving.


2. The internal architecture (the only diagram that matters)

Five blocks. Map each to something you already know:

            V+ (pin 8)

            ┌┴┐  ── three equal resistors in series form a divider:
            │ │     the two tap points sit at ⅔V+ and ⅓V+
            └┬┘
   ⅔V+ ──────┤────────────►  (−) UPPER comparator   ── compares THRESHOLD (pin 6) to ⅔V+
            ┌┴┐                                          fires when V_C rises ABOVE ⅔V+
            │ │
            └┬┘
   ⅓V+ ──────┤────────────►  (+) LOWER comparator   ── compares TRIGGER (pin 2) to ⅓V+
            ┌┴┐                                          fires when V_C falls BELOW ⅓V+
            │ │
            └┬┘

            GND (pin 1)

   UPPER comparator ── R ─┐
                          │  SR latch ──► OUTPUT stage (pin 3, push-pull)
   LOWER comparator ── S ─┘            └► base of DISCHARGE transistor (pin 7, open collector to GND)

The five blocks:

  1. The resistor-divider reference. Three equal resistors from V+ to GND create two fixed reference voltages: ⅔V+ and ⅓V+. These are the comparator trip points. Because they’re fractions of the supply, they track the supply — hold that thought, it’s the reason timing is supply-independent.

  2. Upper comparator. Watches the THRESHOLD input (pin 6). When the voltage there climbs above ⅔V+, it trips.

  3. Lower comparator. Watches the TRIGGER input (pin 2). When the voltage there falls below ⅓V+, it trips.

  4. SR latch (flip-flop). The memory element. Upper comparator → Reset, lower comparator → Set. So once it flips a state it stays there until the other comparator trips. This is exactly the hysteresis you’d build with positive feedback around a single comparator — here it’s done with two comparators and a latch, giving a clean ⅓V+ → ⅔V+ hysteresis band.

  5. Output stage + discharge transistor. The latch drives two things in lock-step:

    • Pin 3 (output): a push-pull stage that slams to (near) V+ or (near) GND.
    • Pin 7 (discharge): an open-collector NPN transistor whose collector is pulled to GND whenever the output is low. Think of it as an internal switch to ground that you can hang your timing capacitor’s charging network on.

That’s the whole machine. The genius is that blocks 1–4 form a comparator with built-in hysteresis between ⅓ and ⅔ of the rail, and block 5 gives you both a buffered output and a synchronised switch-to-ground for steering an RC network.

The 8 pins, once

PinNameRole
1GNDGround (0 V).
2TRIGGERInput to lower comparator; trips the latch set when below ⅓V+.
3OUTPUTPush-pull output, ~0 or ~V+. Drives the buzzer.
4RESETForce output low when pulled low. Tie to V+ to disable.
5CONTROLDirect access to the ⅔V+ node. Override it to shift the thresholds (the siren trick). Otherwise decouple with ~10 nF to GND.
6THRESHOLDInput to upper comparator; trips the latch reset when above ⅔V+.
7DISCHARGEOpen-collector switch to GND, in sync with output-low.
8V+Supply (4.5–15 V for the bipolar NE555; your 4.5 V is fine).

Two pins do nothing useful for us and must still be tied off correctly: pin 4 (reset) → V+ (otherwise stray noise can mute the chip), and pin 5 (control) → a 10 nF cap to GND (keeps divider noise off the threshold; optional but good hygiene). Project 6 later uses pin 5 deliberately for the two-tone siren — nudging the ⅔V+ reference up and down sweeps the pitch.


3. The three modes, briefly


4. Astable mode: the cycle, in words

Wiring recap (from the project): R1 from V+ to pin 7 (discharge); R2 from pin 7 to the tied pins 6+2; capacitor C from that node to ground. So the node voltage VCV_C across the capacitor is what both comparators watch.

The cycle is a limit cycle with two phases:

Charging phase (output HIGH). The discharge transistor (pin 7) is off — an open switch. So C charges from the supply through R1 and R2 in series. VCV_C rises exponentially toward V+. The moment it crosses ⅔V+, the upper comparator trips, resets the latch → output goes LOW and the discharge transistor turns ON.

Discharging phase (output LOW). Pin 7 is now a closed switch to ground. The junction between R1 and R2 is clamped to ~0 V, so C dumps its charge to ground through R2 alone (R1 just bleeds current from the supply into pin 7 — wasted, doesn’t touch C). VCV_C falls exponentially toward 0. The moment it crosses ⅓V+, the lower comparator trips, sets the latch → output goes HIGH, pin 7 opens, and we’re back to charging.

So VCV_C is a sawtooth-ish exponential ripple bouncing forever between ⅓ and ⅔ of the rail, and pin 3 is the square wave that rides it. Charge through R1+R2, discharge through R2 — that asymmetry is the whole reason the duty cycle isn’t 50 %, and we’ll quantify it next.


5. Deriving the frequency

This is just the RC relaxation-oscillator calculation; the 555 only fixes the two thresholds for you. Use the universal first-order step response:

VC(t)=V(VV0)et/τ,V_C(t) = V_\infty - \big(V_\infty - V_0\big)\,e^{-t/\tau},

so the time to travel from V0V_0 to some V1V_1 toward an asymptote VV_\infty is

t=τln ⁣VV0VV1.t = \tau \,\ln\!\frac{V_\infty - V_0}{V_\infty - V_1}.

Charging phase — asymptote V=VCCV_\infty = V_{CC}, time constant τcharge=(R1+R2)C\tau_\text{charge} = (R_1 + R_2)C, travelling from V0=13VCCV_0 = \tfrac13 V_{CC} up to V1=23VCCV_1 = \tfrac23 V_{CC}:

thigh=(R1+R2)Cln ⁣VCC13VCCVCC23VCC=(R1+R2)Cln ⁣2313=(R1+R2)Cln2.t_\text{high} = (R_1+R_2)C \, \ln\!\frac{V_{CC} - \tfrac13 V_{CC}}{V_{CC} - \tfrac23 V_{CC}} = (R_1+R_2)C \,\ln\!\frac{\tfrac23}{\tfrac13} = (R_1+R_2)\,C\,\ln 2.

Discharging phase — asymptote V=0V_\infty = 0, time constant τdischarge=R2C\tau_\text{discharge} = R_2 C, falling from 23VCC\tfrac23 V_{CC} to 13VCC\tfrac13 V_{CC}:

tlow=R2Cln ⁣023VCC013VCC=R2Cln2.t_\text{low} = R_2 C \, \ln\!\frac{0 - \tfrac23 V_{CC}}{0 - \tfrac13 V_{CC}} = R_2\,C\,\ln 2.

Notice the VCCV_{CC} cancels in both logs. The supply sets the absolute voltages but the ratios are fixed at 2:1 by the divider, so the times — and hence the frequency — are completely independent of supply voltage. That is the defining design virtue of the 555, and it falls straight out of “thresholds are fractions of the rail.” (A drifting 4.5 V battery changes loudness, not pitch.)

The period is the sum:

T=thigh+tlow=[(R1+R2)+R2]Cln2=(R1+2R2)Cln2,T = t_\text{high} + t_\text{low} = \big[(R_1+R_2) + R_2\big]\,C\,\ln 2 = (R_1 + 2R_2)\,C\,\ln 2,

and since 1/ln2=1.44271/\ln 2 = 1.4427,

f=1T=1(R1+2R2)Cln2    1.44(R1+2R2)C.\boxed{\,f = \frac{1}{T} = \frac{1}{(R_1 + 2R_2)\,C\,\ln 2} \;\approx\; \frac{1.44}{(R_1 + 2R_2)\,C}\,.}

The “1.44” you see quoted everywhere (including the project file) is nothing but 1/ln21/\ln 2. Bigger R or bigger C → longer to traverse the same ⅓→⅔ band → lower ff → lower pitch. The pitch is the RC time constant made audible.

Duty cycle

D=thighthigh+tlow=R1+R2R1+2R2.D = \frac{t_\text{high}}{t_\text{high}+t_\text{low}} = \frac{R_1+R_2}{R_1+2R_2}.

Because R1>0R_1 > 0, this is always > 50 % — the classic 555 astable can’t produce a symmetric square wave from this topology alone. To approach 50 %, make R1R2R_1 \ll R_2 (then DR2/2R2=12D \to R_2/2R_2 = \tfrac12). For audio it barely matters: a square and a near-square wave both sound buzzy. It does shape the timbre — duty cycle sets the harmonic content (a 50 % square has only odd harmonics; moving off 50 % reintroduces even harmonics and changes the “reediness”).

Sanity-check with the project’s values

R1=1kΩR_1 = 1\,\text{k}\Omega, R2=10kΩR_2 = 10\,\text{k}\Omega, C=10nFC = 10\,\text{nF}:

f1.44(1000+20000)(10×109)=1.442.1×1046.9 kHz,f \approx \frac{1.44}{(1000 + 20000)(10\times10^{-9})} = \frac{1.44}{2.1\times10^{-4}} \approx 6.9\ \text{kHz},

a clear, fairly high tone. Duty cycle D=11/2152%D = 11/21 \approx 52\% (nicely close to square, because R1R2R_1 \ll R_2). Swap to C=100nFC = 100\,\text{nF} and everything scales by 10: f690 Hzf \approx 690\ \text{Hz} — roughly the E above middle C, a much rounder tone. Replacing R2R_2 with the 10 kΩ pot sweeps ff continuously over more than a decade as you turn the knob.


6. Practical caveats a physicist will want flagged

These are the things the idealised analysis hides, in rough order of how much they’ll bite you on a breadboard:


7. One-paragraph mental model to carry to the breadboard

A capacitor charges through R1+R2, and the chip watches it. At ⅔ of the supply the chip flips its output low and clamps a switch (pin 7) to ground; the capacitor now discharges through R2 until it hits ⅓ of the supply, at which point the chip flips back high and opens the switch. Round and round, between ⅓ and ⅔, forever. Each traversal takes a multiple of RCln2RC\ln 2, the two thresholds being fixed fractions of the rail is why pitch ignores the battery voltage, and the square wave on pin 3 is what shoves your piezo back and forth into an audible tone. Knob on R2 = knob on the discharge time = knob on the pitch.

f1.44(R1+2R2)C,D=R1+R2R1+2R2.f \approx \frac{1.44}{(R_1+2R_2)\,C}, \qquad D = \frac{R_1+R_2}{R_1+2R_2}.

← Back to Project 6 · Read Me First

Sources