**Project One **By Matt Davis **Spring 2003 ** ** This project is to show how to use netlist without having to rely on schematic. ** ** It uses a Q2N3904 NPN transister setup in the common emitter configuration. ** ** This means that the input is at the base and the output is at the collector. ** ** The example will show the correct syntax that Spice uses for this configuration. ** ** ** ** A good reference web site for spice ** ** http://ece-classweb.ucsd.edu/Archive/winter/ece53a/spicehelp.htm ** ** ** ** To start, the schematic should be drawn on a separate piece of paper and all the ** ** nodes should be labeled so that the user will not get confused when programming. ** ** We have already drawn the schematic for this example and posted it on the web site. ** ** ** ** Include Library ** ** The library statement must be used because Pspice doesn't know where to get the ** ** parameters for the transistor. Errors will arise if this is not done. .LIB is ** ** similar to the include statement used by C++. Pspice also has an include statement ** ** but will not be used here. ** ** .LIB (filename) ** ** nom library contains the Q2N3904 transitor ** .lib nom.lib ** Tansistor Parameters ** ** Q(name of tranistor) (collector) (base) (emitter) (model name) ** QTran1 6 4 5 Q2N3904 ** Resistor Values ** ** R(name of resistor) (+ node) (-node) (value) ** R1 1 4 100k R2 4 0 50k R3 5 0 4.3k R4 1 6 4.7k RL 3 0 10k ** Capacitor Values ** ** C(name) (+ node) (- node) (value) (IC=(initial condition value)) ** C1 4 2 0.1u C2 5 0 1u C3 6 3 0.1u ** Voltage Sources ** ** V(name) (+ node) (- node) (value) this is for a dc source ** ** V(name) (+ node) (- node) AC (value) this is for ac source ** V1 1 0 15V Vin 2 0 AC 1mV *Vsin 2 0 sin ( 0 1m 10k) ** Either Vin or Vsin must be commented out during simulation. ** ** This depends on the simulation needed. ** ** Simulation Parameters ** ** .OP is for DC bias conditions ** ** The .OP command creates an output file which list all DC ** ** bias points and circuit parameters. To see output file ** ** click the "View Simulation Output File" icon located in ** ** the tool bar. The icon is a magnifying glass over a sheet ** ** of paper. Note, the file can't be view before the ** ** simulation is executed. ** ** ** ** .AC is for AC analysis ** ** .AC (LIN, DEC, OCT) (# of Points) (start freq) (stop freq) ** ** .AC simulates all ac signals. At least one of the voltage or ** ** current sources must be designated as an AC signal or Spice ** ** will return errors. A source is designated AC by place ** ** "AC" after the negative node and before the value of the ** ** source. ** ** ** ** .TRAN is for transient analysis ** ** .TRAN (step value) (final time value) ** ** .TRAN simulates an individual signal's output ** ** characteristic. One of the voltage or current sources ** ** must be of sin or pulse form. Only .AC or .TRAN can be ** ** simulated at one time. Comment one of them out. ** ** ** **.PROBE sends data to Pspice graphs for viewing ** **.END is to stop netlist. This MUST be used ** .OP .AC DEC 101 10 1000MEG *.TRAN .0001u 300u .PROBE V(*) I(*) .END ** VERY IMPORTANT!!!! The file must be saved as a .cir file ** ** Go to save as, name your file, and type in extension .cir ** ** Then close and reopen. It will not simulate if this is ** ** not done. ** ** ** The circuit is ready for simulation. Press the blue ** ** arrow at the top center of the tool bar. A new window ** ** will open. After the window opens go to the trace icon at ** ** at the top and add the trace needed. **