Table of contents
  1. What the simulation calculates
  2. Turning it on and off
  3. Reading results on screen
  4. Power settings
  5. When simulation is blocked or errors out
  6. The order to check when values look odd
  7. Summary

Soldering is hard to undo once done. Patterndo's simulation calculates a circuit drawn on a perfboard as if it were actually powered on, so before you solder you can check whether an LED lights, how much current flows through a resistor, and whether an IC pin is HIGH or LOW. This article covers how to turn simulation on and off, how to read results on screen, power settings, and the causes when simulation stops as "Blocked" or "Error". If you do not have a circuit yet, first build an LED circuit with Getting Started with Patterndo.

What the simulation calculates

It treats the circuit as connections of devices such as supplies, resistors, and diodes, and solves the voltage of each net (the lines connected electrically) and the current through each device. The calculation keeps updating in steps of 0.01 second at a speed similar to real time, so you can follow a capacitor charging or a counter IC's state changes over time.

CategorySupported parts
Passive componentsResistors, potentiometers, capacitors, polarized capacitors
SemiconductorsLEDs (6 colors), diodes, Zener diodes, NPN and PNP transistors
Input and displayDIP switch, tact switch, seven-segment (FND)
ICsAbout 30 built-in models including the NE555, LM358 and LM324, 74LS and 74HC logic and counters, and the CD4000 series

The simulation is a tool for checking circuit design, not a laboratory that reproduces every characteristic of real parts. Part variation, wiring resistance, noise, switch bounce, and IC propagation delay are either not in the model or simplified. In particular, a transistor is treated as a switch that turns on when the base–emitter voltage exceeds about 0.5 V, so current gain (hFE) and degree of saturation are not reflected. Work out base resistor values yourself with the formulas in Transistor Switch Circuits. After soldering, the surest way is to measure the same points with a multimeter and compare (How to Choose a Multimeter).

Turning it on and off

Press the Sim button on the top bar to start, and the notice "Start live simulation" appears. While running, the button changes to a red Stop, and pressing it stops with the notice "Stop simulation". Simulation has no dedicated shortcut, and you can also start it with "Start simulation" in the Ctrl+K command search.

Button labelStateWhat it does
SimIdlePress to start
Stop (red)RunningPress to stop
Blocked (orange)Could not startThere is an unsupported part or an incomplete connection. Hover to see the reason, and press again to retry after fixing
Error (red)Problem during calculationCheck the reason the same way and retry

On a narrow screen the text hides and only the icon is visible. Even if you change part values or fix wiring while simulation is on, the result keeps updating. For example, if you change a resistor value, you can see the current change right away.

Reading results on screen

Supply summary

On a wide screen, two values appear on the top bar.

  • VCC: the voltage at the supply terminal. Under load it drops slightly below the set voltage because of internal resistance.
  • I: the total current the supply delivers (mA).

For a 5 V circuit with one LED and 330 Ω, it shows something like "VCC 5.00V I 9.1mA".

How parts look

  • LED: shown lit when current flows, and drawn brighter when much more than the rated current flows.
  • Seven-segment: the lit segments are shown (Driving Seven-Segment Displays).
  • Switches: for a DIP switch, toggle ON and OFF with the SW1 to SW4 buttons in the properties panel, and for a tact switch, press the button part of the part. You can change them during simulation and the result is reflected right away. A tact switch is not the kind that is on only while pressed; each press alternates between pressed and released.

The net probe window

In the 2D view during simulation, lightly click a wire or hole and an information window for that net opens.

  • At the top are the net name and voltage (V). If it has no name of its own, it is an automatic name made from the position like Net_35,2, and the power rails are VCC and GND.
  • Below it are the parts or per-pin currents connected to that net, in mA. The green Inflow means the side that delivers current into the net, the red Outflow means the side that takes current, and the gray Idle means almost nothing flows. If there are many items, it shows only the 6 with the largest current and abbreviates the rest as "and N more".
  • If outputs driving in opposite directions are tied to one net and both currents exceed 40 mA, a red Output conflict band appears at the bottom. It is not shown for power rails.

Close it with × or Esc. It does not open in the 3D view, so return to 2D to check (2D and 3D Views).

Pin information for ICs and seven-segment displays

During simulation, hovering over a pin of an IC or seven-segment display brings up a small information window. It shows the part name and pin number, the pin's role, that pin's voltage, and HIGH or LOW. For an output pin, it also tells which way the IC is driving, such as "Driving HIGH" or "Driving LOW". The HIGH and LOW indication is a simple criterion by whether the voltage is 2.0 V or more, so check the threshold voltage a real IC recognizes in the datasheet (How to Read a Datasheet). This information window appears only on devices with a pointer, like a mouse.

Power settings

Open Settings and change the power model on the Power tab. The changes take effect only after you press Apply.

ItemDefaultMeaning
Supply voltage5 VThe supply voltage with no load. For a 9 V battery circuit, change it to 9
Internal resistance0.2 ΩThe supply's output resistance. The larger it is, the more the voltage drops when current flows
Max current1 AThe supply's limit. If exceeded, the voltage is lowered to fit this value
Run anyway even with unsupported ICsOffIf on, ICs without a model are left out and only the rest is calculated

Max current is the same idea as the current limit of a bench supply (Choosing a Bench Power Supply). When the limit is hit, the warning "The battery's maximum current limit engaged and the voltage dropped" is shown in diagnostics. If the circuit is close to a short, this warning appears first.

Experiment: changing the supply voltage

If you raise the supply voltage to 9 V and leave the red LED on 330 Ω, the current becomes about 20.7 mA, which exceeds the LED's maximum rating of 20 mA and the warning "LED current exceeds the maximum rating" appears. If you raise the resistor to 560 Ω, it drops to about 12.4 mA and the warning goes away. If you want to calculate the resistor value yourself, use the LED resistor calculator.

When simulation is blocked or errors out

If there is a problem at start, a "Simulation blocked" or "Simulation error" notice appears and the diagnostics panel opens automatically to show the first cause. Common causes and fixes are as follows.

MessageCauseFix
Cannot find the VCC rail / Cannot find the GND railThe power rail wiring on the board's top or bottom row was erasedRedraw the wire from the left end to the right end on the top and bottom rows
A resistor is not fully connected to the circuitOne pin of a resistor is connected to nothingConnect a wire to the missing pin
An LED is not fully connected to the circuitThe LED's A or K is floatingConnect both pins
The resistance value is not validA value that is zero or not a numberRe-enter the value in the properties panel
The IC model cannot be resolvedNo model is set or it is not in the listChoose a model in the IC properties, or specify it directly in GENERIC form
The IC power connection is incompleteThe VCC or GND pin is not connected or is tied to the same netCheck the power pin wiring
This model does not currently support DC analysisAn IC model whose calculation method is not supportedTurn on run-anyway on the Power tab of settings, or use another model
The circuit solver failed to convergeUnstable connections of LEDs, diodes, or transistorsCheck wiring and polarity around the nonlinear devices

The detailed meaning of each message is explained in Reading Diagnostics Messages.

The order to check when values look odd

  1. Check that the resistor value units are right. 330 is 330 Ω, 3K3 is 3.3 kΩ, and 1M is 1 MΩ.
  2. Check the LED's A and K and the + direction of electrolytic capacitors.
  3. Check that VCC and GND are connected to the IC's power pins. For a 74LS00, those are pins 14 and 7 (Reading DIP IC Pin Numbers).
  4. Check that no input pin is floating. For places needing pull-ups and pull-downs, see Tact Switches and Pull-Up/Pull-Down Resistors.
  5. Use the net probe window to check the voltage of a suspect wire directly.

Summary

Turn it on with the Sim button, and read results from the VCC and current values at the top, the net probe window, and the IC pin information. Change power settings on the Power tab of settings. If it is blocked or errors out, fix things starting from the first item in the diagnostics panel, and since simulation results are for pre-solder checking, check with a multimeter once more on real parts. How to change the display level of diagnostics is in Reading Diagnostics Messages.

This article is general guidance for learning purposes. Specifications and pinouts differ between parts, so check the datasheet of the part you use before real work. For safety-related work, read the cautions for each item first.