Resistor and Switch Attenuator Circuit Transfer Calculator
This web page provides a calculation tool to analyse an electrical circuit consisting of resistors and switches (relays)
of any topology.
For each potential combination of switch states (open/close), it determines the
voltage transfer ratio (the attenuation in dB) from input to output,
and the input and output resistances of the circuit.
The analysis results are shown in graphs further down in this page, as well as in table format.
If so desired, the table could be copied into a program like excel for further filtering or graphics.
Circuit definition input
The program for analyzing switch-resistor circuits takes as input a textual 'netlist' file,
in a 'spice'-like format. That means:
The input is read line-by-line. Lines with an unfamiliar first character are silently ignored.
This tool will interpret lines that start with R, Q, and V.
A node in the network is a set of electrically connected terminals (pins).
Nodes are numbered from 0 upwards, where the number 0 is reserved for GND,
which is the reference for the other node voltages.
R[identifier] [node-a] [node-b] [value] Describes a resistor. The identifier is a name or number.
The node-a and node-b are unsigned-integer node numbers. The value is a floating-point number,
or a fixed-point number with an optional trailing multiplier character (k for 1000, M for 1000000).
Q[identifier] [node-1] [node-c] [node-0]
describes a switch. The node-c is the switch center-contact,
the node-1 is the switch terminal when the relay is switched on.
Apology to those who are aware that I mis-use Q here :-(
Vin [node-in] 0
Vout [node-out] 0
these indicate to the program which two nodes are input and output terminals.
Such a text-file can be created with your familiar text editor, or with a real schematic editor.
You can cut-and-paste the created text into the text-box below to replace the example text: