If you don't want to read all this stuff, click this link Click the switches and see what happens. Then come back here.
I started this project to demonstrate an idea for editing electrical ladder diagrams in a web browser. Then someone wanted to click on the switches and have them change state. Of course the light bulbs had to light up. Then someone else wanted the "meter". I accidentally discovered the requirement for the wires to have finite resistance (it's a long story). By the time the LEDs only worked under forward bias, I had pretty much used up my enthusiasm. But it's a cool toy!
In circuit testing mode, your circuit is operating. Lamps light, etc. If there are switches in your circuit, you can click on them to change them from open to closed and vice-versa. Your cursor arrow is also your meter probe. When you place it on a wire, the "meter" readout at the left shows the voltage at that point, with respect to the negative battery terminal, and the current through that segment. If you have your probe on a branching junction, the current may not display. When your probe is on a lamp or a resistor, the voltmeter shows the voltage drop across the element as well as the current through it. In this mode, the meter reads "dV" instead of "V".
When you click the link below, you'll start in the "circuit editing" mode of the circuit simulator. You know you're in this mode because the battery switch is open. Also, the palette is present on the left side of the screen. To build your circuit, click a circuit element from the palette. A large version of the selected element shows up at the top of the palette. As you move your cursor over the wiring area above the batteries, a ghostly image of the element is displayed. Position this where you want it and click to stick it down. The blank cell in the palette is the eraser. Use it to erase unwanted circuit elements.
It's best to start by sticking down lamps, switches, etc. Then select wire segments and connect everything together.
The simulator allows you to save your circuits for later recall. You are asked to use your email address as a key to store your circuits separately from everyone else's. If you are paranoid about giving me your email address, just make one up. But remember what you used! There is no other way to recall your saved circuits.
Other experiments you might find entertaining:
Follow this link to the Circuit Simulator
The batteries should have some internal resistance. Simulating resistance in the wires hasn't satisfied some critics.
The V/I curve of the LEDs is not very realistic. In fact, I'm tempted to take them out altogether.
The instructions are pretty pathetic. Feel free to write a better set and email them to me.
The program on the server parses the diagram and writes a system of equations describing the voltage and current at each point in the diagram. This is really the hard part. The voltage equations are basically "Ohm's Law" and the current equations are "Kirchoff's Law". Once I have the equations, I solve the system of simultaneous equations using Gauss-Jordan reduction (with partial pivoting). This is a bit of an oversimplification. There are some heuristic transformations applied to the equations to handle loose ends, isolated loops, and the diode-action of the LEDs.