User Tools

Site Tools


geda:ngspice_and_gschem

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
geda:ngspice_and_gschem [2012/02/20 15:14]
127.0.0.1 external edit
geda:ngspice_and_gschem [2014/04/18 12:23] (current)
vzh Add link to Russian translation
Line 1: Line 1:
 +//​Translations of this page are also available in the following languages://​ [[ngspice_and_gschem.ru|Русский]].
 +
 ====== Overview ====== ====== Overview ======
  
Line 18: Line 20:
 ====== Setup ====== ====== Setup ======
  
-It is assumed that you are able to construct schematics with gschem. If you are unsure how to do this please visit [[gsch2pcb_tutorial]]. So let's start by making a project directory '​simpleSPICE'​ and creating a schematic file named +It is assumed that you are able to construct schematics with gschem. If you are unsure how to do this please visit [[gsch2pcb_tutorial]]. So let's start by making a project directory '​simpleSPICE'​ and creating a schematic file named
 '​simplespice.sch'​ in that directory. '​simplespice.sch'​ in that directory.
  
Line 25: Line 27:
 {{geda:​simple1.png}} {{geda:​simple1.png}}
  
-Note that three named nets have been created, "​Vin",​ "​Vout",​ and "​Vbase"​. Although this is not necessary, it is an easy way to keep track of important points in the circuit. Naming nets is done by editing either by right-clicking or by hitting ​'​ee' ​while a net is selected; then just add the attribute '​netname'​ and give it an appropriate name. Although we now have a circuit to simulate, we need to add some SPICE specific information before we can get any results. +Note that three named nets have been created, "​Vin",​ "​Vout",​ and "​Vbase"​. Although this is not necessary, it is an easy way to keep track of important points in the circuit. Naming nets is done by editing either by right-clicking or by hitting ​<​key>​e</​key><​key>​e</​key> ​while a net is selected; then just add the attribute '​netname'​ and give it an appropriate name. Although we now have a circuit to simulate, we need to add some SPICE specific information before we can get any results.
- +
- +
- +
- +
  
 ====== Adding some SPICE stuff ====== ====== Adding some SPICE stuff ======
Line 57: Line 54:
   +               ​Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10)   +               ​Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10)
   *               ​Fairchild ​       pid=23 ​         case=TO92   *               ​Fairchild ​       pid=23 ​         case=TO92
-  *               ​88-09-08 bam    creation ​+  *               ​88-09-08 bam    creation
  
  
Line 105: Line 102:
  
 which will spew a great deal of text to '​result.txt'​. The file should include the numerical output we requested as well as a crude ascii plot of the results. Note that the 10mV input signal has been amplified to about -280mV over a wide frequency range. If you want to view graphical plots ngspice can be operated in interactive mode by removing the -b option. The ngspice website describes this in more detail. In any event, we now have the simulation results in a nice text format suitable for reading with a script, perhaps something written in python or octave, for further graphing or analysis. which will spew a great deal of text to '​result.txt'​. The file should include the numerical output we requested as well as a crude ascii plot of the results. Note that the 10mV input signal has been amplified to about -280mV over a wide frequency range. If you want to view graphical plots ngspice can be operated in interactive mode by removing the -b option. The ngspice website describes this in more detail. In any event, we now have the simulation results in a nice text format suitable for reading with a script, perhaps something written in python or octave, for further graphing or analysis.
- 
  
geda/ngspice_and_gschem.1329768896.txt.gz · Last modified: 2013/05/08 04:20 (external edit)