Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ngspice]

Anything related to NGSPICE, an open-source SPICE simulation program.

0
votes
0answers
29 views

dc sweep convergence issue for cmos inverter

I am having some convergence issue with DC sweep for a CMOS inverter. To duplicate the exact issue, see the following log as well as the attached netlist files, together with modelcard.nmos and ...
0
votes
1answer
28 views

Howto debug ngspice error PPerror: syntax error during transient analysis

In an effort to better understand software and how my computer actually works I have been experimenting with simple electronic circuits. I am working up to having three two bit registers (A, B, C) ...
1
vote
2answers
75 views

High voltage gain block

Schematic 1 shows a discrete operational amplifier which is used as a gain block to make up to 450V out of 12V. Q3 and Q4 are used to generate a current which is used by the current mirror. This is ...
2
votes
3answers
90 views

Measuring transconductance of any circuit

May I know if the following transconductance measurement test circuit is correct because I am getting quite small Gm values ? I suspect that I need to use some derivative function because changing ...
1
vote
0answers
22 views

ngspice .measure syntax in AC + par()

Why do the two netlists give totally different output impedance values ? Netlist 1: ...
0
votes
1answer
43 views

NGSPICE dc simulation error

I want to do dc simulation of differential amplifier circuit, and this is my .cir file looks like: When i run simulation, ngspice give me an erorr: Supplies reduced to 0.1000% Warning: singular ...
0
votes
1answer
279 views

555 Timer IC Simulation in Eagle

I am currently designing a circuit in Autodesk Eagle which requires a 555 timer IC. The timer may be any 555 chip, such as an ne555, tlc555, or lm555, or even one of their 556 variants, but the lm555 ...
0
votes
1answer
109 views

Why does a classic envelope detector produce a negative voltage for some periods, when high frequencies are put in?

I'm playing around in ngspice & trying to understand envelope detectors for ham radio. I'm pumping 150Mhz into the circuit described below - I'm expecting it to go positive in proportion to ...
0
votes
1answer
55 views

KiCad netlist output GND not labeled 0 for Ngspice

As the title suggests, I'm having trouble generating netlist from KiCad for Ngspice, the problem being that I can't get KiCad to output a "0" node for "ground". I'm aware that I'm supposed to use the ...
1
vote
1answer
285 views

measurement of output impedance of a CMOS inverter

I am measuring output impedance of CMOS inverter using ngspice. No matter how I measure the output impedance, the result can never come any close to the following theoretical calculation if I reduce ...
0
votes
0answers
39 views

EAGLE ngspice subckt parameters

In Autodesk EAGLE 9.0.1 in the xformer example schematic, there is a transformer that requires a RATIO parameter. The example ...
0
votes
1answer
185 views

Spice simulation of 555 flasher will not oscillate

I am hoping that this is a very simple question. I am trying to simulate the circuit in ngspice, but it seems that the oscillation will not initiate. I delayed the on pulse, but the expected 20Hz ...
0
votes
0answers
72 views

Ngspice gives a “Can't open viewport for graphics” error

I'm on Linux (Solus) and can't plot anything with ngspice. It is having trouble communicating with X11. When I try to plot it gives the error stated in the title, no matter how I start the software. ...
2
votes
1answer
134 views

How and Why Does this Oscillator Work?

I am a beginner hobbyist, trying to understand a circuit from an old Radio Shack electronic snap kits game (the game variant I have is "electronics 303", and the circuit is project #202 : Oscillator 0....
0
votes
1answer
59 views

How do I get an output file out of ngspice

I have this simple netlist First Circuit R1 1 2 3k R2 2 0 6k R3 2 3 4k R4 3 0 2k Vs 1 0 DC 9 Is 3 0 DC 5M .dc .End In the past when running a text based SPICE ...
1
vote
2answers
61 views

ngSpice Printing a lot of reference values instead of running the simulation

I have a project that uses ngSpice as a shared library. I fed a SPICE file to this project and the same file to ngSpice.exe. The ngSpice.exe finished execution within seconds however, the ...
0
votes
1answer
1k views

Changing parameter values from a value list file in SPICE

In my circuit, there is a current generator. This generator generates vaules dependent on a parameter, we called N. But I want to use parameter as a variable. If values change linear, I will use .step ...
1
vote
1answer
155 views

Periodic Steady State analysis for class C amplifier

I am working on a simple Class C amplifier which is non-linear, therefore conventional AC analysis could not be used. Instead, Periodic Steady State analysis has to be used. The context of this ...
0
votes
2answers
240 views

Split Collector Lateral PNP Transistor SPICE Subcircuit

This question relates to the book Designing Analog Chips by Hans Camenzind. I need to simulate a simple (one transistor) lateral PNP current mirror: I am trying to understand how one can model a "...
0
votes
2answers
1k views

Running ngspice from command line on a Linux and Windows machine.

I have a spice file, SPICE.cir, that I am able to run on a Linux machine from the command line using the command ngspice< SPICE.cir > out.txt where ...
0
votes
1answer
219 views

How do I get ngspice to output the values of the variables in batch mode?

I have a relatively simply netlist and I want to know the node voltages/currents through all components. The netlist is: ...
0
votes
1answer
672 views

How to simulate a mosfet from a datasheet in ngspice

First of all, I'm pretty new to the simulation side of engineering. I'm using gschem to draw simple circuits and I'm using ngspice from the commandline to run the simulation and plot the results. So ...
3
votes
1answer
329 views

Transient modelling of RC circuit in NGSpice

I'm just starting out with NGSpice, and so far I have been able to model simple DC circuits with only a voltage source and resistors and have gotten the expected currents and voltages. Now I'm trying ...
1
vote
0answers
412 views

How to access parameter values in transient simulation and/or NGSPICE interactive interpreter

I want to make the time-step and stopping-time in a trasient simulation scale automatically by using the parameter values (.PARAM lines) in the netlist. Here is a minimal ngspice etlist to demonstrate ...
0
votes
2answers
472 views

How to add a n-mosfet subckt model in gschem ngspice?

I want to add a N-Mosfet subckt Model. ...
0
votes
1answer
641 views

How do I fix the ngspice warning “Can't open viewport for graphics.”?

I'm trying to see some waveform plots for SPICE circuits with ngspice. As far as I can tell, the plot command is supposed to ...
0
votes
2answers
3k views

How to find value of beta = (mu*Cox)(W/L)/2 of MOSFET in ngspice

How to find value of \$\beta = \frac 1 2 \mu \cdot Cox \cdot \frac W L\$ of MOSFET in ngspice? Is there any command that displays that? The 'show' command displays many parameters but it doesn't ...
3
votes
1answer
331 views

Export vector data from ngspice

Is it possible to export vector values or other data from ngspice to a file? It would be nice to use the data in other programs such as octave or gnplot for prettier plots. Thanks
1
vote
2answers
90 views

ngspice pulse remains at 0 volts

I'm trying to simulate a simple pulse generator that gets activated by a voltage source vs. vs starts at ...
-1
votes
1answer
83 views

ngspice MOSFET region of operation

how to find region of operation of MOSFET in a circuit in ngspice? or how do you know that a MOSFET is in saturation in a circuit in ngspice?
0
votes
1answer
151 views

Open pin in circuit, how do I represent that in a spice model subcircuit?

I have a lm386 circuit that requires pin 8, gain8, to be disconnected in the circuit. So how do I write the spice subcircuit to account for no connection in the 8th pin? Example ...
1
vote
1answer
114 views

NGspice 26 returns result that is 6 orders of magnitude too small for simple depletion MOS test jig

So, I'm trying to diagnose a simulation issue with the IXTT20N50D in CircuitLab, and created a very simple transfer characteristic test jig to do so: ...
2
votes
1answer
999 views

How to save plots in ngspice

Is there a command or an option in the "plot" command that can generate png/jpg images of the plots?
0
votes
2answers
304 views

ngspice - Measure param

I'm trying to post-process a value computed by a measure statement in ngspice (rev 26) as described in the manual: ...
0
votes
1answer
504 views

Convert voltage controlled switch into ngspice

I have a circuit file ADA4691 from Analog Devices and it has a different .model V SWITCH versus SW in ngspice with a VON And VOFF instead of VTH for one switching voltage. How could I approximate the ...
0
votes
2answers
657 views

SPICE modelling of microwave cavities using a circuit

Hi I am new to SPICE and after doing some research into the spice software, I need some help understanding which type and how to model microwave cavities in SPICE. I want to model a microwave cavity ...
1
vote
1answer
707 views

Spice Error: Too few nodes

I am trying to simulate a circuit using .subckt directive in Ngspice-26 to define NAND GATE and NOT gate. I have two separate subckt files for inv and nand as inv.txt and nand.txt which I include in ...
-1
votes
1answer
139 views

Modelling switches & time in NGSPICE

I want to model the behaviour of a circuit in response to 'pushbutton' actions by a user. That is, Initial state; Simulate momentary button press & new state following; Likewise with a different ...
0
votes
1answer
186 views

Nested loops in ngspice

I am having some problems regarding using loops in the control section of ngspice. Specifically in this example: ...
1
vote
2answers
357 views

NGSPICE messing up BJT characteristics

I'm trying to obtain BJT characteristics in NGSPICE, but for some reason the plots retrace to origin. ...