Don't have the parts? Afraid of burning out the Arduino? Or want to see the current flowing through the circuit? Simulation programs let you build the circuit on screen and experiment with it, free and without losing anything.
What does a simulator do?
You give it the parts, their values and the connections, and it solves the equations (Ohm's law, Kirchhoff and the behaviour of the capacitor and transistor) and tells you the voltage and current at every point. There are two kinds:
- An electrical simulator (Falstad and LTspice): calculates the circuit itself in numbers.
- A microcontroller simulator (Wokwi and Tinkercad): runs your code as if on a real chip, with ready-made modules.
Falstad (Circuit Simulator)
- Runs straight in the browser.
- Shows the current moving as dots, and voltage as colours.
- Has many ready-made examples (filters, oscillators, the 555 and logic gates).
- The best thing for understanding Ohm's law, Kirchhoff's laws and the capacitor.
A trick: double-click any part to change its value, and hover over a wire to see the voltage and current. And there's a slider you can link to a resistor's value and change while seeing the effect instantly.
Tinkercad Circuits
- From Autodesk, free with an account.
- You place parts on a realistic-looking breadboard with an Arduino Uno, write the code (or blocks) and run it.
- Excellent for beginners and teachers.
- Its drawback: the parts library is limited, and there's no ESP32.
It has a virtual multimeter you can place and measure with exactly like the real one, which is excellent practice before you pick up the real multimeter. And if you connect an LED without a resistor, it shows you that it burnt out.
Wokwi
- A simulator for the Arduino, ESP32 and others in the browser.
- Supports many libraries and modules (displays, sensors, WS2812 strips and keypads).
- Even the ESP32's WiFi is simulated, within limits.
- The best choice for testing code before the hardware.
Other features: it has a virtual logic analyser for viewing I2C and SPI signals, and you can debug step by step. And the project is saved with a link you can share so anyone can see the problem for themselves.
LTspice
- A free SPICE program on the computer.
- Accurate for analogue and power circuits: filters, op-amps, regulators and buck converters.
- Gives graphs of voltage and current against time and frequency.
- Harder at first, but very powerful.
- And KiCad has a SPICE simulator too. See a first project in KiCad.
A first experiment in LTspice: an RC filter
- Place a voltage source (voltage), a resistor of 1k, a capacitor of 100n, and ground.
- On the source, choose AC 1 (for frequency analysis).
- From Simulate, choose .ac dec 100 10 100k (from 10 Hz to 100 kHz).
- Run it, and click on the output: you'll see the curve fall after about 1.6 kHz, exactly as the calculation in RC filters said.
Then try .tran (time analysis) with a pulse source, and watch the capacitor charge.
EasyEDA and design programs
EasyEDA in the browser has schematic drawing, simple simulation and PCB design, linked to a large parts library. And KiCad on the computer is more powerful for design and has ngspice for simulation. If you'll make a PCB in the end, start drawing the schematic in one of them from the beginning.
Which should you choose?
| You want to | Use |
|---|---|
| See current and voltage with my own eyes | Falstad |
| Learn Arduino without parts | Tinkercad or Wokwi |
| Test ESP32 code and modules | Wokwi |
| Design an analogue or power circuit accurately | LTspice |
Suggested first experiments
- A voltage divider in Falstad: change the two resistors and watch the output. Then add a load and watch the output drop. See the voltage divider.
- An LED and resistor in Tinkercad: shrink the resistor until the LED burns out.
- A transistor as a switch: a base with no resistor, and watch the current. See the transistor as a switch.
- A common-emitter amplifier in LTspice: see the output inverted and amplified, and raise the input until it clips.
The limits of simulation
- The simulator doesn't know about a loose connection, a poor breadboard or a long cable.
- The parts in a simulator are usually ideal: no noise, a perfect battery, and a resistor that doesn't heat up (unless you tell it to).
- The simulator won't tell you that the resistor will burn out unless you look at the power yourself.
Mistakes that fool you
| In the simulator | In reality |
|---|---|
| Works without decoupling capacitors | The chip hangs |
| The battery delivers any current | The battery's voltage drops and it heats up |
| The ideal op-amp reaches the supply | The LM358 stops about 1.5 V short |
| Wires have zero resistance | Thin wires cause a drop |
| The motor makes no noise | The motor resets the Arduino |
So simulation is a step before the hardware, not a substitute for it. Try it, understand it, then build and measure.
FAQ
Does the simulator need the internet? Falstad, Wokwi and Tinkercad are in the browser, so they need the internet (Falstad has an offline version). LTspice and KiCad are on the computer and don't.
Can I rely on simulation for a university project? As a design and documentation step, yes, and lecturers like graphs. But build and measure too, and compare the numbers. The difference between simulation and reality is itself an important lesson.