newbee NGSpice KiCAD question - Page 1
Forum section: electronics / projects

author: Pannenkoek_met_een_lampje
author_rank: Contributor
timestamp: December 09, 2018, 10:09:16 pm
content: Hello just trying to learn NGSpice, I use KiCAD to make the schematic. I did a few things of the following to check if it works:http://ngspice.sourceforge.net/ngspice-eeschema.htmlthe filter and transistor schematic works so thats great. So I though lets try a comparator with 3 opamps. When I try to RUN this in NGspice I get:Circuit: KiCad schematicToo many parameters for subcircuit type "lm324" (instance: xxu1)Background thread stopped with timeout = 0Reducing trtol to 1 for xspice 'A' devicesDoing analysis at TEMP = 27,000000 and TNOM = 27,000000No. of Data Rows : 11my lm324.mod file looks like this:*/////////////////////////////////////////////////////////////////////* Legal Notice: This material is intended for free software support.* The file may be copied, and distributed; however, reselling the* material is illegal*////////////////////////////////////////////////////////////////////* For ordering or technical information on these models, contact:* National Semiconductor's Customer Response Center* 7:00 A.M.--7:00 P.M. U.S. Central Time* (800) 272-9959* For Applications support, contact the Internet address:* amps-apps@galaxy.nsc.com*//////////////////////////////////////////////////////////*LM324 Low Power Quad OPERATIONAL AMPLIFIER MACRO-MODEL*//////////////////////////////////////////////////////////** connections: non-inverting input* | inverting input* | | positive power supply* | | | negative power supply* | | | | output* | | | | |* | | | | |.SUBCKT LM324 1 2 99 50 28*!!!!!!/NS weggehaald bij SUBCKT*Features:*Eliminates need for dual supplies*Large DC voltage gain = 100dB*High bandwidth = 1MHz*Low input offset voltage = 2mV*Wide supply range = +-1.5V to +-16V**NOTE: Model is for single device only and simulated* supply current is 1/4 of total device current.* Output crossover distortion with dual supplies* is not modeled.*****************INPUT STAGE***************IOS 2 1 5N*^Input offset currentR1 1 3 500KR2 3 2 500KI1 99 4 100UR3 5 50 517R4 6 50 517Q1 5 2 4 QXQ2 6 7 4 QX*Fp2=1.2 MHzC4 5 6 128.27P************COMMON MODE EFFECT************I2 99 50 75U*^Quiescent supply currentEOS 7 1 POLY(1) 16 49 2E-3 1*Input offset voltage.^R8 99 49 60KR9 49 50 60K**********OUTPUT VOLTAGE LIMITING********V2 99 8 1.63D1 9 8 DXD2 10 9 DXV3 10 50 .635***************SECOND STAGE***************EH 99 98 99 49 1G1 98 9 POLY(1) 5 6 0 9.8772E-4 0 .3459*Fp1=7.86 HzR5 98 9 101.2433MEGC3 98 9 200P****************POLE STAGE*****************Fp=2 MHzG3 98 15 9 49 1E-6R12 98 15 1MEGC5 98 15 7.9577E-14**********COMMON-MODE ZERO STAGE***********Fpcm=10 KHzG4 98 16 3 49 5.6234E-8L2 98 17 15.9MR13 17 16 1K***************OUTPUT STAGE***************F6 50 99 POLY(1) V6 300U 1E1 99 23 99 15 1R16 24 23 17.5D5 26 24 DXV6 26 22 .63VR17 23 25 17.5D6 25 27 DXV7 22 27 .63VV5 22 21 0.27VD4 21 15 DXV4 20 22 0.27VD3 15 20 DXL3 22 28 500PRL3 22 28 100K****************MODELS USED***************.MODEL DX D(IS=1E-15).MODEL QX PNP(BF=1.111E3)*.ENDS*$Can anyone tell me what might be wrong? This might be very simple thing but I am new with NGSPice so some help would be greatthank

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 11, 2018, 01:27:15 am
content: Can you post your KiCad schematic file? Or just the Spice circuit file for that matter.Most likely the opamp symbol you're using has more pins than the 5 ports declared in the LM324 subcircuit and the extra pins end up in the spice netlist.