I'm trying to do an ngspice simulation of a 1KHz astable multi-vibrator.
While I can achieve oscillations the output is very erratic and all over the place. [edit: two good responses below who said what I'm seeing is noise and not oscillations -- thank you]. I'm providing the schematic here:
Can anyone help point me in the right direction?
I'm attaching the netlist and model file for the transistors.
* gnetlist -g spice-sdb -o netlists/multivibrator.net schematics/multivibrator.sch
*********************************************************
* Spice file generated by gnetlist *
* spice-sdb version 4.28.2007 by SDB -- *
* provides advanced spice netlisting capability. *
* Documentation at http://www.brorson.com/gEDA/SPICE/ *
*********************************************************
*vvvvvvvv Included SPICE model from ./models/2N2222.mod vvvvvvvv
**************************************
* Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
* All Rights Reserved *
* UNPUBLISHED LICENSED SOFTWARE *
* Contains Proprietary Information *
* Which is The Property of *
* SYMMETRY OR ITS LICENSORS *
*Commercial Use or Resale Restricted *
* by Symmetry License Agreement *
**************************************
* Model generated on Feb 28, 13
* MODEL FORMAT: PSpice
.MODEL Q2n2222a npn
+IS=3.88184e-14 BF=929.846 NF=1.10496 VAF=16.5003
+IKF=0.019539 ISE=1.0168e-11 NE=1.94752 BR=48.4545
+NR=1.07004 VAR=40.538 IKR=0.19539 ISC=1.0168e-11
+NC=4 RB=0.1 IRB=0.1 RBM=0.1
+RE=0.0001 RC=0.426673 XTB=0.1 XTI=1
+EG=1.05 CJE=2.23677e-11 VJE=0.582701 MJE=0.63466
+TF=4.06711e-10 XTF=3.92912 VTF=17712.6 ITF=0.4334
+CJC=2.23943e-11 VJC=0.576146 MJC=0.632796 XCJC=1
+FC=0.170253 CJS=0 VJS=0.75 MJS=0.5
+TR=1e-07 PTF=0 KF=0 AF=1
*^^^^^^^^ End of included SPICE model from ./models/2N2222.mod ^^^^^^^^
*
*============== Begin SPICE netlist of main design ============
v1 2 0 10v
R4 2 1 1k
R1 2 5 1k
R3 2 3 100k
R2 2 4 100k
C2 3 1 10nf
Q2 1 4 0 Q2N2222a
C1 5 4 10nf
Q1 5 3 0 Q2N2222a
.options TEMP=25
.INCLUDE ./commands/multivibrator.cmd
.end
The commands file contains two commands.
One command plots the postscript of the signal output. I normally plot a smaller interval at 1ms but here I'm plotting a larger interval to make it easier to see/read. The plot is representing the peaks here instead of the wave but you get the point. It's just not a stable waveform.
The second command I use to write the data to a vector file which I then later use to generate a .wav file so I can hear the oscilator.
.control
op
tran 10ms 10.5s 9.5s
hardcopy postscript/multivibrator.ps V(1)
tran 1ms 1s
wrdata vectors/multivibrator v1#branch
.endc
Here's the plot of the output: