Skip to content

Getting Started with Falstad Simulation

Getting Started with Falstad Simulation

Running a circuit before you buy a part or fab a board is the cheapest verification there is. The Falstad circuit simulator (falstad.com/circuit) is a browser-only, install-free, open-source tool that is especially good at making the “why this value” of an analogue front end — dividers, RC filters, comparators, op-amps — obvious. For ESP32 work it will not run your firmware, but it lets you reason out the sensor conditioning before you lay anything down. By the end you will be able to:

  • Judge what Falstad can and cannot simulate
  • Build an RC filter or divider in the browser and read the key quantities
  • Use it to explain a design choice to a colleague or customer visually
  • Align simulation conclusions with real ESP32 ADC/PWM behaviour, knowing where they diverge
  • A web browser (nothing to install)
  • A specific analogue circuit to verify (e.g. NTC divider + RC filter)
  • The electrical parameters of the target ESP32 pin (ADC range, input impedance, PWM frequency)
Can do Cannot do
R/L/C, op-amps, comparators, diodes Run ESP32 firmware (it is circuit-level, not code-level)
RC/LC filters, dividers, first-order step response Model a real MCU’s IO capacitance and switching noise precisely
Simple logic gates, counters, flip-flops Complex digital/protocols (SPI, I²C timing)
AC sweep, transient, scope traces Parasitics and PCB distribution effects

Positioning: Falstad is a whiteboard for the analogue front end, not a system simulator. For code-level simulation see Section 2 (Wokwi).

  1. Place a source (or square-wave source), a resistor, and a capacitor to ground from the element menu, wired as a low-pass
  2. Right-click parts to set values (e.g. R = 1 kΩ, C = 100 nF); under Output enable node voltage/current display
  3. Add a scope trace, read the charge/discharge time constant τ = RC from the step, and confirm the −3 dB frequency 1/(2πRC) lands in the band you want to filter
  • ADC input impedance: an ideal ADC in Falstad is high-impedance, but a real ESP32 ADC draws current during sampling and reads wrong when the source impedance is too high. Do not just maximise divider resistors to save power — check sampling accuracy first
  • PWM as an analogue output: when deriving an analogue voltage from PWM + RC, ripple depends on PWM frequency and load; Falstad shows “why this RC flattens 25 kHz PWM”
  • Comparator hysteresis: use the real chip’s Schmitt thresholds from the datasheet, not Falstad’s ideal comparator, as the production figure

Method: the trends from Falstad (“is the cutoff right”, “is the settling time right”) transfer; the absolute numbers must be re-checked against real parameters.

A Falstad circuit saves as a URL (carrying circuit state) or a .txt netlist. In a design review, dropping a link that opens and can be slider-dragged beats a screenshot. This is the tool that ends arguments by making them visible.

Check Expected result Verified
Divider node voltage matches hand calculation Sim ≈ theory, gap explained by part tolerance
RC step time constant Measured τ matches 1/(2πRC) in the target band
Transferability noted Written whether this is a trend or an absolute value, plus a re-check plan
Circuit link shareable URL/.txt opens and reproduces in another browser

Issue 1: it simulates fine but does not match the real board

Section titled “Issue 1: it simulates fine but does not match the real board”

Cause: ideal sources and op-amps used, ignoring real output swing, slew rate, and offsets.

Action: swap critical parts for datasheet figures (or at least limit op-amp rail-to-rail behaviour) and remember Falstad gives trends; absolute values follow measurement.

Issue 2: trying to verify an SPI exchange in Falstad

Section titled “Issue 2: trying to verify an SPI exchange in Falstad”

Cause: wrong tool; Falstad does not do MCU protocol-level simulation.

Action: switch to Wokwi (code-level, Section 2), or capture real waveforms with a logic analyser on hardware (Chapter 21 method).

  • Do: use Falstad to demonstrate the “why this value” of an analogue front end
  • Do: share an interactive circuit URL in review, not a static screenshot
  • Do: separate “trend is trustworthy” from “absolute value needs measurement”
  • Don’t: validate firmware logic or digital protocols in Falstad
  • Don’t: treat an ideal part’s direct reading as production performance

Key points of this section:

  1. Falstad is a browser, install-free analogue-front-end whiteboard: good at dividers, RC, op-amps; it does not run firmware
  2. Trends transfer, absolutes need re-checking: label the gap between ideal models and real ESP32 IO
  3. An interactive link is a review weapon: a draggable URL settles arguments better than a screenshot
  4. Use Wokwi for code-level simulation: the Falstad/Wokwi split is “circuit-level vs code-level”

Building a commercial IoT product?

We provide ESP32 ODM design-to-manufacturing services. From prototype to production — the team behind this tutorial can build it with you.

💡 Mention tutorial.imagrove.com in your Alibaba chat with us — get 10% off your custom project quote.

Talk to us →

First published attutorial.imagrove.com/kicad-hardware-design/01-getting-started-with-falstad-simulation/Please credit Imagrove and link back to this page when quoting or republishing.

Questions or issues with this tutorial?

Sign in with GitHub to leave a comment. If a step fails for you, tell us — we verify it and update the tutorial.