F.A.Q.

Home
free download
register 5Spice
Links
F.A.Q.
white paper
consulting
privacy
contact

user comments

 

Frequently Asked Questions

VISTA
I am running Windows Vista. 5Spice doesn't run or has stopped running or complains it can't save files. 5Spice on my friend's Vista computer doesn't have problems but the program's Help doesn't work on either computer.

all Vista users > Download v1.30 or later of the program

XP with Service Pack 2, running as ordinary user 
Almost everyone runs Windows XP as an administrator. If you run as an ordinary user with 5Spice earlier than v1.30, 5Spice complains it can't save files. Download latest 5Spice.

General

1. Who has to register the program?

2. What are the benefits/changes when I register the program?

3. I installed a new operating system and my registration code no longer works. How do I transfer the registration to the new system? (note: upgrading the existing operating system will not cause a problem)

4. Why a separate Spice program? (my PC board layout program includes Spice)

5. Can I use 5Spice in countries where numbers are written differently than in English?

6. Does 5Spice support users new to circuit simulation?

7. Why can't I use the latest version of WinSpice with 5Spice?

8. After running DC Bias analysis, I don't see the node voltage pop up when I position the mouse over wires in the schematic?

Install / Uninstall

9. I installed 5Spice on top of an earlier version in Windows98. Why do I get an error message every time I try to run a simulation?

10. I uninstalled the program (version 1.11 and earlier) and did not re-install it or installed a version newer than 1.11. After re-booting, the Tahoma font is missing?

Schematic

When I load one of my schematics, it says "Block Enabled" below the schematic and the mouse cursor doesn't work? (the schematic was saved with a block selected)

=>Add a part to the schematic. Or install 5Spice v1.30 or later.

Subcircuits / Library

11. I can't find the right schematic symbol for my Subcircuit?

12. Why doesn't the Subcircuit symbol have the same pin numbers as my favorite device package?

13. How do I add models and subcircuits to the Library?

14. I added files to the Library but do not see the models/subcircuits when I edit the symbol in the schematic.

15. I added MOSFETs to the Library but do not see them when I edit the symbol in the schematic? (or if I uncheck the "only show matching subcircuits" box and select the MOSFET, I get a "too many parameters" error from WinSpice when I run the simulation.)

16. How do I make a 5Spice schematic into a subcircuit?

100. How do I write my own Spice subcircuit?

Technical

17. DC Bias fails with my feedback circuit no matter what I do?

18. How do I graph power or some other calculated quantity?

19. Transient Analysis gives wrong results for my switching power supply circuit. Why?

20. NonLinear source - Why is the source's output zero (or crazy) in AC analysis only?  (this is the B source in netlist based Spice)

21. How do I fix the Transient analysis "time step too small" error?

22. How do I set the initial current condition for an inductor in Transient analysis?

23a. How do I create a custom input signal in Transient analysis?

23b. How do I model the staircase waveform of a D/A convertor?

24. How do I create a time varying resistor in Transient analysis?

25. Using TI's TLC555 timer (555 timer) as an oscillator.

 

1. Who has to register the program?

5Spice may be used for learning, teaching, academic research or for non-profit personal use without registering the program. This is considered "non-commercial" use. If you use the program to make money (personal business, consulting, etc.) or use it to do work in business or government, this is considered "commercial" use. You must register to use the program for commercial use after the initial 30 day evaluation period.

All users must register if they want to unlock the full features of the program. This includes the larger schematic sizes.

 

2. What are the benefits/changes when I register the program?

Registering the program licenses the program to be used in money making situations such as your job in business or government (see FAQ1). It adds larger schematic sizes (standard A,B,C drawing sizes) and displays numerical results in Noise, Distortion, FFT and Sensitivity analyses. It allows saving schematics containing logic gates or the parameter TestPoint. It removes promotional text in the schematic and allows the user to add company information to the schematic title box. And it allows exporting tabular data from a graph/table to a file for import into another program

Registering also allows passing parameter values from the subcircuit schematic symbol to its Spice subcircuit and other advanced features as they are added to the program.

Registering gives a user priority in obtaining program support and adds limited application support. Registered users may also purchase additional application support.

 

3. I installed a new operating system and my registration code no longer works. How do I transfer the registration to the new system?

See the menu item "transfer the registration" under the program's main menu Help.

Note: upgrading the existing operating system will not cause a problem.

 

4. Why a separate Spice program? (my PC board layout program includes Spice)

Many PC board layout programs come with some sort of Spice simulator. To use the simulator, you often must replace the parts in your PC board schematic with parts from a separate library of simulation parts. And remove connectors, digital parts, etc. you don't want to model. And add parts to model component imperfections (resistance of inductors, etc.) plus special parts like Spice signal sources and so forth. Then run simulations using a user interface that was designed for easy PC layout, not for simulation.

5Spice is totally aimed at Spice simulation, including its schematic features (see the White Paper for details). Since experienced circuit designers normally simulate only a small portion of a large circuit, it is often quicker to draw just that portion in 5Spice and start simulating. Plus it is much easier to document your simulation work in 5Spice. Download it and see.

 

5. Can I use 5Spice in countries where numbers are written differently than in English?

Starting with version 0.99, the data entry fields accept numbers in the national style that Windows is set for. But there are several limitations to remember. The program will not work where Windows displays a negative number as 12- or (12). Non-English alphabet characters may not be used in component reference designators, node names, numbers or anything else that is part of a netlist (circuit description). Model and Subcircuit files you add to the Library must conform to Spice standards: non-English characters allowed only in comment lines, numbers written as 1.23 (never as 1,23).

 

6. Does 5Spice support users new to circuit simulation?

If you have never used circuit simulation before, you can still create a schematic and run a simulation. But you probably need to know what is covered in a circuit analysis course to understand what is going on in the various types of analyses. And read at least some introductory articles on Spice circuit simulation. 5Spice has a brief description of each analysis type - see the Help index. Also be sure to read Introduction and Simulation and Circuit Design in the Help section of the main menu.

 

7. Why can't I use the latest version of WinSpice with 5Spice?

Both WinSpice and 5Spice are changing. After a version of 5Spice has been released, sometimes a change in a newer version of WinSpice has prevented the two from working properly together. The solution is that 5Spice only runs with the version of WinSpice installed with it. This is the combination that has been tested.

You can find the version of WinSpice that 5Spice is using by going to 5Spice's About Box.

 

8. After running DC Bias analysis, I don't see the node voltage pop up when I position the mouse over wires in the schematic?

Information should always pop up when the mouse is positioned over wires and components. For wires, the node voltage should pop up after running DC Bias. A user with a Logitek mouse reported a problem where the pop ups were mostly missing. Installing the latest mouse driver fixed the problem

Also remember that editing the schematic causes the node voltages to stop displaying (their value may have changed). Look on the DC Bias page for the results or rerun the analysis.

 

9. I installed 5Spice on top of an earlier version in Windows98. Why do I get an error message every time I try to run a simulation?

This is a problem with 5Spice version 1.11 and earlier in Windows98. If 5Spice is already installed, you must uninstall the old version before running the install program. Otherwise some versions will show an error message that the program's Spice engine, WinSpice, is the wrong version.

Uninstalling the program will not erase any files you have created or added but will erase model and subcircuit files that 5Spice installed in the library. If you updated any of these files in the library, you may want to make a copy of the library.

If you are getting the error message, uninstall 5Spice and re-install it.

 

10. I uninstalled the program (version 1.11 and earlier) and did not re-install it or installed a version newer than 1.11. After re-booting, the Tahoma font is missing?

This is a bug in the uninstall program used with 5Spice versions up to v1.11. The bug is repaired if the old install program is run. Newer versions of 5Spice use a different install/uninstall program.

The font files are still on the computer. To fix, go to Windows Control Panel. Open the FONTS folder.

WIN2000, XP: Close the FONTS folder.

WIN98 : Go to the File menu, select Install New Font. In the form, first uncheck the "copy fonts to folder" box. Next select the Windows\Fonts directory - the font names will appear. Select Tahoma and Tahoma Bold then press the OK button. Exit.

You may need to restart Windows.

 

11. I can't find the right schematic symbol for my subcircuit?

5Spice does not have a way for the user to create new schematic symbols. However you can use the generic subcircuit symbol for any subcircuit whose .Subckt definition line lists between 2 and 100 nodes. This symbol looks like a rectangle with pins along its sides. It is located in the parts toolbar next to the OpAmp symbol (5-9 nodes). You link either symbol with your subcircuit by editing the symbol. The symbol will then adjust its number of pins to match the number of nodes in the subcircuit's .Subckt definition line. You can also add names to the symbol's pins.

 

12. Why doesn't the subcircuit symbol have the same pin numbers as my favorite device package?

Spice knows nothing about pins, packages or schematics. What you see on a Spice .Subckt definition line is a list of circuit nodes that connect externally. This is a universal way of connecting a circuit.

      .SUBCKT subckt_Name nodeA nodeB nodeC .....

The circuit nodes are identified by a name or a number. If numbers, the subcircuit's author may or may not have assigned numbers matching the pin numbers of some particular physical package (Spice has no standard).

In 5Spice we work directly with the node numbers/names since that is the only thing that is consistent across all Spice subcircuits. This allows you to add any subcircuit to the library.

The program connects the nodes to pins of the schematic's subcircuit symbol in the order the nodes appear on the .Subckt line. The first node (nodeA in example) always connects to the symbol's pin s1, no matter what the node's number/name is. The second node (nodeB in example) always connects to pin s2. And so on.

You can add your own descriptions to the subcircuit symbol's pins to eliminate confusion. Usually the author has added comments near the .Subckt line describing the circuit function of each node. Add descriptions to pins while editing the schematic symbol (descriptions are saved in the Library).

So just ignore physical package pin numbers when working with 5Spice.

 

13. How do I add models and subcircuits to the Library?

You may add text files containing Spice .Model's and/or .Subckt's to the program's Library. Any file extension except .BAK, .DOC, .EXE, .HTM, .HTML, .SAV, .TXT or .ZIP will be recognized. Change model files with a .TXT extension to .MOD or some other extension.

Put files of models and subcircuits that should be linked to the Diode, Transistor, FET, IGBT, SCR and TRIAC schematic symbols under directory

  "Library\Diode_BJT_FET"   and it's subdirectories.

Put all other subcircuits under directory 

  "Library\SubCircuits"   and its subdirectories.

You may add new subdirectories under these directories. Whenever you add, delete or update these files and subdirectories, the program needs to rebuild the Library index. Note that changes within these files only affect the index if the name of a model or subcircuit is added/deleted or changed. If you change a file, subdirectory or model/subcircuit name, you will also need to re-edit schematic parts that reference it.

Library location

The Library was traditionally in a subdirectory of the program directory. Installing 5Spice v1.30 or higher changes the location to

Windows XP
drive:\Documents and Settings\All Users\Application Data\5Spice Analysis

Vista
drive:\Program Data\5Spice Analysis

Note on Creating/Editing subcircuit files

For 5Spice, if a subcircuit calls a model or another subcircuit, then all must be in the same file. A subcircuit or model name may appear in more than one file - the program will index each occurrence separately.

 

14. I added files to the Library but do not see the models/subcircuits when I edit the symbol in the schematic.

  • The Library was traditionally in a subdirectory of the program directory. Installing 5Spice v1.30 or higher changes the location in Windows XP and Vista. Do not put files in the old Library folder which is marked with "_obs" or "_obsolete". See the previous FAQ for the new Library location.

  • Check that the files are in the correct part of the library. Models and subcircuits that link to schematic symbols of diodes, transistors, FETs (all types), IGBT, SCR and TRIAC go under the DIODE_BJT_FET section. All others go under the SUBCIRCUITS section.

  • After adding files or changing subcircuit names, you must rebuild the Library index. Go to main menu TOOLS and select Rebuild Library.

  • If a subcircuit contains model types not normally used to model the symbol, 5Spice will not display that subcircuit in the list when editing the symbol. To show the subcircuit in the list, edit the symbol and uncheck the box that says "only show matching subcircuits".

  • 5Spice does not recognize files ending in .TXT  (as in "readme.txt"), .BAK, .DOC, .EXE, .HTM, .HTML, .SAV or .ZIP  as library files. If a Spice file has a .TXT extension, change it to .MOD or some other extension.

  • 5Spice can't recognize a model or subcircuit if the period is missing from the start of the .Model or .Subckt line. It may not recognize a model if there is a major syntax error before the first parameter in the .Model line.

  • If you open a file in a word processor or browser and then save it, hidden formating characters are often inserted into the file which can confuse any Spice program. Either use Windows NotePad for editing or use SaveAs and save the file in text format.

 

15. I added MOSFETs to the Library but do not see them when I edit the symbol in the schematic? (or if I uncheck the "only show matching subcircuits" box and select the MOSFET, I get a "too many parameters" error from WinSpice when I run the simulation.)

There are two classes of MOSFETs and thus two classes of MOSFET schematic symbols. Spice handles each differently.

If you are not designing an integrated circuit, it is almost certain that you are using power MOSFETs, not simple MOSFET transistors. IRF, On Semi, ST, Zetex, and most others make power MOSFETs. Unlike simple MOSFETS, power MOSFETs contain a body diode and are modeled using a SUBCKT statement in Spice. Use the power MOSFET symbol in the schematic - it shows the body diode.

If you are designing an integrated circuit, then use the simple MOSFET symbols in the schematic. Also use these symbols for small signal MOSFETs like those used in RF receiver amplifiers, charge amplifers or with the sensor in a smoke detector. These symbols work with MOSFETs that are modeled using the Spice MODEL statement. The 4 terminal symbol will also work with a 4 terminal subcircuit that contains a simple MOSFET.

 

16. How do I make a 5Spice schematic into a subcircuit?

Instructions are available to registered users of 5Spice. Registered users please email us for this information.

 

17. DC Bias fails with my feedback circuit no matter what I do?

Spice computes the dc operating point before running any analysis. A circuit that has digital output levels and feedback to make it oscillate may not have a stable dc operating point. This will cause 5Spice to fail in DC Bias.

To run a Transient Analysis on the circuit:
If the circuit uses resistor-capacitor feedback or an RC charging circuit, you force the dc operating point during Transient analysis by adding an Initial Condition symbol connected to the capacitor. Otherwise you must modify the circuit so it is dc stable during DC Bias but not during Transient Analysis.

Example: A 5Spice digital logic invertor is an ideal logic gate. Its output is defined by an IF-THEN statement and can only be high or low. If its output is connected to its input with a resistor and capacitor to ground, there is no stable dc operating point. DC Bias and all other analyses will fail.

1. Add an Initial Condition to the schematic, wire to the IC to the capacitor. Set the IC for any voltage and enable Initial Conditions on the Transient Analysis setup page.

OR

2. Modify the circuit by adding a voltage controlled switch that is controlled by a separate Signal Source. Set the Signal Source to the STEP waveform. Then the switch will be in one state for DC Bias and TIME=0 of Transient Analysis and in the other state during the rest of Transient Analysis. Connect the switch to the circuit as necessary. In this example one could short the capacitor.

 (Note: this is not a practical circuit since there is no hysteresis at the input of the invertor. The simulated circuit may or may not oscillate when the voltage on the cap reaches the invertor's input threshold - depends on the values used to set up the analysis and on numerical round-off in Spice.)

 

18. How do I graph power or some other calculated quantity?

NonLinear Source method

You can use the NonLinear Source to implement an arbitrary math equation in all types of analyses. In AC and Noise Analysis, the NonLinear Source method works with linear equations but does not work correctly when using a nonlinear equation.

Add a copy of the program's NonLinear Source to the schematic (use the version with voltage output). The source shows as a rectangle saying "Fxy". Then edit it to enter the formula you want. Connect the source's inputs to your circuit. Connect a TestPoint to the source's output and graph the TestPoint.

POWER (does not work in AC or Noise analysis): Connect the desired circuit voltage to one input, say X. To calculate power you also need a current. Add a current controlled voltage source to the schematic and use it to convert the desired current to a voltage. Connect this voltage to the Y input of the NonLinear Source. Use both inputs in the power formula:  X*Y

Calculated Plot method

With version 1.10 you can calculate a graph Plot from the data of two TestPoints. The two sets of data may be combined with the math operators + - * / and the power function Pwr (was "Pac" in v1.10).

POWER: Place a Voltage and a Current TestPoint in the schematic. Then setup a calculated Plot to use the power function Pwr with the data from the two TestPoints. Pwr multiplies the voltage and current to compute power in all types of analysis.  In AC analysis it takes the relative phase angle between the voltage and current into account.  Its AC power output is always positive to allow display of power in dB.  If you want the V*I product instead of power in AC analysis, use the multiplication operator.

 

19. Transient Analysis gives wrong results for my switching power supply circuit. Why?

Working with switchers is one of the trickiest things to do with Spice. A good book may help (see link to Basso's website on the Links page for one possibility). Here are three common problems.

the risetime surprise (sooner or later it will get you unless you use 5Spice v0.99.9 or higher)

People often use Spice's Pulse waveform generator to get the switching waveform/clock for their circuit (in 5Spice this is in the Signal Source component). For the Pulse, Squarewave and Exponential waveform generators, Spice uses the TimeStep value for rise or fall times if you don't enter a value for them or enter zero. In this case, a large TimeStep relative to the pulse's width will give dramatically slow rise or fall times, affecting the turn on/off times or duty cycle in your circuit.

A further surprise occurs if you also don't specify the TimeStep value. Spice defaults to TimeStep = simulation run time / 50. Now when you change the simulation run time, the TimeStep varies and therefore the risetimes also vary.

ALWAYS specify your risetimes. NOTE: starting with 5Spice 0.99.9, users are required to enter risetimes for pulse and exponential waveforms. For squarewave with no risetime specified, 1/100 of the squarewave period is used.

A reasonably fast risetime also helps Spice synchronize its computation points with your switching clock edges which is important for accuracy. See next paragraph.

the Spice TimeStep gremlin

Spice computes a solution at least once per TimeStep. Look at the TimeStep you specified for the Transient Analysis and compare it to the switching frequency you are using. As an example, say you switch at 100KHz and set the TimeStep to 5usec. At a 50% duty cycle, the switch is both ON and OFF for 5usec. If Spice had only one computation point during the switch ON (or OFF) interval, it couldn't tell how the current in the inductor is changing over the interval. So Spice adds a few more computation points automatically. But the algorithm it uses is not directly aware of your constant switching frequency - so you may not end up with a consistent number or spacing of points in each switching cycle. Which can lead to wandering or uneven graph plots.

To prevent this, use a reasonably fast clock risetime somewhere in the schematic. This helps Spice synchronize its computation points with your clock edges. Clock the circuit synchronously with the pulse waveform (5Spice Signal Source component) rather than using a self generated clock. Spice pays special attention to circuit transitions that occur just after pulse waveform transitions.

ALWAYS use 5Spice's "fine" setting for the dynamic TimeStep (set TRTOL=1 in other simulators). This increases the number of automatically added computation points in areas where the waveform is changing. It may sometimes also be necessary to set the TimeStep to force 5-10 or more computation points during the shorter of the switch ON and OFF intervals.

These settings can result in very long simulation times. So people often look at the small signal behavior (step response) with a formula (based on the switcher circuit topology) which simulates much faster - see link to C. Basso's models. This would be done in a separate schematic. Then in the original schematic you add an initial condition on the output capacitor to set it to its final voltage (Initial Condition symbol for schematic) to shorten the startup time of the full switcher circuit. And study steady state switching waveforms with the full circuit and a very small TimeStep.

numerical oscillation of the Integration method

After you have followed the guidelines above, note that Spice's standard integration method is not always numerically stable. This can show up when there is a time constant shorter than the TimeStep (often true in switcher semiconductors as junctions turn on and off). The math can oscillate numerically. This is normally visible in the graph but in a switcher it may be confused with switching noise. This numerical oscillation can possibly beat with your circuit's switching frequency causing low frequency effects. Try selecting the GEAR integration method which is numerically stable and see if results change. Gear can have overshoot spikes on fast risetime edges so you can also try the Backward Euler integration method. Of the three methods, Backward Euler is the slowest and has the most error buildup over long simulations.

 

20. NonLinear source - Why is the source's output zero (or crazy) in AC analysis only?

In AC analysis, Spice linearizes all the nonlinear circuit equations including your formula. It does this by taking partial derivatives at the circuit's DC OPERATING POINT. Spice uses the derivative it computes from the formula as the proportionality constant or "gain" of the NonLinear source during AC analysis.

When calculating the derivative, the source’s X and Y inputs (X and Y in the formula) are set to the dc voltage determined by the dc operating point of the circuit.

This can lead to surprises when X or Y are used in the formula and one or both of their dc operating points is zero!

Formula Examples:

    1. Fxy =  1.0, the derivative of a constant is always zero. So the output is always zero in AC analysis.

    2. Fxy =  1.0*X, the derivative = 1.0 as expected. No surprise here.

    3.  Fxy =  X*X and the dc voltage of X is zero. The derivative is zero: in the limit as X goes to zero, for a very small change in X around zero, the output is zero. Note the output is going to zero much faster than the input: 1E-100*1E-100 = 1E-200.

    4. Fxy =  X * Y  and both X and Y dc operating points are zero, then the derivative with respect to X,  d(Fxy)/dx, is zero since Y is set to zero!  And the same for  d(Fxy)/dy  since X is set to zero.  So

       Vout = X * d(Fxy)/dx  +  Y * d(Fxy)/dy  =  0 

    for all values of X and Y.

The same AC behavior occurs during Noise analysis.

 

More: If the circuit's dc voltage across X is zero AND you add a 1.0v DC source in series with the X+ input to the nonlinear source, you will get the derivatives we tend to expect from math class. This happens since the partial derivatives are now evaluated numerically around X=1v instead of X=0v. But if X does not have a dc value of 1v, you have to think carefully to know what the derivative will be.

 

21. How do I fix the Transient analysis "time step too small" error?

If you have a program version earlier than v1.02, download the latest version. The Help for this error has been improved and a new tool has been added to diagnose one possible cause of the error. See the "Simulation Failure" topic under Help in the Main Menu and look for the error name.

 

22. How do I set the initial current condition for an inductor in Transient analysis?

Spice does not allow this directly unless you also set the initial voltages for all the circuit nodes. 5Spice does not support this option.

In some circuits you can force the initial inductor current by using a voltage controlled switch and series resistor connected from one end of the inductor to ground or power. Connect the switch's control inputs to a separate Signal Source which is set for the STEP waveform. The STEP waveform's amplitude is zero at TIME=0 and non-zero for Time > 0. Set the switch's threshold so it will be closed at TIME=0, conducting the initial current, then open when TIME > 0.

 

23. How do I create a custom input signal in Transient analysis? How do I model the staircase waveform of a D/A convertor?

The Signal Source component (voltage source in traditional Spice) offers a piecewise linear waveform (PWL).

You define a PWL waveform by a series of (Time, Value) data points. The first data point must be at Time=0. Spice linearly interpolates the waveform's value between data points. See program help for details.

How do I simulate the output waveform of a D/A convertor?

Use the PWL waveform. You can model the staircase output of a D/A convertor by defining data points at the beginning and end of each step. The time between steps is the inverse of the D/A clock rate. The time between the end of one step and the start of the next step corresponds to the risetime of the D/A convertor. Spice has trouble with very abrupt transitions so make this time a realistic value.

How do I make the waveform repeat?

Create the data points in Windows Notepad. After you have entered one cycle of the waveform, use the copy/paste feature. If you use a word processor, save the file in text format. Edit the Signal Source to load the waveform file.

 

24. How do I create a time varying resistor in Transient analysis?

Use the current output NonLinear Source to implement a time dependent resistor. Connect the source's X differential input to sense voltage at the source's output terminals. Get the polarity right or you have a negative resistor.

 Then the source's formula is based on I = V/R

 I = X / (Rt_value * TIME + R_constant)

where X is a variable that is the voltage at the source's X differential input. TIME is a predefined variable = the elapsed simulation time in seconds during Transient analysis.

Note: you do not enter the "I =" part of the formula in the source's formula box.