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
20 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
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
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
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
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
11 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
93 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
0answers
19 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
62 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
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
120 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
56 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
105 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 ...
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
166 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
127 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: ...
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. ...
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
79 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 ...
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
1answer
206 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 ...
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
130 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 ...
0
votes
2answers
376 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 ...
1
vote
2answers
385 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: ...
0
votes
1answer
247 views

NgSpice error: unknown subckt

I am have defined a subcircuit header as: ...
1
vote
2answers
237 views

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

I am trying to simulate ON, OFF switch in this simple circuit: ...
1
vote
1answer
36 views

ngspice ltvspice netlist compatibility problems

This is my netlist ...
1
vote
1answer
67 views

How to generate triangle shape?

I tried to follow docs, and here is my implementation for triangle pulse: V1 0 1 PULSE(-0.75 0.75 0m 8.335m 8.335m 0 16.67m 0) but the result is: although the ...
0
votes
1answer
94 views

Printing current when using sinus voltage source?

I am very new to ngscpie, and I need a simple example of very simple circuit composed of two components, a resistor connected to voltage source of sinus wave via two wires. then to print or plot ...
2
votes
1answer
102 views

Is it possible to pass netlist via command line to ngspice instead of using input file?

Is there a way to use ngspice command line without providing a circuit file? ex: passing the circuit as a string within the command line ? EDIT Currently the only way I could use ngspice in command ...
0
votes
1answer
112 views

Ngspice postprocessing

As far as simulation goes, I can handle ngspice interactive simulator to validate an design. But there are cases where I need to format the plot, chart or whatever is required by a design report. So, ...
-1
votes
1answer
294 views

How to convert a netlist to circuit diagram? [closed]

I was working on both verilog and ngspice. I found out a verilog can be converted into VLSI CSD design with microwind or qflow. My question is, Is it possible to convert an ngspice netlist to ...
0
votes
1answer
43 views

Two argument V() with ground

As part of a project, I am writing a program which generates ngspice scripts. For my purposes, it would be very convenient if I could always use the two argument v() instead of using v(node) when I ...
0
votes
1answer
71 views

How can I get the value of current from this NGSPICE Code?

I tried this code for a simple simulation with ngspice-30: ...