Questions tagged [ngspice]

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

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

SPICE model for the Arduino Nano

I have designed a PCB in Eagle which I want to test. For that I would need a basic Arduino model which simulates what would happen if all the pins would have a high output. Would be better if I could ...
user avatar
0 votes
0 answers
39 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 ...
user avatar
2 votes
1 answer
66 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 ...
user avatar
  • 253
1 vote
1 answer
55 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 ...
user avatar
  • 21
2 votes
2 answers
149 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 ...
user avatar
1 vote
1 answer
55 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 ...
user avatar
1 vote
3 answers
195 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? ...
user avatar
  • 67
1 vote
0 answers
58 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 ...
user avatar
  • 11
-1 votes
2 answers
107 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 ...
user avatar
2 votes
3 answers
145 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)....
user avatar
  • 21
0 votes
0 answers
14 views

Where can I find the format specification of a spice3f5 data dump?

I am using ngspice command write to write a data dump of simulation results. I want to use this binary format because presumably I can preserve precision. I can ...
user avatar
  • 309
-1 votes
1 answer
62 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 ...
user avatar
0 votes
2 answers
159 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 ...
user avatar
  • 23
0 votes
1 answer
233 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 ...
user avatar
2 votes
2 answers
160 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 ...
user avatar
  • 75
0 votes
0 answers
47 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 ...
user avatar
1 vote
0 answers
62 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 ...
user avatar
  • 11
3 votes
1 answer
165 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 ...
user avatar
1 vote
1 answer
42 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 ...
user avatar
  • 205
1 vote
0 answers
141 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 ...
user avatar
  • 111
0 votes
0 answers
17 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): ...
user avatar
0 votes
1 answer
45 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: ...
user avatar
1 vote
2 answers
454 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 ...
user avatar
1 vote
1 answer
100 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 ...
user avatar
0 votes
1 answer
279 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 ...
user avatar
0 votes
2 answers
41 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 : <...
user avatar
0 votes
1 answer
263 views

Run Ngspice in batch mode or with python

For circuit simulations I have mostly been using LTSpice, where the netlist is generated automatically with a python script I ...
user avatar
1 vote
0 answers
438 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 ...
user avatar
0 votes
1 answer
259 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 ...
user avatar
  • 3
1 vote
0 answers
80 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 ...
user avatar
2 votes
1 answer
317 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 ...
user avatar
  • 4,864
2 votes
2 answers
394 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. ...
user avatar
  • 121
0 votes
1 answer
61 views

How to convert SIMetrix schematic into netlist

Is there a feature where the schematic created can be automatically converted to its netlist equivalent?
user avatar
  • 3
2 votes
1 answer
31 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=...
user avatar
1 vote
1 answer
521 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 ...
user avatar
  • 13
1 vote
1 answer
265 views

LTSpice, plot a current–voltage characteristic

I have LTSpice on macOS. I would like to plot in x-axis the voltage v(2) and in y-axis the current I(R1). But, when I add traces ...
user avatar
  • 111
0 votes
1 answer
369 views

modelling a fan in ngspice + KiCad

I'm using KiCad 5.1.7 and have created a simple circuit just to see what happens. It contains a fan, an unpolarized capacitor (110u) and a VSource. [Just wondering what happens..] When I try to ...
user avatar
  • 155
0 votes
1 answer
115 views

Cannot create an appropriate regulation

I am trying to build a 260V input mains circuit for a 36V output and 25W Power. I have calculated the required Resistance, Capacitor, and Inductance, I have got the required results. However, I am ...
user avatar
0 votes
4 answers
123 views

Why voltage is shifted in my schematic?

I'm learning basics of electronics and trying to get familiar with the common emitter topology. This is my schematic diagram: When I try to simulate it in Kicad I get this: Everything works as I ...
user avatar
0 votes
2 answers
359 views

How to generate schematic visual from Gnucap / Spice files

I am looking at the circuit diagram from here The gnucap description for it is given as ...
user avatar
  • 105
0 votes
1 answer
323 views

KiCad component doesn't match manufacturers model

I am trying to incorporate the ADA4898-2 into my simulation. The KiCad symbol shows up with only 3 pins: 2 input, 1 output, while the actual op amp has two more supply pins: +Vs and -Vs. If I try to ...
user avatar
2 votes
1 answer
380 views

ngspice keeps reporting an unknown parameter

I built a circuit in KiCad to simulate the behavior of the Maxim MAX3665. Here is the circuit: ...
user avatar
0 votes
1 answer
90 views

Problem adding tranformer to QUCS schematic when simulating with ngspice

I'm having problems simulating the following circuit using ngspice alongside Qucs. The main problem I can see in log is that is acusing an singular matrix. I imagine the problem is related to how ...
user avatar
0 votes
1 answer
40 views

Printing the temperature of a device in ngspice?

I had a simple netlist down here: Example netlist v1 1 0 dc 15 r1 1 0 5k .end Yes, I could just calculate the power lost in here which yield about 45 mW. But the ...
user avatar
1 vote
1 answer
222 views

Why is ngspice showing current as negative?

I have an extremely simple comparator circuit: The voltage at pin 7 goes into positive saturation when a positive input voltage is presented at pin 5. I'm simulating this using SPICE in KiCad. ...
user avatar
  • 243
3 votes
1 answer
256 views

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 (...
user avatar
  • 31
0 votes
1 answer
176 views

ngspice simulation : random signal source

I'm new at the ngspice simulator and I don't understand this line of a Netlist that I found Vn 1 n1 dc 0V ac 1mV trrandom(1 5us 0s 125m 0m) if the random signal ...
user avatar
0 votes
1 answer
85 views

adc_bridge in ngspice

Why does the adc_bridge not work when we have an input dc value? The plot for v(1) appears but v(cmp) is blank. ...
user avatar
  • 1
1 vote
1 answer
157 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: ...
user avatar
  • 413
0 votes
1 answer
457 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 ...
user avatar
  • 253