What the game lets you do
You can play Circuits now. This page is the physics behind it, and where a model falls short I say so.
You drop parts on a board and wire them: resistors, capacitors, coils, switches, diodes, LEDs, transistors, an op-amp, logic gates, and a few parts with a physics of their own, such as a lamp, a fluorescent tube, a battery, a motor and a speaker. The circuit runs live while you edit it. There are twenty example circuits, and each one is held to a reference, with the error shown. Click a part and a line tells you what it is doing now, worked out from the solver’s own numbers. No server is involved, and no AI.
A circuit is a set of equations
Two laws do most of the work. The currents entering any point of a circuit add up to zero, and the voltages around any loop add up to zero. These are Kirchhoff’s laws. Write the first for every node and you get one equation per unknown voltage, and the solver finds all of them at once. The method is modified nodal analysis (Ho and others): the unknowns are the node voltages, plus one current for every voltage source, coil, ammeter and switch. A capacitor becomes, at each time step of size , a conductance and a source:
A diode or a transistor makes the equations nonlinear, so the solver guesses, linearizes and solves again. Plain guessing is fragile. For a cold diode fed from 5 V through 1 kΩ it needed 171 rounds, above the 100 SPICE allows. Nagel’s limit on how far a junction voltage may jump (Nagel) did it in 10, both landing on 0.69254 V. The solver steps in time with the trapezoidal rule, which keeps the energy of an ideal LC circuit at 1.000000 after 100 periods. Backward Euler drained it to zero. At an edge taken ten times too coarse the trapezoidal rule alone overshot by 11 %. Starting with one small backward-Euler step left 0.001 %.
Some circuits have no answer, and the game says so in words. A loop of ideal sources with no resistance is refused, with the parts lit. But every real source keeps an internal resistance, so a shorted battery is not an error: an AA cell draws about 7.1 A and heats up, which is physics.
Parts with a second physics
Five parts carry a state that is not a voltage or a current. Each has a model, a card taken from one real part, and a check against a point its maker publishes.
The lamp
A filament is hot tungsten, and its resistance follows its temperature. The game balances electrical heating against radiation:
The resistivity comes from a published fit (Tolias). The filament is sized from the bulb’s rating alone, here a Philips 12 V, 20 W capsule at 3,000 K. Checked against the published rerating law (Wikipedia), the current goes as against 0.55 and the power as against 1.6. The light falls short: exponent 3.13 against 3.4 to 3.5, and the colour 0.350 against 0.42. One fitted gas-loss term repaired the colour and broke the current by 12 %, so I kept radiation only. Switched on cold, the lamp draws 28.7 A, 17 times its running current, and is back within double after 16.5 ms.
The fluorescent tube
Fed through a choke and a glow starter, the arc is a conductance that grows with the power in it (Loo). A Philips TL-D 18 W tube runs at 59 V and 0.36 A, a power factor of 0.8475. The simplest form of the model gives 0.905, so it fails. A fitted exponent gets 0.8475 exactly, but a fit leaves nothing to check against, so the tube’s dynamics are not proven. Several of its time constants have no source at all.
The battery
Charge sits in two wells, one available and one bound (Jongerden):
Draw hard and the available well empties before the bound one can follow, so you get less out. Rest, and it recovers. The first battery model I tried could not hold an alkaline cell’s capacity at all, so I dropped it. Fitted to an Energizer AA’s capacities at 25, 250 and 500 mA, the kinetic model predicted the held-out 100 mA point at 2,668 mAh against 2,520 read, 5.9 % high, and recovery too generously, by 7.6 to 17.5 %. So a battery’s lifetime is not a 1 % quantity.
The motor
The armature obeys , and the shaft . From four figures of a maxon RE 25 at 12 V the model gives a no-load speed of 4,874 rpm against 4,860, a stall torque of 128.8 mNm against 129, and a mechanical time constant of 4.10 ms against 4.
The speaker
The cone is a mass on a spring, driven by the coil. It reproduces a Visaton FRS 5’s air volume within 6 % and its 84 dB sensitivity within 1.6 dB. But the sheet contradicts itself: its own 0.5 g moving mass gives an electrical Q of 2.56, not the 1.81 it prints. I used the printed Q.
Heat, and parts that burn out
Every part has a heat state following
Where a datasheet prints a thermal curve, three such states are fitted to it: two parts so far, within 14 %. Cross a rating and the part turns red with the reason. Stay over its limit and it fails. A red LED on 5 V with no resistor passes its 115 °C junction limit (Kingbright) after 1.4 ms. A quarter-watt resistor across 9 V settles at 205 °C and never fails. A stalled RE 25 draws 66 W and its winding passes 100 °C after 5.3 s. The fail line, 100 K above the limit, is my proposal and not settled, and many heat capacities are my estimates.
Logic built from transistors
The gates are the 74HC family (Texas Instruments). I modelled a NAND from four MOSFETs beside the chip’s model. The truth tables agree. At 4.5 V the transistor version switches near 2.1 V, inside the chip’s guaranteed 1.35 to 3.15 V, and is faster: 1.8 and 4.6 ns against about 9. But its input is 80 pF, where a real input is 3 pF, 10 at most. That is outside what the family allows. A different test: over 20,000 simulated bounces, a bare input counted 4 presses for each press. A resistor and capacitor with a Schmitt input counted one. Four-bit addition shows the carry rippling in 61.6 ns, where the datasheet maxima add up to 160.
References
- L. W. Nagel, “SPICE2”, UCB/ERL M520, 1975. https://www2.eecs.berkeley.edu/Pubs/TechRpts/1975/9602.html (accessed October 25, 2026)
- C.-W. Ho, A. Ruehli and P. Brennan, “The Modified Nodal Approach to Network Analysis”, IEEE Trans. Circuits and Systems 22 (1975) 504. doi:10.1109/TCS.1975.1084079 (accessed October 25, 2026)
- P. Tolias, “Analytical expressions for thermophysical properties of solid and liquid tungsten”, arXiv:1703.06302. https://arxiv.org/abs/1703.06302 (accessed November 2, 2026)
- Wikipedia, “Lamp rerating”. https://en.wikipedia.org/wiki/Lamp_rerating (accessed November 2, 2026)
- Philips, Essential LV Capsule 20W G4 12V (order code 924062217101), product page. https://www.lighting.philips.com/prof/conventional-lamps-and-tubes/halogen-lamps/lv-halogen-without-reflector/essential-lv-capsule/924062217101_EU/product (accessed November 2, 2026)
- Philips, MASTER TL-D Super 80, TL-D 18W/840 1SL/25 (order code 927981184024), product page. https://www.lighting.philips.com/prof/conventional-lamps-and-tubes/fluorescent-lamps-and-starters/tl-d/master-tl-d-super-80/927981184024_EU/product (accessed November 2, 2026)
- K. H. Loo and others, “A dynamic conductance model of fluorescent lamp for electronic ballast design simulation”, IEEE Trans. Power Electronics 20 (2005) 1178–1185. doi:10.1109/TPEL.2005.854057. https://eprints.whiterose.ac.uk/783/1/stoned1.pdf (accessed November 2, 2026)
- M. Jongerden and B. Haverkort, “Which battery model to use?”, IET Software 3 (2009). https://ris.utwente.nl/ws/files/6728809/IET-final-beta.pdf (accessed November 2, 2026)
- Energizer, E91 datasheet, form E91NA1018, Internet Archive snapshot of January 4, 2025. https://web.archive.org/web/20250104024819/https://data.energizer.com/pdfs/e91.pdf (accessed November 2, 2026)
- maxon, RE 25 datasheet, order 118743. https://medesign.seas.upenn.edu/uploads/Guides/Maxon118743.pdf (accessed November 2, 2026)
- Visaton, FRS 5 datasheet. https://www.visaton.de/sites/default/files/dd_product/frs5_8.pdf (accessed November 2, 2026)
- Kingbright, WP7113SRD/D datasheet. https://www.kingbrightusa.com/images/catalog/SPEC/WP7113SRD-D.pdf (accessed November 2, 2026)
- Texas Instruments, SN74HC00 datasheet. https://www.ti.com/lit/ds/symlink/sn74hc00.pdf (accessed November 2, 2026)
Revised November 30, 2026.
Play Circuits Play it on a computer Circuits’ page: how to play, what it needs