Pspice tips and FAQ

Pspice Tips

  1. Importing Pspice Schematics and Plots into MS Word
  2. Copying Schematics
  3. Known Lossy Transmission Line Problems
  4. Plot Zoom causes Blue Screen Crash
  5. Parts LED Modelling Bug
  6. PSpice (Spice) Helper Software

Importing into Word

The best format to import schematics or plots is a vector format as this will resize with no loss of quality. In the past I have installed a HPGL plotter set up as 'print to file' but I find the results are not consistent between the different versions of MS Word and Windows. Also NT does not have a HPGL plotter driver that produces HPGL version 1 which is all that Word seems to work well with :-(. This new method converts to a Windows meta file which is much more consistent. The method is:

Now lets test this so far. Open an application and print a picture to printer WMF. A box should pop up asking you for a file name. Enter c:\test.ps. Now run GSview and open c:\test.ps. You should see the picture. In GSview select Edit, Convert to Vector Format. Highlight windows metafile format and click ok. Click the ok for page 1 on the page selector popup. Enter the file c:\test.wmf in the save box the popups and click ok. In MS Word, select insert picture from file and select c:\test.wmf. Word should now have your picture (if this doesn't look right don't worry yet). The next step is to automate this.

That's all there is to it :-). If any of this is not clear, look at the examples in RedMon's help file which has pictures of the setup boxes as well. The -scale 8 -flat 0.05 options are to improve the picture. WMF format uses integers where as postscript uses floating points. The conversion to integer can result in distortion of the graphics so to minimise this the paper is scaled up first. The other options, -flat 0.05 are not so significant as they just force the step size in converting curves and the positioning of text (BTW text is always printed in black).

For those who want to know what is happening, what you are doing is printing your picture to postscript which Redmon is redirecting to stdin to Redrun. Redrun is catching this and putting the postscript in a temporary file. Then Redrun calls PStoEdit to convert the postscript file into a windows metafile and gives PStoEdit its temporary file name and the temporary file name that RedMon has allocated. After PStoEdit finishes, Redrun deletes its temporary file and quits. Redmon then send its temporary file, PStoEdit's output, to the Generic Text (file) printer which does nothing more than save it to a filename of your choosing.

To change the orientation of the end result you need to change the printing from portrait to landscape or vice versa. This can be a bit tricky in Pspice, Schematics and Probe, as there are two places to do this, page setup and printer setup. If you change the printer setup then the page setup changes next time round making for lots of confusion. The best bet is to change the page setup, which will also change the printer setup, then print.

There are a few format issues for which I have created fixes. As well as the files in the fixes zip you also need MTR from MiniTrue site and ttf2pt1.

These fixes are run from a batch file which I call go.bat so the port settings boxes (on my PC) are:

C:\Programs\gstools\Redmon\redrun.exe
C:\Programs\gs\pstoedit\go.bat %%1 %1

There is another bit of software that's useful, that is a one click printer changer. The program sits in the tray and makes it easy to swap printers, very useful when you use the method above to import plots and schematics.

For those still going the HPGL route, printer changer also includes 'fix HPGL' as a menu option to fix the large file HPGL bug (where bits disappear), just to make life easy. If you have Word 97 you will need the Word 97 HPGL import filter from Microsoft as it is not on the CD.


Copying Schematics

Copying schematics from one format to another is easy, if the software does the conversion, but not much fun when it has to be done by hand. Pspice schematics, and probably others, allow pictures to be put on the schematic. If these are WMF format, so they could be produced by printing using the method above, then they become transparent. Hence you can draw the circuit copy over the top of the original giving less chance of errors and making the process a lot simpler. This does not work with BMP's as the picture is solid and its layer is on top of the schematic layer (in Pspice). Of course the lines of a WMF are still solid but you only have to offset the drawing slightly for this not to be a problem. The other improvement that is easy to do, if you have the right software, is to change WMF colours to greys and even lighten them. This gives a watermark look to be traced over. The WMF is a vector format so a vector graphic program is best, rather than a paint program. I have one called Micrografx Draw which will load and save WMF files. Hence it is a simple: load file, select all, set colour to light grey, save file. There should be other programs with the same useful features (and if anyone knows and cares to tell me I'll list it here).


Transmission Lines

Known problems with transmission lines in Ppsice are :-
  1. Short lossy transmission lines will give inaccurate results in ac analysis unless reltol is set very small. To test this try a sweep of length. If you see a discontinuity then you have the problem as the real world doesn't do that :-).

  2.  
  3. Coupled lossy transmission lines are only accurate if the transmission line parameters are similar. To check if you have the problem change the order of the transmission lines in the netlist. If the results change you have the problem :-).

BTW so far I have not tested to see if either of these transmission line problems have been fixed in version 8 or 9.


Plot Blue Screen Crash

This is a rare problem with V9.1 and V9.2. Pspice V8 does not show this problem. The symptoms are a "blue screen of death" crash on doing a zoom area in plot. There are two known cures, update the video driver and/or change the AGP aperture size in the BIOS. As I already had the latest driver I needed to change the aperture size. This fixed the problem for me and, strangely, the aperture could be reset to it previous value without the bug reappearing. I found the cure myself, while waiting for a reply from Pspice support. They do not seem to have it in their knowledge-base, and a net search all came up with zip, hence I am putting it here.


Parts LED Modelling Bug

Parts or as it is called now Pspice Model Editor is meant to fit device parameters to an entered set of data points so as to create a spice component model from data sheet values. However trying to model an LED shows up a bug that might also effect standard diodes. In order to model the higher forward voltage, especially green, blue or white LEDs, the upper limit for N has to be increased from 5 but that is fairly obvious as the N parameter will tend to be near enough 5 if you do not. Parts will then claim is has fitted the enter data a show a forward voltage curve to this effect. But use the model and the resuts will be out. The reason for this would seem to be that ISR is set to a default of 100pA but this is not used in Parts. So parts thinks the curve fits but it is only using IS and N, use the model in Pspice where it uses IS and N, plus ISR and NR and the results are different. This is particularly true for LEDs where N is much bigger than normal and hence ISR and NR have dramatic effects. For normal diodes the error may not be significant. The solution is simple. In Parts set ISR=0 and tick the force box to ensure it stays that way.

 

Full Circuit Ltd - for all your electronics  {Home:www.fullcircuit.com} 
designer / engineer / consultant needs {Email:mreeves@fullcircuit.com}