Frequently Asked Questions

Common problems when using Easy-Spice Back


One of the most frustrating errors is when your design runs, but fails with a calculation error of some type. This FAQ is intended to cover the commonest reasons why this might happen.


Most of these errors are due to differences in circuit geometry between Spice and the real world. Probably the commonest is having two unconnected circuits within the same design. This is often caused in a subtle way by decoupling. If part of the circuit is floating with respect to the rest, for whatever reason, Spice cannot determine a d.c. operating point and will fail.

Look for capacitively decoupled elements, transformers, and accidentally isolated elements, such as free components. Include a d.c. path, which may be through a large resistor, or might be by adding a generator to indicate a d.c. offset. Please be aware that the offset need not be realistic. If your logic is operating at 5V, but offset by 10kV, small differences in voltage will be swamped by the 10kV offset. If you set an offset of, say 100V, instead, your calculations gain two decimal places in accuracy, even though the offset is 'wrong'.

A second frustrating problem is when the design appears to simulate, but gives wrong or missing results. This is frequently due to the pin mapping being incorrect on one or more components. For instance, the correct pin order for a JFET is Drain, Gate, Source, so if the component is using Gate, Source, Drain, clearly it just won't work! Fortunately there's a simple answer, in the form of a special value called 'SpicePinOrder'. This takes as its parameters the pin numbering of the correct order (separated by spaces), which in this case would be '3 1 2'. However, life is even easier than that, as it recognises pin names as well, so regardless of the actual pin order, using 'D G S' will guarantee correct operation (assuming that those were the pin names used).

If you do use the numbers, you need to be aware that the numbers appearing in the schematic aren't necessarily the correct ones. The numbers that are required are those of the original schematic SYMBOL, so when the component was built, unless 'Assign Pins 1:1' was used, these will have been replaced by the PCB Symbol numbering. It will probably be necessary to edit the component from the library to determine the correct order. This is another good reason for using pin names instead!

Sometimes, a component which does have an existing Spice model will fail with a message along the lines of 'model xyz could not be found'. This does not mean that the libraries are faulty, but points to a more subtle problem. Spice uses various single character device descriptors to categorise the models. 'X' is the most common, for a subcircuit, with 'Q' for bipolar transistors, 'J' for JFETs, 'M' for MOSFETS, 'R' for resistors, 'C' for capacitors, 'L' for inductors, 'D' for diodes, etc. Now for the most part this works well, as Spice knows that R23 is a resistor, but there can be problems. Consider a circuit where the bipolar transistors simulate correctly, but the MOSFETs on the output can't be found. On inspection, they're called Q18 and Q19 - and Spice expects a bipolar model. The cure is to add a new value, 'SpiceDevice', and in this case, give it the value 'M'. Spice now knows that Q18 and Q19 are MOSFETs, and will simulate accordingly.

Finally, it is not necessary to liberally sprinkle your design with ground nodes. Spice recognises the net name '0' as ground, so any net with this name will automatically be treated as ground, even if not connected to other parts of the same net.

Back | Contents KB020045 / 31-Dec-2009 / Keywords: spice easyspice simulation