I am have a KiCad schematic for some analog components (a MOSFET, some resistors and two voltage sources - see attached). If I set up V1 in the Simulation Parameters -> DC Transfer -> Source 1, and set the values to 0, 5, 1 (ramping the voltage from 0 to 5 volts in 1 volt steps), the simulation produces believable output.
If I then change V1 to be a voltage pulse source - pulse (0, 5, 0, 2u, 2u, 100m, 200m) - in the properties tab of V1 (Spice model -> Source), I can’t seem to get rid of the DC transfer values and the V1 pulses are all 0 V (ie no pulses?). If I restart KiCad, the DC Transfer values are wiped out, but the simulation is not enabled (simulation button grayed out), until I fill in the DC Transfer values, and then again, no pulses.
My KiCad versions:
Version: 5.99.0-unknown-4fe025909d~114~ubuntu18.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 5.3.0-7648-generic x86_64, 64 bit, Little endian, wxGTK, ubuntu, x11
Build Info:
Date: Oct 27 2021 15:31:47
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
Boost: 1.65.1
OCC: 7.5.2
Curl: 7.58.0
ngspice: unknown
Compiler: GCC 7.5.0 with C++ ABI 1011
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON
Any suggestions on how to get the pulses to work?
Thanks!
Mark
PS Would have liked to upload the schematic, but new users can’t do that… The MOSFET is an IRLZ34N, Drain to 3 series resistors to 12V DC. Gate to V1 through resistor. Source to resistor to ground.
The exported spice netlist from the grayed out Simulation button
.title KiCad schematic
.include “/home/mark/python-projects/rocket_launcher_web/Designs/libraries/irlz34n.spi”
Rwire1 Net-Rwire1-Pad1 Net-Rclips1-Pad2 50m
Rclips1 Vigniter Net-Rclips1-Pad2 150m
V2 Net-Rwire1-Pad1 0 dc 12
R1 Vsource 0 1
XQ1 Vdrain Vgate Vsource irlz34n
R2 Net-R2-Pad1 Vgate 1K
V1 Net-R2-Pad1 0 pulse(0 5 0 2u 2u 100m 200m)
Rigniter1 Vigniter Vdrain 0.655
.end
The schematic netlist
(export (version “E”)
(design
(source “/home/mark/python-projects/rocket_launcher_web/Expansion Board/rocket_launcher_expansion_board/MOSFET-test1/MOSFET-test1.kicad_sch”)
(date “Wed 27 Oct 2021 03:49:23 PM MST”)
(tool “Eeschema 5.99.0-unknown-4fe025909d~114~ubuntu18.04.1”)
(sheet (number “1”) (name “/”) (tstamps “/”)
(title_block
(title “MOSFET Tests”)
(company)
(rev “0.1”)
(date “2021-10-26”)
(source “MOSFET-test1.kicad_sch”)
(comment (number “1”) (value “Estes Igniter”))
(comment (number “2”) (value “”))
(comment (number “3”) (value “”))
(comment (number “4”) (value “”))
(comment (number “5”) (value “”))
(comment (number “6”) (value “”))
(comment (number “7”) (value “”))
(comment (number “8”) (value “”))
(comment (number “9”) (value “”)))))
(components
(comp (ref “Q1”)
(value “IRLZ34N”)
(footprint “Package_TO_SOT_THT:TO-220-3_Vertical”)
(datasheet “http://www.infineon.com/dgdl/irlz34npbf.pdf?fileId=5546d462533600a40153567206892720”)
(fields
(field (name “Spice_Lib_File”) “/home/mark/python-projects/rocket_launcher_web/Designs/libraries/irlz34n.spi”)
(field (name “Spice_Model”) “irlz34n”)
(field (name “Spice_Netlist_Enabled”) “Y”)
(field (name “Spice_Primitive”) “X”))
(libsource (lib “Transistor_FET”) (part “IRLZ34N”) (description “30A Id, 55V Vds, 35mOhm Rds, N-Channel HEXFET Power MOSFET, TO-220AB”))
(property (name “Spice_Primitive”) (value “X”))
(property (name “Spice_Model”) (value “irlz34n”))
(property (name “Spice_Netlist_Enabled”) (value “Y”))
(property (name “Spice_Lib_File”) (value “/home/mark/python-projects/rocket_launcher_web/Designs/libraries/irlz34n.spi”))
(property (name “Sheetname”) (value “”))
(property (name “Sheetfile”) (value “MOSFET-test1.kicad_sch”))
(sheetpath (names “/”) (tstamps “/”))
(tstamps “db9bcbba-4314-4dc2-9ff3-9bad8cf36f3f”))
(comp (ref “R1”)
(value “1”)
(datasheet “~”)
(libsource (lib “Device”) (part “R”) (description “Resistor”))
(property (name “Sheetname”) (value “”))
(property (name “Sheetfile”) (value “MOSFET-test1.kicad_sch”))
(sheetpath (names “/”) (tstamps “/”))
(tstamps “69be1810-9cb0-4613-85dd-ea45ee36540c”))
(comp (ref “R2”)
(value “1K”)
(datasheet “~”)
(libsource (lib “Device”) (part “R”) (description “Resistor”))
(property (name “Sheetname”) (value “”))
(property (name “Sheetfile”) (value “MOSFET-test1.kicad_sch”))
(sheetpath (names “/”) (tstamps “/”))
(tstamps “d1f93155-9008-4f33-a5c1-9c014236feee”))
(comp (ref “Rclips1”)
(value “150m”)
(datasheet “~”)
(libsource (lib “Device”) (part “R”) (description “Resistor”))
(property (name “Sheetname”) (value “”))
(property (name “Sheetfile”) (value “MOSFET-test1.kicad_sch”))
(sheetpath (names “/”) (tstamps “/”))
(tstamps “f8a81f6c-4cb0-42e1-bd78-04d1a03993fe”))
(comp (ref “Rigniter1”)
(value “0.655”)
(datasheet “~”)
(libsource (lib “Device”) (part “R”) (description “Resistor”))
(property (name “Sheetname”) (value “”))
(property (name “Sheetfile”) (value “MOSFET-test1.kicad_sch”))
(sheetpath (names “/”) (tstamps “/”))
(tstamps “f41d63c4-dc48-4957-b2d5-844ec6035623”))
(comp (ref “Rwire1”)
(value “50m”)
(datasheet “~”)
(libsource (lib “Device”) (part “R”) (description “Resistor”))
(property (name “Sheetname”) (value “”))
(property (name “Sheetfile”) (value “MOSFET-test1.kicad_sch”))
(sheetpath (names “/”) (tstamps “/”))
(tstamps “3e0cb95c-dc40-46e7-a236-7f1b951ab601”))
(comp (ref “V1”)
(value “pulse(0,5,0,2u,2u,100m,200m)”)
(datasheet “~”)
(fields
(field (name “Spice_Model”) “pulse(0 5 0 2u 2u 100m 200m)”)
(field (name “Spice_Netlist_Enabled”) “Y”)
(field (name “Spice_Primitive”) “V”))
(libsource (lib “pspice”) (part “VSOURCE”) (description “Voltage source symbol for simulation only”))
(property (name “Spice_Primitive”) (value “V”))
(property (name “Spice_Model”) (value “pulse(0 5 0 2u 2u 100m 200m)”))
(property (name “Spice_Netlist_Enabled”) (value “Y”))
(property (name “Sheetname”) (value “”))
(property (name “Sheetfile”) (value “MOSFET-test1.kicad_sch”))
(sheetpath (names “/”) (tstamps “/”))
(tstamps “ca766d7b-b857-4c46-8961-3c2d3aafe7b5”))
(comp (ref “V2”)
(value “12”)
(datasheet “~”)
(fields
(field (name “Spice_Model”) “dc 12”)
(field (name “Spice_Netlist_Enabled”) “Y”)
(field (name “Spice_Primitive”) “V”))
(libsource (lib “Simulation_SPICE”) (part “VDC”) (description “Voltage source, DC”))
(property (name “Spice_Netlist_Enabled”) (value “Y”))
(property (name “Spice_Primitive”) (value “V”))
(property (name “Spice_Model”) (value “dc 12”))
(property (name “Sheetname”) (value “”))
(property (name “Sheetfile”) (value “MOSFET-test1.kicad_sch”))
(sheetpath (names “/”) (tstamps “/”))
(tstamps “fbdf0418-19b5-4efb-bae0-88d5974d9f1b”)))
(libparts
(libpart (lib “Device”) (part “R”)
(description “Resistor”)
(docs “~”)
(footprints
(fp “R_"))
(fields
(field (name “Reference”) “R”)
(field (name “Value”) “R”)
(field (name “Datasheet”) “~”))
(pins
(pin (num “1”) (name “”) (type “passive”))
(pin (num “2”) (name “”) (type “passive”))))
(libpart (lib “Simulation_SPICE”) (part “VDC”)
(description “Voltage source, DC”)
(docs “~”)
(fields
(field (name “Reference”) “V”)
(field (name “Value”) “VDC”)
(field (name “Datasheet”) “~”)
(field (name “Spice_Netlist_Enabled”) “Y”)
(field (name “Spice_Primitive”) “V”)
(field (name “Spice_Model”) “dc(1)”))
(pins
(pin (num “1”) (name “”) (type “passive”))
(pin (num “2”) (name “”) (type “passive”))))
(libpart (lib “Transistor_FET”) (part “IRLZ34N”)
(description “30A Id, 55V Vds, 35mOhm Rds, N-Channel HEXFET Power MOSFET, TO-220AB”)
(docs “http://www.infineon.com/dgdl/irlz34npbf.pdf?fileId=5546d462533600a40153567206892720”)
(footprints
(fp "TO?220”))
(fields
(field (name “Reference”) “Q?”)
(field (name “Value”) “IRLZ34N”)
(field (name “Footprint”) “Package_TO_SOT_THT:TO-220-3_Vertical”)
(field (name “Datasheet”) “http://www.infineon.com/dgdl/irlz34npbf.pdf?fileId=5546d462533600a40153567206892720”))
(pins
(pin (num “1”) (name “D”) (type “passive”))
(pin (num “2”) (name “G”) (type “input”))
(pin (num “3”) (name “S”) (type “passive”))))
(libpart (lib “pspice”) (part “VSOURCE”)
(description “Voltage source symbol for simulation only”)
(docs “~”)
(fields
(field (name “Reference”) “V”)
(field (name “Value”) “VSOURCE”)
(field (name “Datasheet”) “~”))
(pins
(pin (num “1”) (name “E1”) (type “input”))
(pin (num “2”) (name “E2”) (type “input”)))))
(libraries
(library (logical “Device”)
(uri “/usr/share/kicad/library/Device.lib”))
(library (logical “Simulation_SPICE”)
(uri “/usr/share/kicad/library/Simulation_SPICE.lib”))
(library (logical “Transistor_FET”)
(uri “/usr/share/kicad/library/Transistor_FET.lib”))
(library (logical “pspice”)
(uri “/usr/share/kicad/library/pspice.lib”)))
(nets
(net (code “1”) (name “0”)
(node (ref “R1”) (pin “2”) (pintype “passive”))
(node (ref “V1”) (pin “2”) (pinfunction “E2”) (pintype “input”))
(node (ref “V2”) (pin “2”) (pintype “passive”)))
(net (code “2”) (name “Net-(R2-Pad1)”)
(node (ref “R2”) (pin “1”) (pintype “passive”))
(node (ref “V1”) (pin “1”) (pinfunction “E1”) (pintype “input”)))
(net (code “3”) (name “Net-(Rclips1-Pad2)”)
(node (ref “Rclips1”) (pin “2”) (pintype “passive”))
(node (ref “Rwire1”) (pin “2”) (pintype “passive”)))
(net (code “4”) (name “Net-(Rwire1-Pad1)”)
(node (ref “Rwire1”) (pin “1”) (pintype “passive”))
(node (ref “V2”) (pin “1”) (pintype “passive”)))
(net (code “5”) (name “Vdrain”)
(node (ref “Q1”) (pin “1”) (pinfunction “D”) (pintype “passive”))
(node (ref “Rigniter1”) (pin “2”) (pintype “passive”)))
(net (code “6”) (name “Vgate”)
(node (ref “Q1”) (pin “2”) (pinfunction “G”) (pintype “input”))
(node (ref “R2”) (pin “2”) (pintype “passive”)))
(net (code “7”) (name “Vigniter”)
(node (ref “Rclips1”) (pin “1”) (pintype “passive”))
(node (ref “Rigniter1”) (pin “1”) (pintype “passive”)))
(net (code “8”) (name “Vsource”)
(node (ref “Q1”) (pin “3”) (pinfunction “S”) (pintype “passive”))
(node (ref “R1”) (pin “1”) (pintype “passive”)))))