After spending ages building a schematic the time has finally arrived: the first simulation is run. The Simulation Results… window pop opens and there it is …
No error messages.
No dire messages about Timestep too short or Trouble with node X
What’s gone wrong?
The most likely cause is one of the most overlooked beginners’ mistakes: there are no signal probes in the schematic. The simulation has run fine. It just didn’t produce any results simply because it had not been asked to!
In order to view any useful output from a simulation, the circuit must have at least one voltage probe or one ammeter in the circuit. In basic simulations these will be the Voltage Probe and Ammeter symbols from the EasyEDA Libs. In more advanced simulations, these can be implemented using a
probe command. In either case, at least one type of probe must exist in the simulation schematic. If no probe is present, the simulation will run but the Simulation Results… window will be empty and no WaveForm window will open.
All voltage measurements in real circuits are actually measurements of voltage differences. In many cases such as when probing a voltage using an oscilloscope probe, it is easy to forget that the voltage being measured is, in reality, the difference between the voltage at the probe tip and wherever the probe ground lead is connected. In the same way it is easy to forget that probing a single ended voltage in a simulation schematic is with respect to wherever the ground node has been placed.
- A common mistake, however, is to attach a voltage probe to ground.
In spice simulations, all voltages are referred to ground so not only is there no need to attach a Voltage Probe to the ground net, in fact doing so will throw an error in the simulation.
In a real circuit, probing a voltage between any two points places a resistive load between them. With a good quality voltmeter that resistance may be very high, in the order of hundreds of MegΩ. With a x10 oscilloscope probe it will be 10MegΩ. There will be some stray capacitance across that resistance. There will also be stray lead inductances. If the voltage being measured is an AC signal then impedances due to these stray and parasitic components will also load the circuit.
Note that in simulations, voltage probes present an infinite resistance and have no stray capacitance or inductance. In effect, voltage probes have an infinite bandwidth.
The following example illustrates some of the probing techniques described above:
The following example shows a number of ways to measure voltages with respect to ground or differentially using;
The EasyEDA Voltmeter;
Esource (a.k.a. Voltage Controlled Voltage Source or VCVS) with a Voltage probe to probe the output;
B, source (a.k.a. behavioural or dependent source) configured as a VCVS using a Voltage probe to probe the output.
The schematic also demonstrates the importance of:
Giving voltage probes names that are identical to the nets to which they are attached;
Naming all nets in a schematic;
In a real circuit, probing the current in a wire places a resistive load between them. This will cause some voltage drop across the ammeter. With a good quality ammeter that voltage drop may be very low, in the order of millivolts. There will be some stray capacitance across the insertion resistance and from the ammeter connections to ground. There will also be stray lead inductances. If the current being measured is an AC signal then impedances due to these stray and parasitic components will also load the circuit.
Note that in simulations, current probes present zero insertion resistance and have no stray capacitance or inductance. In effect, current probes have an infinite bandwidth.
The following example shows a number of ways to measure currents with respect to ground or differentially using;
- As a current using the Ammeter symbol;
- As a linearly scaled voltage using an H Current Controlled Voltage Source (CCVS) (or an F Current Controlled Current Source (CCCS) with a resistor);
- As a linearly scaled current using an F Current Controlled Current Source (CCCS) driving an Ammeter;
- As a voltage that can be an arbitrary function of the current flowing through a 0V Voltage Source using a BV source (or a BI source with a resistor);
- As a current that can be an arbitrary function of the current flowing through a 0V Voltage Source using a BI source driving an Ammeter.
Note however, that although a 0V source can be used to monitor a current, it cannot be used to measure a current so that it can be directly displayed in the Simulation Results… window or plotted in Waveform.