Skip to main content

Questions tagged [ngspice]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
113 views

LTspice and ngspice simulation results differ by 5-6GHz

I simulated a basic CMOS inverter based 3 stage ring oscillator in both LTspice and ngspice, using the same model files (using NCSU's freepdk45 models (VTG slow slow corner)). I expected there to be ...
Koustubh Jain's user avatar
0 votes
1 answer
48 views

Help on LM324 SUBCKT model [closed]

I'm newbie in ngspice and having a hard time to understand the LM324 models downloaded from various sources. Made an example with 4 different instances to demonstrate my doubt. The idealOpAmp works as ...
Frederico Carlos Wilhelms's user avatar
1 vote
0 answers
40 views

How to set sizes of ASAP7nm transistors in NGSPICE (or HSPICE)

I want to write a netlist of a basic two-stage amplifier using the ASAP 7nm predictive technology and simulate it using NGSPICE. There are some useful instructions and files in this question. However, ...
Mohsen Mokrian's user avatar
1 vote
1 answer
92 views

Measuring output impedance in simulated circuit

I have the following simulated system (ngspice): The sensor may be something that generates pulses or a slow moving DC voltage, for example. The output could be a coil in a relay or pulses, for ...
Andy's user avatar
  • 321
4 votes
1 answer
359 views

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 ...
NoiseEHC's user avatar
  • 163
1 vote
1 answer
112 views

Strange capacitor charge / discharge oscillations - SPICE

With this setup ngspice produces, for an 1ms dip-to-zero spike, this output Voltage source pwl(0 15 1m 15 2m 0 3m 0 4m 15 5m 15 2 15) r=0 If I make ...
kellogs's user avatar
  • 1,061
0 votes
1 answer
265 views

What is wrong with the MOSFET in this spice simulation?

I am trying to simulate the circuit in KiCad pictured in this post. It keeps coming up with the error ...
Kody Rogers's user avatar
0 votes
2 answers
248 views

How to deal with dangling nets in SPICE simulations?

I am running an operating point simulation in ngspice and I get DC currents through capacitors. The netlist I am using is programmatically generated. Some components from a circuit were deleted which ...
ARF's user avatar
  • 5,219
1 vote
1 answer
167 views

What is wrong with my ESD discharge simulation circuit?

I am trying to duplicate the results given at the following URL in Qucs-s with ngspice. https://www.youspice.com/simple-spice-esd-generator-circuit-based-on-iec61000-4-2-standard/ I must be doing ...
maurice77's user avatar
1 vote
1 answer
188 views

Which SPICE circuit Simulator that can show you the circuits equations to be solved for citcuit Analysis? [closed]

Which SPICE circuit Simulator that can show you the circuits equations to be solved for citcuit Analysis?
ahmed mokhtar's user avatar
3 votes
1 answer
121 views

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 ...
Mark's user avatar
  • 1,225
1 vote
2 answers
267 views

Forward diode depletion capacitance formula

Does anybody know the forward depletion capacitance formulas for diodes in spice models? Background: The capacitance of a diode in reverse direction usually is dominated by the depletion (or junction) ...
drahnoel's user avatar
  • 143
1 vote
6 answers
517 views

No voltage gain in a common-emitter class A amplifier using a 3904 NPN transistor - Ngspice simulation

I am currently trying to build an amplifier for a condenser microphone in order to use it as a way to amplify an acoustic guitar. I am having some trouble to achieve my goals. In order to learn I ...
Man789's user avatar
  • 13
1 vote
4 answers
1k views

How do I scale and offset an input to an ADC?

The background is: I want to monitor a 12 V lead-acid battery with an ESP8266. The ADC has an input range of 0 to 1 V (or 0 to ~3.2 V if using a module i.e. WEMOS D1). I am only interested in the ...
mprowe's user avatar
  • 25
1 vote
1 answer
234 views

KiCad Ngspice reports "unknown parameter (-1.244400E-04)"

I am trying to run a simulation utilizing a CA3140 op-amp; here is my example: It was fine before my dinner, but after I got back, my PC was stuck, then an error comes after my reboot. It is always ...
yunfei's user avatar
  • 123
4 votes
2 answers
360 views

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 ...
Gnaural's user avatar
  • 181
2 votes
1 answer
574 views

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 ...
Wallflower's user avatar
0 votes
1 answer
56 views

How does ngSPICE pick the variables to solve in a network?

I've been thinking about how ngspice and other circuit simulators select the 'state variables' for a network. I know that this will involve some graph theory but was unable to find any references that ...
Balram G Pillai's user avatar
0 votes
0 answers
110 views

RC-circuit transient SPICE simulation diverges after adding one capacitance

I tried to build a lumped parameter RC circuit model for an induction machine. The SPICE simulation worked fine for a steady state with no capacitances. Then I tried to add capacitance one by one as ...
8cold8hot's user avatar
  • 175
0 votes
0 answers
241 views

How to model solar photovoltaic array in spice?

This is the circuit I need to simulate in KiCad and ngspice. simulate this circuit – Schematic created using CircuitLab Can I encapsulate the above circuit into a variable in ngspice so that ...
Rashmi Ranjan's user avatar
2 votes
1 answer
390 views

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 ...
simo's user avatar
  • 273
1 vote
1 answer
277 views

Ngspice convergence problem AD8606 simple simulation

I am new to electrical circuit simulation and I would like to simulate the behaviour of the operational amplifier AD8606 in a simple follower configuration, facing different loads. In order to do that ...
Adrien's user avatar
  • 21
2 votes
2 answers
886 views

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 ...
Joonas Joensuu's user avatar
1 vote
1 answer
272 views

Model of an inductor in Ngspice

I am moving from LTspice to NgSpice. In the former the inductance has a default value of a series resistance of 1milli oHms (that could be set to zero by adding 'Rser=0' in the line command defining ...
Wallflower's user avatar
1 vote
3 answers
844 views

MOSFET Spice model

I'm trying to understand what this model exactly specifies.For example, is k1 the same as k' used in equations, and is u0 the same as mu_0? ...
0-0's user avatar
  • 69
1 vote
0 answers
493 views

Xschem and ngspice Error: unknown subckt

I'm trying to get started with xschem and ngspice to simulate some circuits but have problems getting the programs installed. I tried a very small circuit with 1 transistor, but get an error. After ...
Faith's user avatar
  • 11
-1 votes
2 answers
236 views

What is the best way to add a jumper J1 to a circuit, wrt electronic design & simulation (i.e. w KiCAD & ngSpice)

What is the best way to add a jumper J1 to a circuit, wrt electronic design & simulation (i.e. w KiCAD & ngSpice).?. I originally tried to add a jumper J1 (symbol type GS2) to my circuit in ...
George 2.0 Hope's user avatar
2 votes
3 answers
171 views

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)....
dew54's user avatar
  • 21
-1 votes
1 answer
112 views

Integrating Spice within larger system model

Is there a way to integrate spice within a broader system model that allows for programming? In particular I am interested in simulating a digital feedback controller whos next output depends upon the ...
FourierFlux's user avatar
0 votes
3 answers
888 views

Is there an implementation of mixed analog (SPICE) and digital (HDL) simulations?

I wonder how it could be possible to do mixed circuits simulations. In my imagination, there is a circuit netlist which contains analog and digital components. Since XSPICE (and I think ngspice) has ...
Paul M's user avatar
  • 45
0 votes
1 answer
1k views

about ngspice models and libraries

I'm learning ngspice , read almost it's whole documentation but still confused about libraries and models , here are my questions : where are the default models and libraries that comes built-in with ...
Abd Alhaleem Bakkor's user avatar
2 votes
2 answers
744 views

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 ...
Upgarde's user avatar
  • 85
0 votes
0 answers
183 views

error iteration limit reached ,I'm a beginner to ngspice I'm using ngsipce by esim fossee help me out pls?

enter image description here I m trying to single-phase bridge inverter. here I have attached the error image, Schematic, source detail(pulse generator, Dc) transient analysis time. If I'm done a ...
Mohamed Abdullah's user avatar
1 vote
0 answers
269 views

Ngspice -Scale set

I am trying to simulate an SRAM in Ngspice. I am writing data into a particular address from an input port and reading the same from an output port while performing transient analysis. The simulation ...
rachana's user avatar
  • 11
3 votes
1 answer
575 views

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 ...
Rich Zhang's user avatar
3 votes
1 answer
174 views

ngspice - print numbers in engineering notation

Can .print in ngspice be told to print numbers in engineering notation (e.g. vout = 450e-3, not ...
pschulz's user avatar
  • 225
2 votes
0 answers
348 views

MOSFET Bootstrap circuit simulation with NGSPICE

Preface I am designing a Solid State Relay as an educational exercise, to catch up on what my university did not teach me. I am a long time Linux user and open-source software lover, which brought me ...
PyroAVR's user avatar
  • 133
0 votes
0 answers
98 views

setting an initial directory for the NGSPICE

After one launches NGSPICE, I want NGSPICE path, or current directory to be setup by me. How is that done? I.e., instead of (for example): ...
user1134991's user avatar
0 votes
1 answer
227 views

Performing measurement on a function of a waveform in NGSPICE

I am trying to perform a simple measurement of the absolute value of a waveform (measuring the waveform itself is working). See source file: ...
user1134991's user avatar
1 vote
2 answers
2k views

Can LTSPICE compile BSIM4 models

While NGSPICE can compile and run BSIM4 models, I could mot find anywhere reference to LTSPICE being able to run these models. Has anyone tried, and saw that it worked, or knows that this will ...
user1134991's user avatar
1 vote
1 answer
422 views

Convert a Ngspice rawfile to binary format [duplicate]

I have these NgSpice rawfiles that are generated in ASCII format instead of binary format. I would like to know please what command to use to force their generation in binary instead or ASCII format ...
Wallflower's user avatar
0 votes
1 answer
1k views

How to read an already existing NgSpice raw file

This has taken me a couple of days to solve. I have a set of NgSpice raw files that I would like to exploit so as to visualize the voltage distributions in ...
Wallflower's user avatar
0 votes
2 answers
134 views

Reading voltages from ngspice to another program

I am using ngspice for a project and need to do the following: Read a node voltage from the simulation into another program, process it and change another node voltage in the circuit. For example : <...
user137273's user avatar
1 vote
1 answer
966 views

Run Ngspice in batch mode or with Python

For circuit simulations I have mostly been using LTpice, where the netlist is generated automatically with a Python script I wrote and run using the following Python command: ...
Wallflower's user avatar
1 vote
0 answers
1k views

Moving from LTspice to Ngspice

I wrote a python script that automatically generates and runs LTspice netlists. It runs perfectly on both Windows and Mac. Few ...
Wallflower's user avatar
0 votes
1 answer
603 views

Why all voltage drop across NMOS MOSFET in ngspice

I am new to the ngspice simulation and when I run a circuit into ngspice, it drops all the voltage across a mosfet but this is not the case when I simulated the same circuit into LTspice. Any help ...
cod's user avatar
  • 3
1 vote
0 answers
189 views

How to achive Rser in a voltage in ngspice like in LTspice

I'd like to add Rser into my V1 like in the image below, but I couldn't find how to do it. I checked the internet, looked at ngspice's manual. I tried adding resistance next to V1 but PP value of out1 ...
marknikky's user avatar
2 votes
1 answer
701 views

Simulation issues with a simple 3-phase rectifier circuit

I'm trying to do a ngspice simulation of the currents flowing through a diode bridge and smoothing capacitor from a 3-phase permanent magnet generator. I'm consistently riddled with convergence issues ...
anrieff's user avatar
  • 5,469
2 votes
2 answers
1k views

plot the max slopes of Voltage-Transfer characteristics in ngspice

I have implemented a basic CMOS inverter in ngspice, performing a DC sweep analysis on the input voltage to obtain the Voltage Transfer Curves (Vout vs Vin) at varying Vdd voltages. ...
syfluqs's user avatar
  • 121
0 votes
1 answer
246 views

How to convert SIMetrix schematic into netlist

Is there a feature where the schematic created can be automatically converted to its netlist equivalent?
dela's user avatar
  • 3