Stack Exchange Network

Stack Exchange network consists of 175 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.

-3
votes
1answer
33 views

How to convert a netlist to circuit diagram? [on hold]

I was working on both verilog and ngspice. I found out a verilog can be converted into VLSI CSD design with microwind or qflow. My question is, Is it possible to convert an ngspice netlist to ...
0
votes
1answer
34 views

Two argument V() with ground

As part of a project, I am writing a program which generates ngspice scripts. For my purposes, it would be very convenient if I could always use the two argument v() instead of using v(node) when I ...
0
votes
1answer
23 views

How can I get the value of current from this NGSPICE Code?

I tried this code for a simple simulation with ngspice-30: ...
1
vote
1answer
27 views

EAGLE - Singular matrix warning in RL circuit simulation

I'm studying for my electrical circuits exam and since Eagle is used for some future exams I thought I could learn it and double-check my calculations by simulating with Eagle. I'm trying to ...
0
votes
1answer
56 views

Common-Emitter NPN Transistor Amplifier Simulation Failed

I'm trying to simulate a simple common-emitter transistor amplifier presented as an example in Practical Electronics for Inventors in Qucs. The circuity is identical to the one presented in the book. ...
0
votes
1answer
19 views

ngspice error: too many nodes connected to instance

I'm getting the following error from ngspice: too many nodes connected to instance The netlist and circuit I'm modeling are shown below. Each bulk is tied to the ...
2
votes
1answer
73 views

[Last Update]Simulating an RLC circuit with the 1N3880 in ngpice did not show any results or graph

Im trying to do a transient response analysis with ngspice/gnucap and gspice UI of the next RLC circuit (corrected the source polarity), to find the damping effect in the system. That with the next ...
1
vote
3answers
57 views

zero AC gain of CMOS inverter

Why is the following AC analysis of CMOS inverter resulted in zero AC gain (vout/vin) ?
1
vote
0answers
42 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
2answers
63 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
83 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
110 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
44 views

ngspice .measure syntax in AC + par()

Why do the two netlists give totally different output impedance values ? Netlist 1: ...
0
votes
1answer
79 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
852 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
144 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
79 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
489 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
61 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
261 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 ...
2
votes
1answer
173 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
117 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
67 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
2k 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
175 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
346 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
2k 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
288 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
1k 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
484 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
535 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
534 views

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

I want to add a N-Mosfet subckt Model. ...
0
votes
1answer
743 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 ...
1
vote
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
435 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
115 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
101 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
175 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
120 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
1k 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
358 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
601 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
722 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
790 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
150 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
216 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
410 views

NGSPICE messing up BJT characteristics

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