|
From: Dan M. <mcm...@al...> - 2006-12-21 05:58:22
|
Daniel Cabrini Hauagge wrote: > Hello, > > I'm new to electronics and spice and I'm trying to simulate a simple > nmos inverter but my setup just doesn't seem to work. When I run the > simulation the output voltage stays at high level with some very small > spikes when the input changes (I guess this is due to the parasite > capacitors in the mosfet model). The only warning that ngspice gives > is that there is no level set for the mosfet, but seting the level to > 1, 2 or 3 didn't solve the problem. > > The input file I'm working on is this > > Title Trying to use MOSFET's in simulation > > .INCLUDE 2N7000.mod > > Vgs in 0 DC 5 PULSE 0 5 0 100u 100u 1m 2m > Vdd dd 0 DC 5V > R1 dd out 5k > * Zetex > Xmos out in 0 2N7000 > > .CONTROL > run > tran 10u 10m 0 10u > plot v(out) > plot v(in) > .ENDC > > .END > > The MOSFET model I'm using can be found here > http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fwww.zetex.com%2F3.0%2Fspice%2F2n7000.mod&ei=3gyKRYLtN4r2owLJ07SDDw&usg=__qD8BjNuCMI0VRztaP1SyJsusTb4=&sig2=D5dbHUWYoEe-1DeBVpauiA > > The datashet is here > http://www.google.com/url?sa=t&ct=res&cd=2&url=http%3A%2F%2Fwww.zetex.com%2F3.0%2Fpdf%2F2N7000.pdf&ei=3gyKRYLtN4r2owLJ07SDDw&usg=__9cXuGI67A1xQyzF-qIboRlcgMqA=&sig2=bZ1TCMt4tMEnXWYEk88FxA > > And the circuit I'm trying to model is this one > http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-002Circuits-and-ElectronicsFall2000/F0B2D731-3CBF-4762-851F-5299800C5300/0/demo07.pdf > > Any help would be greatly appreciated. plot v(in), make sure it is what you think it should be. plot v(dd), make sure it is what you think it should be. if these are correct (5V for v(dd) and a square wave going between 0 and 5 V for v(in)) then it is time to look at the model. BTW, is "V" a valid thing to put after the 5 in your Vdd source? If this doesn't get you there, start plotting internal nodes in the model. Specifically, plot the source node of M1. Make sure it is at 0 volts. Now plot the gate node of M1, make sure it is essentially the same as your input signal. Move on to the drain node. If you do these things I suspect you'll get to the bottom of whats going on. In many ways the simulator is like hardware. When the circuit doesn't work, start tracing the signal through to see whats broken. Hope this helps out. -Dan |