Questions tagged [ngspice]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
61 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
  • 117
1 vote
1 answer
84 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,050
0 votes
1 answer
93 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
106 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,179
0 votes
0 answers
40 views

Monitoring progress in an ngspice simulation

In order to create a GUI for ngspice using PyQt, I was in search for some numbers that I could use to indicate the progress of a simulation for a progress bar. Even after reading a lot of the ...
theunixdisaster's user avatar
1 vote
1 answer
84 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
0 votes
0 answers
49 views

Where can I find an ngspice model for a Schottky diode?

The title says it all, but to add some context: I'm new to electronics and I thought a good beginner project would be to model a clamp diode circuit in ngspice. I'm having trouble figuring out how to ...
maurice77's user avatar
1 vote
1 answer
70 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
80 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,160
1 vote
2 answers
87 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
243 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
0 votes
4 answers
435 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
  • 15
1 vote
1 answer
185 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
3 votes
2 answers
223 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
  • 161
2 votes
1 answer
332 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
48 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
97 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
168 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
263 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
208 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
607 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
194 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
670 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? ...
Pranav's user avatar
  • 69
1 vote
0 answers
316 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
186 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
163 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
84 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
2 answers
482 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
762 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
498 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
  • 75
0 votes
0 answers
131 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
175 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
376 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
2 votes
1 answer
132 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
  • 215
2 votes
0 answers
297 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
40 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
170 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
1k 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
282 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
756 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
114 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
738 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
931 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
483 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
148 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
567 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,311
2 votes
2 answers
847 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
167 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
2 votes
1 answer
42 views

How to fix ngspice simulation of Cree XLAMP CXB1507

I'm trying to simulate the 36V Cree XLAMP CXB1507 (spice model) using kicad+ngspice. When I try simulate it gives the following error: .model cxb1507 36v d is=6.15257e-19 n=32.22321 rs=9.82504 xti=...
Duncan Wither's user avatar
1 vote
1 answer
1k views

Correct usage of curly braces in Spice

When are you required to use {} braces around an expression, and when can you optionally use braces? I realise that this is simulator-specific, and different ...
QF0's user avatar
  • 113