Questions tagged [ngspice]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
7 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): ...
0
votes
1answer
22 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: ...
0
votes
2answers
41 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 ...
0
votes
1answer
42 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 ...
0
votes
1answer
28 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 ...
0
votes
1answer
248 views

NgSpice error: unknown subckt

I am have defined a subcircuit header as: ...
0
votes
0answers
9 views

Adding time dependence in xspice code models

I am looking for a way to define an xspice code models for a custom voltage source, in which the voltage can be varied as a function of time (for instance a time varying frequency sine wave). However ...
0
votes
2answers
24 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 : <...
0
votes
1answer
37 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 ...
0
votes
0answers
49 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 ...
0
votes
0answers
12 views

Kicad bus pins in ngspice nelisting

In Kicad v5.1.9-1.fc32 release build, I have the following schematics. When netlisted for Ngspice, it provides the following netlist. ...
0
votes
1answer
94 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 ...
0
votes
2answers
4k 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
0answers
21 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 ...
2
votes
1answer
113 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 ...
2
votes
1answer
63 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. ...
0
votes
2answers
3k 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 ...
0
votes
1answer
19 views

How to convert SIMetrix schematic into netlist

Is there a feature where the schematic created can be automatically converted to its netlist equivalent?
2
votes
1answer
21 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=...
1
vote
1answer
127 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 ...
1
vote
1answer
58 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 ...
1
vote
0answers
61 views

Is it possible to plot Voltage vs Current in ngspice?

I need to plot the voltage in the Y axis and the current in the X axis in ngspice, like X-Y mode in an oscilloscope. I could not find anything regarding this in the manual. Can this be done? If so, ...
0
votes
1answer
106 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 ...
3
votes
1answer
350 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 : ...
0
votes
1answer
103 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 ...
0
votes
4answers
113 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 ...
0
votes
2answers
105 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 ...
0
votes
1answer
168 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 ...
2
votes
1answer
130 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: ...
2
votes
2answers
676 views

NGSPICE messing up BJT characteristics

I'm trying to obtain BJT characteristics in NGSPICE, but for some reason the plots retrace to origin. ...
0
votes
1answer
23 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 ...
0
votes
1answer
35 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 ...
1
vote
1answer
88 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. ...
0
votes
1answer
208 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 ...
2
votes
1answer
105 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 (...
0
votes
1answer
80 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 ...
5
votes
2answers
1k 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 ...
0
votes
0answers
39 views

How to approximate the behavior of an inverse log potentiometer with ngspice?

I'm trying to write a Spice model able to approximate the behavior of an inverse log potentiometer, but cannot find the right formula to do it. What I have done so far: I have already written the ...
0
votes
1answer
54 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. ...
1
vote
1answer
106 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
2answers
676 views
0
votes
2answers
383 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 ...
0
votes
1answer
72 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
132 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 ...
1
vote
2answers
396 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
135 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
1answer
156 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: ...
1
vote
2answers
238 views

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

I am trying to simulate ON, OFF switch in this simple circuit: ...
2
votes
1answer
729 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
1answer
37 views

ngspice ltvspice netlist compatibility problems

This is my netlist ...