Simulate a Blinking LED Circuit Online (Astable Multivibrator)

📅
✍️ By CircuPilot Team
← Back to Blog Hub

Simulate a Blinking LED Circuit Online

Two transistors, two capacitors, four resistors and two LEDs that take turns flashing. The astable multivibrator is the first circuit most people build that does something on its own, without a microcontroller telling it to — and that is exactly why it is worth simulating rather than only reading about.

The circuit

Each half of it is a transistor switch. Each capacitor couples one transistor's collector to the other's base. When one transistor turns on it pulls its collector low, and that step is passed through the capacitor to hold the other transistor off — until the capacitor charges through its base resistor and the other one takes over. Then it repeats, with the halves swapped.

| part | value | what it sets |

|---|---|---|

| Q1, Q2 | 2N2222 or BC547 | the switching |

| R1, R2 (collector) | 1 kΩ | LED current |

| R3, R4 (base) | 47 kΩ | with C, the flash rate |

| C1, C2 | 10 µF and 22 µF | the flash rate |

| LEDs | any colour | what you watch |

The flash rate comes from the base resistor and the capacitor, roughly t ≈ 0.7 × R × C for each half. With 47 kΩ and 10 µF that is about a third of a second, so the pair flashes a little over once a second. Make the capacitors bigger and it slows down; make them smaller and it speeds up.

Deliberately using two different capacitors — 10 µF and 22 µF — makes the two halves unequal, which matters more than it looks. See below.

Why most simulators show this circuit frozen

Here is the part that catches people out, and it is not a mistake in your circuit.

Most simulators show you the DC operating point — the steady state, solved algebraically with capacitors treated as open circuits. That analysis has no concept of time. Feed it an astable multivibrator and it returns a single answer where both transistors are partly on at once, sitting at the symmetric balance point.

That answer is not wrong arithmetic. It is a real solution to the equations — it is just an unstable one. A physical circuit never stays there: the smallest amount of noise or component mismatch tips it to one side, and the oscillation starts. A simulator has no noise, so it sits at the balance point forever and the LEDs never light.

Two consequences worth knowing:

  • If your LEDs sit dim and motionless, check whether you are looking at an operating point rather than a transient analysis. It is often the tool, not the circuit.
  • Make the two halves deliberately different. Different capacitor values, or different base resistors, break the symmetry so the circuit starts on its own — in simulation and in hardware. This is also why a real breadboard version always starts: nothing is ever exactly matched.

CircuPilot runs a transient analysis for circuits like this and plays it on the canvas, so the LEDs alternate the way they do on a breadboard rather than freezing at the balance point.

Building it

The fastest route is to describe it:

> a 9V astable multivibrator with two 2N2222 transistors, 1k collector resistors, 47k base resistors, 10uF and 22uF capacitors, and an LED on each collector

Then press Run. Both LEDs should alternate about once a second.

To change the rate, edit one capacitor and watch it: 100 µF slows it to a lazy blink, 1 µF speeds it up until the two LEDs look continuously half-lit — which is your eye averaging, not the circuit stopping.

Things worth trying once it runs

  • Make the halves very unequal — 10 µF against 100 µF — and one LED stays on far longer than the other. This is how a flasher with a short "blip" is built.
  • Replace one LED with a buzzer-sized load and watch the collector waveform on the scope. The edge is not vertical; the capacitor charging curve is visible.
  • Raise the base resistors to 470 kΩ. The circuit slows to a few seconds per cycle and eventually stops oscillating altogether when the transistors can no longer saturate — a good illustration of why base current matters.

Where this circuit leads

The astable is the analog ancestor of everything a microcontroller does with delay(). Once it makes sense, three things follow naturally: the monostable (one pulse per trigger), the 555 timer (the same job in one chip), and PWM — the same square wave, but fast enough that its average is what matters rather than its edges.

---

> [!IMPORTANT]

> ### ⚡ Watch it blink in your browser

> Describe the circuit in plain English or draw it yourself, then press Run. CircuPilot uses real ngspice underneath, so the flash rate you measure is the one your breadboard will give you. Free, no signup.