THE INTERACTIVE CLASSROOM

Circuit lab.

Quicker to draw than the circuit lab you use now — and it saves, shares and even builds itself.

●   LIVE SIMULATION
BUILD. CONNECT. EXPLORE.
Ready● Junction · Crossings without a dot are not connected
READY FOR NEXT LESSON.

Which file do I want? JSON is the working circuit: open it again here later, or send it to a student or colleague so they can keep building and changing values. SVG and PNG are pictures of the diagram for slides and worksheets — SVG stays sharp at any size and can be recoloured in design tools, PNG pastes straight into anything. Pictures cannot be reopened as a circuit, so save the JSON too if you may want to edit it.

A quick guide & the physics behind the model

Build: Drop components onto wires to insert them. Wire mode turns freehand strokes into straight segments, preserving corners at any angle. Start or end near a terminal or wire to join it. Midway crossings do not join. A wire can never be left ending behind a component, where it would look connected but is not: release it over a bulb or resistor and it joins that component’s nearest terminal. Move mode keeps connected wires attached when components move.

Edit: Select components for values and rotation. Reverse polarity changes source or diode direction. Right-click a component to detach it and bridge its former terminals. Delete removes the selected item. Keyboard: V move, W wire, R rotate, Delete remove, Ctrl/Cmd Z undo. Switches start closed: double-click one, press S, or use its button to open and close it.

Physics: The Bulb is a fixed resistance, so it is ohmic; the Filament lamp heats as it works, so its resistance climbs with the power it dissipates and it is not. Glow follows power for both. Cells and AC supplies are ideal. The separate Battery includes adjustable internal resistance (default 1 Ω), with terminal voltage E − Ir when discharging. Wires and ammeters have zero resistance; voltmeters draw no current. An ideal source short circuit pauses the electrical solution and shows a message. Diodes follow an exponential forward curve, carrying 10 mA at the stated threshold and ten times that for each further 0.115 V, so the knee is a curve rather than a corner. Potentiometers have a third wiper terminal: connect all three as a potential divider, or use one end and the wiper as a variable resistor. AC settings are peak volts and a teaching frequency of 0.1–10 Hz. No filament heating, capacitance or inductance is modelled.

Energy: The ring around each charge shows energy per coulomb, not individual electrons. Six segments make one ring and each filled segment is 1 J/C, with part-filled segments for fractions. Rings stack outwards, so four full rings are 24 J/C. Carrying more than that switches to relative reading: a single plain ring, filled with the fraction of the highest energy per coulomb found anywhere in that circuit. Energy changes across components by their potential difference. This mode uses positive charge and is disabled with AC. Charge markers illustrate current, not literal drift speeds.

I–V characteristics: Load the IV characteristic · test rig example: supply, ammeter and variable resistor in series with the component under test, and the voltmeter across it. Slide the variable resistor, read V and I at each setting, and plot I against V by hand. A resistor gives a straight line through the origin; the filament lamp bends over as its filament heats; a diode stays flat until its knee then rises steeply, and passes nothing when reversed. Swap the component under test by selecting it, choosing Detach & bridge, then dropping another one onto the same wire.

Faults: A short circuit is a path around the supply with almost no resistance. Ideal cells have no finite solution there, so the model adds a milliohm of source resistance to keep going and flags the fault: current races round the loop and flames appear on the overheating supply. A real battery catches fire once its current passes 90% of E/r. Nothing is damaged — open a switch or add resistance and it recovers.

Exports: JSON keeps the circuit itself, for reopening or sharing with someone who will edit it. SVG and PNG are pictures of the diagram for worksheets and slides; they leave out the selection highlight and cannot be reopened as a circuit.

Saving: Browser saves stay on this device and may be cleared by your browser. Download a plain-text JSON circuit for a lasting, shareable copy. Uploaded files are validated and never executed.

Ask an AI to build a circuit for you

Paste the instructions below into ChatGPT, Claude or any other assistant — as a system or project prompt if it has one — then describe the circuit you want in your own words. Save what it writes as a file ending .json and open it here with Upload JSON. Uploaded files are checked before they are used and are never run as code, so a mistaken file is refused rather than doing any harm.

You write Circuit Lab files. Circuit Lab is a schools circuit simulator at
fenwicktutoring.com/simulations/circuit-lab. When I describe a circuit, reply
with one JSON file I can save and open with the simulator's "Upload JSON"
button. Output the JSON only: no commentary, no code fences.

SHAPE

  {
    "format": "fenwick-circuit",
    "version": 1,
    "nodes":      [],
    "wires":      [],
    "components": []
  }

NODES are the points where things join.

  { "id": "n1", "x": 250, "y": 200 }

Ids are any short unique strings. Every id in the file must be unique across
nodes, wires and components together. Keep x between 60 and 1040 and y between
70 and 600: that is the visible canvas, 1100 by 680, with y increasing
downwards.

COMPONENTS sit at a centre (x, y), turned by "angle" degrees, and own the
terminal nodes they are wired through.

  { "id": "c1", "type": "cell", "value": 6, "x": 300, "y": 200,
    "angle": 0, "flip": false, "a": "n1", "b": "n2" }

The rule that matters most: a terminal node's coordinates must be exactly
where the component puts that terminal, or the drawing will not line up.

  node a = (x - 50*cos(angle), y - 50*sin(angle))
  node b = (x + 50*cos(angle), y + 50*sin(angle))
  node w = (x + 50*sin(angle), y - 50*cos(angle))    potentiometer only

So angle 0 puts a 50 to the left of centre and b 50 to the right; angle 90
puts a 50 above and b 50 below. Prefer 0, 90, 180 or 270.

Terminal a is the positive terminal of a supply, and a diode conducts from a
to b. Setting "flip": true reverses that.

Types, and what "value" means for each:

  "cell"       volts                  ideal supply
  "battery"    EMF in volts           also needs "internalResistance", above 0 up to 1000 ohms
  "ac"         peak volts             optional "frequency", 0.1 to 10 Hz
  "switch"     leave value as 1       "closed": true or false
  "bulb"       ohms                   fixed resistance, ohmic
  "lamp"       cold ohms              filament lamp, resistance rises as it heats;
                                      optional "position" 0 to 1 sets how strongly
  "resistor"   ohms
  "variable"   maximum ohms           "position" 0 to 1 is the setting
  "pot"        maximum ohms           "position" 0 to 1 is the wiper, and it needs
                                      a third terminal node "w"
  "voltmeter"  1000000000             ideal, draws no current
  "ammeter"    0.001                  ideal, no resistance
  "diode"      threshold volts, 0.7
  "led"        threshold volts, 2

"value" must be greater than 0. "position", "flip", "closed", "frequency" and
"internalResistance" are only read for the types listed above.

WIRES join two nodes, bending through any corner points you give.

  { "id": "w1", "a": "n2", "b": "n3", "points": [] }
  { "id": "w2", "a": "n4", "b": "n1",
    "points": [ { "x": 750, "y": 450 }, { "x": 250, "y": 450 } ] }

"points" is required even when empty. Corners are drawing only, not
junctions. Lines that merely cross do NOT connect: things are connected only
by sharing a node id, or by a wire between their nodes. To branch, run several
wires from the same node id.

LIMITS: at most 200 nodes, 300 wires and 80 components.

LAYOUT: build on a rectangle. Put components along the sides, leave at least
150 units of clear wire between them, and route wires as horizontal and
vertical runs. Wire an ammeter into the loop in series, and a voltmeter across
whatever it is measuring.

WORKED EXAMPLE, a 6 V cell lighting a 10 ohm bulb:

  {
    "format": "fenwick-circuit",
    "version": 1,
    "nodes": [
      { "id": "n1", "x": 250, "y": 200 },
      { "id": "n2", "x": 350, "y": 200 },
      { "id": "n3", "x": 650, "y": 200 },
      { "id": "n4", "x": 750, "y": 200 }
    ],
    "wires": [
      { "id": "w1", "a": "n2", "b": "n3", "points": [] },
      { "id": "w2", "a": "n4", "b": "n1",
        "points": [ { "x": 750, "y": 450 }, { "x": 250, "y": 450 } ] }
    ],
    "components": [
      { "id": "c1", "type": "cell", "value": 6, "x": 300, "y": 200,
        "angle": 0, "flip": false, "a": "n1", "b": "n2" },
      { "id": "c2", "type": "bulb", "value": 10, "x": 700, "y": 200,
        "angle": 0, "flip": false, "a": "n3", "b": "n4" }
    ]
  }

Before you answer, check every component's terminal nodes are at the
coordinates the formulas give, that every id is unique, and that every "a" and
"b" names a node that exists.