Questions tagged [ngspice]

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

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

Excerpt from NGSPICE website:

Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is based on three open source software packages: Spice3f5, Cider1b1 and Xspice. It is the open source successor of these venerable packages. Many, many modifications, bug fixes and improvements have been added to the code, yielding a stable and reliable simulator. Therefore, besides being used as a standalone simulator, Ngspice has been incorporated into many projects, see our simulation environments page.

124 questions
6
votes
2 answers

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 to model the transient response of an RC circuit…
Carsten1
  • 71
  • 3
3
votes
1 answer

Simulation of log configuration for op-amp

I'm quite new to pspice and I'm trying to simulate the dc transfer function of an op-amp in log configuration. Here my circuit. I'm using Kicad and ngspice: R3 and R4 are there because it gave me warnings about a singular matrix. I set the…
Mark
  • 1,161
  • 6
  • 23
3
votes
2 answers

Translating a KiCad schematic subcircuit into a library useable with ngspice

After being unable to get TI's CD4049UB PSpice model working in ngspice, I started using this 2-MOSFET CMOS circuit illustrated here to get my simulations at least close: It has worked great for testing, but I'd prefer to fit that circuit's…
Gnaural
  • 161
  • 5
3
votes
1 answer

The usage/purpose of 0Ω resistor and 0V voltage source

I am a SPICE simulator developer (math major, does not possess enough knowledge for the electrical engineering part), and recently I found some interesting facts in the netlist provided by the designer. For some resistors, the designer puts the…
Rich Zhang
  • 33
  • 5
3
votes
1 answer

How do I model a simple metastable flip-flop in ngspice?

Problem I'm trying to simulate the simplest possible model for a flip-flop: two inverters connected in a circle. I'm using ngspice 31 on Arch Linux. I based my model on the CMOS SOI Inverter example…
tg85
  • 53
  • 3
3
votes
1 answer

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.5 - 30Hz, in case you ever owned a copy). When I…
3
votes
1 answer

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
EarthIsHome
  • 265
  • 1
  • 10
3
votes
1 answer

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?
Mahrrkiee
  • 31
  • 1
  • 2
2
votes
0 answers

Is this NGSPICE simulation correct with ASAP7 transistor models?

I am trying to run some 7 nm simulations with NGSPICE, and I would like to know if my results are believable or not. I am using the ASAP7 transistor model, which I have converted from HSPICE to NGSPICE. I am not interested in completely precise…
NoiseEHC
  • 95
  • 7
2
votes
1 answer

Netlist compatibility between Ngspice & LTspice

I am running LTspice in batch mode on my Windows. However, I am now migrating to Linux, where the alternative to LTspice is Ngspice. The problem I am facing is the following: In my LTspice netlist I have different behavioral voltages that are…
Wallflower
  • 449
  • 3
  • 10
2
votes
1 answer

How to pass a parameter value to model?

I am trying to use mosfet model, and passing the voltage threshold, how ever, I am getting error unknown parameter (vto) I've read in NGSpice manual, that mosfet level 1 has the param VTO, the netlist is: vV1 0 3 5v vV2 0 1 3.5v mMosfet1 3 1 2…
simo
  • 273
  • 1
  • 12
2
votes
2 answers

Trouble simulating an instrumentation amplifier on KiCad

So... I'm trying to build an EMG sensor for biofeedback purposes, but I'm having loads of trouble both on the breadboard and on the CAD side as well. I'm using a M1-processor mac mini which could be a problem regarding ngspice. Please note that I'm…
2
votes
3 answers

Single supply op-amp saturates every time

Given a reference voltage level, I need to pick the difference with respect to that reference, amplify it and then convert it to digital. (Yes, I want to measure small voltage drops between two lines). I'm trying to achieve this by using a…
2
votes
2 answers

Ngspice combine plots

I have the following circuit. I try to find a way to combine the all plots into a single one (like ltspice's .step card). Unfortunately I couldn't get the example from the ngspice's manual working. I would be grateful if anyone could help me…
Upgarde
  • 75
  • 8
2
votes
1 answer

ngspice - print numbers in engineering notation

Can .print in ngspice be told to print numbers in engineering notation (e.g. vout = 450e-3, not vout = 4.5e-1)? I've searched online and in the manual but could not find anything.
pschulz
  • 215
  • 1
  • 8
1
2 3
8 9