Tony Fisher's Circuit Simulator
This is a circuit simulator, written in Java
and C++, which can be accessed via the World Wide Web.
If you don't have a Java-capable browser, the best I can offer is a screen dump
showing the simulator running.
Drawing and editing your circuit
You draw an analogue electronic circuit on the screen
by ``pointing and clicking'' with the mouse in a way which is
tedious to explain,
but which a few minutes' experimentation will make clear. At the
moment, you can include only passive components (resistors, capacitors and
inductors), voltage sources and current sources, voltmeters, and
op-amps. Other active devices, e.g. diodes and transistors, might follow one day.
Simulating your circuit
When you have drawn your circuit, press the ``simulate'' button.
At this point, if one or more components lacks a value, you will
be invited to supply as many values as are required. The component whose value
you are being asked to enter turns red, so you know which one the program
is talking about.
Once all components have been given values, the program analyses the circuit
and computes the voltages at each node. This process is called ``simulation''.
When the computations are complete, a number of graphs will appear.
There will be as many graphs as there are voltmeters
in your circuit, and each graph shows the voltmeter ``reading'' as a
function of frequency. Voltmeters measure complex voltages, and the graphs
show the magnitude in red and the phase in blue.
The graphs are produced with the help of the excellent
gd GIF manipulation library
from Quest Protein Database Center.
A table of complex voltages at each node, for various values of frequency, is also given.
This is a teaching tool. It's not an ``industrial strength'' design tool;
it's suitable only for teaching the elementary properties of simple circuits
and circuit elements. It's not finished. There are bound to be bugs -
especially since this is my very first Java program!
The error messages are
sometimes not helpful. The message ``The nodal admittance matrix is
singular'', for example, generally means that one or more nodes has an
undefined voltage, or that your circuit involves infinite currents
This simulator does not run under Microsoft Internet Explorer 4, which reports
``Class Cctsim not found''.
This simulator does not run properly under
some versions of Netscape Navigator Gold for PCs.
Symptoms of the bug are:
I am trying to track down this bug. Similar bugs have been reported by Netscape
(``XOR drawing doesn't work'') and Sun
(``fixed in JDK 1.1.2'', bug no.402 8864)
and mentioned in some old news articles in comp.lang.java.
I suspect that the setXORMode method is behaving in a way I did not expect.
- Components in the prototype area (the scrollable menu of components on
the left of the applet window) appear in strange colours. These components
should appear in black or red. Anything else is an error.
- When you select an example circuit from the list below, all the components
should have values. If they don't, this is an error.
- When you press the ``simulate'' button, all nodes (junction points) in the
diagram should receive node numbers. If they don't, this is an error.
Netscape claim that you need a
256-colour video driver in order to run Java applets under Windows.
If you are a Java expert and can guess what the problem is, please
let me know.
Unix implementations (e.g. Netscape 3.01 and 4.05) appear to be fine.
Here are some example circuits for you to try.
To enter your own circuit
I'd appreciate comments on this package by email to
Tony Fisher /
email@example.com 24 Jun 1997