Tool/software:
Hi! I'm new to simulating TI devices. I'm trying to simulate the following circuit in KiCad. I have a TMUX1308 Symbol which takes in 4 analog inputs on it's Source 0 to 3 pins (S0-3). The rest of the Source Pins are grounded. The Drain Pin (D) is connected an ADC. Vcc is 5V and A0,A1,A2,!EN are driven by a MCU (thus these logic pins are connected to the MCU's GPIO).
I download the TMUX1308 PSpice model from the official page here. I then loaded the TMUX1308/TMUX1308.lib file into my KiCad's Simulation Model Editor for the TMUX1308 symbol (i.e. the TMUX symbol shown above).
In the "Model" dropdown, there are tons of options and I don't know which one's the right one.
I selected the "SWITCH_S0" model because it made sense (use S0 signal on drain) and ran a DC Sweep Analysis. I then got errors & I'm not sure why but here's the logs and the spice netlist that produced the logs,
Note: Compatibility modes selected: ps lt a Circuit: KiCad schematic Reducing trtol to 1 for xspice 'A' devices Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: singular matrix: check node /vtm Note: Starting dynamic gmin stepping Trying gmin = 1.0000E-03 Warning: singular matrix: check node /vtm Warning: Further gmin increment Trying gmin = 5.6234E-03 Warning: singular matrix: check node /vtm Warning: Further gmin increment Trying gmin = 8.6596E-03 Warning: singular matrix: check node /vtm Warning: Further gmin increment Trying gmin = 9.6466E-03 Warning: singular matrix: check node /vtm Warning: Further gmin increment Trying gmin = 9.9105E-03 Warning: singular matrix: check node /vtm Warning: Further gmin increment Trying gmin = 9.9775E-03 Warning: Further gmin increment Trying gmin = 9.9944E-03 Warning: Further gmin increment Trying gmin = 9.9986E-03 Warning: Further gmin increment Trying gmin = 9.9996E-03 Warning: Last gmin step failed Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Trying gmin = 1.0000E-03 Warning: Further gmin increment Trying gmin = 5.6234E-03 Warning: Further gmin increment Trying gmin = 8.6596E-03 Warning: Further gmin increment Trying gmin = 9.6466E-03 Warning: Further gmin increment Trying gmin = 9.9105E-03 Warning: Further gmin increment Trying gmin = 9.9775E-03 Warning: Further gmin increment Trying gmin = 9.9944E-03 Warning: Further gmin increment Trying gmin = 9.9986E-03 Warning: Further gmin increment Trying gmin = 9.9996E-03 Warning: Last gmin step failed Warning: True gmin stepping failed Note: Starting source stepping Supplies reduced to 0.0000% Trying gmin = 1.0000E-02 Warning: gmin step failed Warning: source stepping failed Note: Transient op started Error: Transient op failed, timestep too small Transient solution failed - Last Node Voltages ------------------ Node Last Voltage Previous Iter ---- ------------ ------------- xu4.11 0 1.49986e-11 xu4.12 0 1.49986e-11 xu4.6 0 0 xu4.7 0 0 probe_int_/v100-1000_xu4_5 0 0 xu4.53 0 -0.544297 * xu4.54 0 0.544297 * xu4.90 0 0 xu4.91 0 -0.544297 * xu4.92 0 0.544297 * probe_int_va-_xu4_4 0 0.544297 * probe_int_va+_xu4_3 0 -0.544492 * xu4.99 0 0 xu4.10 0 0.000195 * probe_int_/v100-1000_xu4_2 0 -2.99972e-11 probe_int_net-_u4-+__xu4_1 0 -2.99972e-11 xu4.9 0 0 xu4.8 0 0 net-_u4-+_ 0 0 /v100-1000 0 0 va+ 0 0 va- 0 0 xu3.11 0 1.49986e-11 xu3.12 0 1.49986e-11 xu3.6 0 0 xu3.7 0 0 probe_int_/v10-100_xu3_5 0 0 xu3.53 0 -0.544297 * xu3.54 0 0.544297 * xu3.90 0 0 xu3.91 0 -0.544297 * xu3.92 0 0.544297 * probe_int_va-_xu3_4 0 0.544297 * probe_int_va+_xu3_3 0 -0.544492 * xu3.99 0 0 xu3.10 0 0.000195 * probe_int_/v10-100_xu3_2 0 -2.99972e-11 probe_int_net-_u3-+__xu3_1 0 -2.99972e-11 xu3.9 0 0 xu3.8 0 0 net-_u3-+_ 0 0 /v10-100 0 0 probe_int_gnd_r4 0 0 vin 0 0 probe_int_net-_u4-+__r5 0 0 probe_int_gnd_r6 0 0 probe_int_net-_u3-+__r3 0 0 probe_int_gnd_xu5_1 0 0 probe_int_gnd_xu5_2 0 0 probe_int_net-_u5-/en__xu5_6 0 0 xu5.dx_swon 0 0 xu5.nron_p1p8m0 0 0 xu5.eron_p1p8m0_int1 0 0 xu5.eron_p1p8m0_int2 0 0 xu5.nron_p2p5m0 0 0 xu5.eron_p2p5m0_int1 0 0 xu5.eron_p2p5m0_int2 0 0 xu5.nron_p3p3m0 0 0 xu5.eron_p3p3m0_int1 0 0 xu5.eron_p3p3m0_int2 0 0 xu5.nron_p5p5m0 0 0 xu5.eron_p5p5m0_int1 0 0 xu5.eron_p5p5m0_int2 0 0 xu5.gron_int1 0 0 probe_int_/vtm_xu5_3 0 0 probe_int_gnd_xu5_4 0 0 xu5.nroff 0 0 xu5.eroff_int1 0 0 xu5.eroff_int2 0 0 xu5.groff_int1 0 0 /vtm 0 0 probe_int_gnd_xu5_5 0 0 net-_u5-/en_ 0 0 vcc 0 0 probe_int_gnd_c3 0 0 xu1.11 0 1.49986e-11 xu1.12 0 1.49986e-11 xu1.6 0 0 xu1.7 0 0 probe_int_/v0-5_xu1_5 0 0 xu1.53 0 -0.544297 * xu1.54 0 0.544297 * xu1.90 0 0 xu1.91 0 -0.544297 * xu1.92 0 0.544297 * probe_int_va-_xu1_4 0 0.544297 * probe_int_va+_xu1_3 0 -0.544492 * xu1.99 0 0 xu1.10 0 0.000195 * probe_int_/v0-5_xu1_2 0 -2.99972e-11 probe_int_vin_xu1_1 0 -2.99972e-11 xu1.9 0 0 xu1.8 0 0 /v0-5 0 0 net-_u2-+_ 0 0 probe_int_gnd_r2 0 0 xu2.11 0 1.49986e-11 xu2.12 0 1.49986e-11 xu2.6 0 0 xu2.7 0 0 probe_int_/v5-10_xu2_5 0 0 xu2.53 0 -0.544297 * xu2.54 0 0.544297 * xu2.90 0 0 xu2.91 0 -0.544297 * xu2.92 0 0.544297 * probe_int_va-_xu2_4 0 0.544297 * probe_int_va+_xu2_3 0 -0.544492 * xu2.99 0 0 xu2.10 0 0.000195 * probe_int_/v5-10_xu2_2 0 -2.99972e-11 probe_int_net-_u2-+__xu2_1 0 -2.99972e-11 xu2.9 0 0 xu2.8 0 0 /v5-10 0 0 probe_int_net-_u2-+__r1 0 0 b.xu5.bgroff#branch 0 0 b.xu5.beroff#branch 0 0 b.xu5.bgron#branch 0 0 b.xu5.beron_p5p5m0#branch 0 0 b.xu5.beron_p3p3m0#branch 0 0 b.xu5.beron_p2p5m0#branch 0 0 b.xu5.beron_p1p8m0#branch 0 0 h.xu2.hlim#branch 0 0 v.xu2.vlim#branch 0 0 h.xu1.hlim#branch 0 0 v.xu1.vlim#branch 0 0 h.xu3.hlim#branch 0 0 v.xu3.vlim#branch 0 0 h.xu4.hlim#branch 0 0 v.xu4.vlim#branch 0 0 e.xu5.eroff#branch 0 0 e.xu5.eron_p5p5m0#branch 0 0 e.xu5.eron_p3p3m0#branch 0 0 e.xu5.eron_p2p5m0#branch 0 0 e.xu5.eron_p1p8m0#branch 0 0 r1#branch 0 0 xu2:5#branch 0 0 xu2:4#branch 0 0 xu2:3#branch 0 0 xu2:2#branch 0 0 xu2:1#branch 0 0 v.xu2.vln#branch 0 25 * v.xu2.vlp#branch 0 25 * v.xu2.ve#branch 0 2.2 * v.xu2.vc#branch 0 2.2 * v.xu2.vb#branch 0 0 r2#branch 0 0 xu1:5#branch 0 0 xu1:4#branch 0 0 xu1:3#branch 0 0 xu1:2#branch 0 0 xu1:1#branch 0 0 v.xu1.vln#branch 0 25 * v.xu1.vlp#branch 0 25 * v.xu1.ve#branch 0 2.2 * v.xu1.vc#branch 0 2.2 * v.xu1.vb#branch 0 0 v4#branch 0 2 * v3#branch 0 12 * v2#branch 0 -12 * v1#branch 0 5 * c3#branch 0 0 xu5:swx#branch 0 0 xu5:gnd#branch 0 0 xu5:vdd#branch 0 0 xu5:vss#branch 0 0 xu5:dx#branch 0 0 xu5:sx#branch 0 0 r3#branch 0 0 r6#branch 0 0 r5#branch 0 0 r4#branch 0 0 xu3:5#branch 0 0 xu3:4#branch 0 0 xu3:3#branch 0 0 xu3:2#branch 0 0 xu3:1#branch 0 0 v.xu3.vln#branch 0 25 * v.xu3.vlp#branch 0 25 * v.xu3.ve#branch 0 2.2 * v.xu3.vc#branch 0 2.2 * v.xu3.vb#branch 0 0 xu4:5#branch 0 0 xu4:4#branch 0 0 xu4:3#branch 0 0 xu4:2#branch 0 0 xu4:1#branch 0 0 v.xu4.vln#branch 0 25 * v.xu4.vlp#branch 0 25 * v.xu4.ve#branch 0 2.2 * v.xu4.vc#branch 0 2.2 * v.xu4.vb#branch 0 0 a$poly$e.xu2.egnd#branch_1_0 0 0 a$poly$e.xu1.egnd#branch_1_0 0 0 a$poly$e.xu3.egnd#branch_1_0 0 0 a$poly$e.xu4.egnd#branch_1_0 0 0 a.xu5.aeroff#branch_1_0 0 8.94846e+07 * a.xu5.aeron_p5p5m0#branch_1_0 0 53.486 * a.xu5.aeron_p3p3m0#branch_1_0 0 68.3061 * a.xu5.aeron_p2p5m0#branch_1_0 0 84.8124 * a.xu5.aeron_p1p8m0#branch_1_0 0 117.341 * No. of Data Rows : 0 doAnalyses: TRAN: Timestep too small; initial timepoint: trouble with xu4:jx-instance j.xu4.j1 run simulation(s) aborted Background thread stopped with timeout = 0
.title KiCad schematic .include "/mnt/sda4/tools/libs/spice/scdm265/TMUX1308/TMUX1308.lib" .include "/mnt/sda4/tools/libs/spice/sloj066/TL071.301" .save all .probe alli .dc V4 0 1k 100m XU4 Net-_U4-+_ /V100-1000 VA+ VA- /V100-1000 TL071 XU3 Net-_U3-+_ /V10-100 VA+ VA- /V10-100 TL071 R4 Net-_U3-+_ GND 10k R5 Vin Net-_U4-+_ 200k R6 Net-_U4-+_ GND 1k R3 Vin Net-_U3-+_ 191k XU5 GND GND /VTM GND GND Net-_U5-/EN_ SWITCH_S0 C3 Vcc GND 0.1u V1 Vcc GND DC 5 V2 VA- GND DC -12 V3 VA+ GND DC 12 V4 Vin GND DC 2 XU1 Vin /V0-5 VA+ VA- /V0-5 TL071 R2 Net-_U2-+_ GND 10k XU2 Net-_U2-+_ /V5-10 VA+ VA- /V5-10 TL071 R1 Vin Net-_U2-+_ 10k .end
If I exclude the TMUX1308 symbol from simulation, the DC Sweep (or all other analysis) works perfectly fine. I'm not sure what I'm doing wrong. Thank you!