Questions tagged [ngspice]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
27 views

How do I alter a subcircuit in SPICE?

I am passing in environment variables to my spice circuit, so that I can script things in bash and plot in gnuplot, avoiding the cumbersome flow control built into spice. ...
1
vote
1answer
87 views

Why won't this low pass filter work in spice?

I just started working with spice and I feel like I'm making some sort of obvious mistake but unsure what. This works fine: ...
0
votes
0answers
28 views

Can LTSpice used in command line on MacOS?

Can LTSpice used in the terminal by a command line? Is there any example there ? I only saw examples in Windows OS How would simulating a circuit file using LTSpice using terminal in MacOS? (like ...
0
votes
1answer
62 views

What is the most straight-forward way to simulate this circuit?

I would like to verify the function of this circuit, as well as determine the power usage and heat generated by each component. (I need the latter for doing a thermal analysis) The circuit has been ...
1
vote
1answer
38 views

Unknown model type bjt - ignored

I am trying to use Transistor model as in the NGSpice manual 8.2 BJT Models (NPN/PNP): .model QMOD1 BJT level=2 however, I ...
0
votes
2answers
94 views

Single terminal voltage source?

I read the documentation of NGSpice, voltage source is mentioned in Chapter 4 with N+ N-, I tried LTspice, I only found voltage source with two terminals. How would a single terminal voltage source ...
1
vote
2answers
67 views

How to set forward voltage for a diode model in NGSpice?

I am trying to understand the documentation for the diode model, but I could not find how to set the forward voltage value. Can someone help me simulate silicon diode that has a forward voltage of ...
1
vote
1answer
87 views

Current controlled switch with negative current?

I am trying to create a current controlled switch, which opens only at negative current, I tried this approach: ...
0
votes
0answers
53 views

Why I got error: doAnalyses: iteration limit reached?

Trying to use dependent source B that its current depends on a voltage source, I get error ...
0
votes
0answers
24 views

Ngspice models hub website?

Is there any community based models hub in which users share their ngspice models with others? Something like open source group for example.
0
votes
1answer
120 views

Recommendation for simple Relay model?

As I am trying to create a relay model in ngspice, I thought of a subcircuit with one inductor and two current switches with a common port, like this: ...
0
votes
1answer
69 views

NgSpice error: unknown subckt

I am have defined a subcircuit header as: ...
1
vote
2answers
111 views

How to simulate simple on/off, Single-Pole-Single-Throw switch?

I am trying to simulate ON, OFF switch in this simple circuit: ...
0
votes
1answer
21 views

ngspice ltvspice netlist compatibility problems

This is my netlist ...
1
vote
1answer
61 views

How to generate triangle shape?

I tried to follow docs, and here is my implementation for triangle pulse: V1 0 1 PULSE(-0.75 0.75 0m 8.335m 8.335m 0 16.67m 0) but the result is: although the ...
0
votes
1answer
82 views

Printing current when using sinus voltage source?

I am very new to ngscpie, and I need a simple example of very simple circuit composed of two components, a resistor connected to voltage source of sinus wave via two wires. then to print or plot ...
2
votes
1answer
64 views

Is it possible to pass netlist via command line to ngspice instead of using input file?

Is there a way to use ngspice command line without providing a circuit file? ex: passing the circuit as a string within the command line ? EDIT Currently the only way I could use ngspice in command ...
0
votes
1answer
54 views

Ngspice postprocessing

As far as simulation goes, I can handle ngspice interactive simulator to validate an design. But there are cases where I need to format the plot, chart or whatever is required by a design report. So, ...
-2
votes
1answer
88 views

How to convert a netlist to circuit diagram? [closed]

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
38 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
37 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
64 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
103 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
33 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
92 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
71 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
57 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
110 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
100 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
124 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
63 views

ngspice .measure syntax in AC + par()

Why do the two netlists give totally different output impedance values ? Netlist 1: ...
0
votes
1answer
107 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
2k 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
196 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
112 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
871 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
1answer
357 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
232 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....
1
vote
1answer
349 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
79 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
194 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
479 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
3k 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
366 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
2k 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
692 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
644 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
607 views

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

I want to add a N-Mosfet subckt Model. ...
0
votes
1answer
1k 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 ...