based on the warning/error Dot command '.probe alli' and digital nodes are not compatible, I would try unchecking the “save all currents” option in the analysis setup.
For background, behind the scenes that checkbox adds the .probe alli ngspice directive (.probe alli == “probe all current vectors”). I guess your 74HC05 uses an event-driven digital model rather than a traditional analog spice model, and those digital models are incompatible with probing internal current nodes, I think.
Start with some working examples. ngSpice is a bit finicky to get started, and when you start with working examples, you can modify them in steps toward what you want to simulate. If it breaks, it was in the last thing you changed.
Maybe try to update to ngspice 44.
It works for me:
Unfortunately not for me. Updated:
max@jarvis:~/Downloads/ngspice$ ngspice --version
******
** ngspice-44.2 : Circuit level simulation program
** Compiled with KLU Direct Linear Solver
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Copyright 2001-2024, The ngspice team.
** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
** Please file your bug-reports at http://ngspice.sourceforge.net/bugrep.html
** Creation Date: Sun Jan 12 08:19:15 UTC 2025
******
Hmm. Could you try something else. Add a text box to your circuit with the following content:
.control
version
set auto_bridge = 1
.endc
Explanation:
version: Prints out the version of ngspice. Just to make sure that KiCad is actually picking up ngspice44 and not an older version for some reason. You should also be able to check this under the menu Help->About KiCad->Version
set auto_bridge = 1: I think this should explicitly enable auto bridging between digital and analog circuits.
Unfortunately the model chosen here is not useful in current KiCad/ngspice. Even if I can reproduce the findings of Lucas (simulation is running using KiCad 9.0.3 with ngspice-44.2), the result (output swing 0 to 3.3V instead of 0 to 1V) does show that the model does not act as an open-collector unit. That’s a bug in ngspice, probably in conjunction with the auto-bridging. We will have to look at it.
So what to do?
Create your own model, using a digital buffer with delay and a simple bipolar transistor:
.subckt ocinv in out
a6 in intout buff1
.model buff1 d_buffer(rise_delay=18n fall_delay=13n)
Rb intout bb 10k
Q1 out bb gnd outbip
.model outbip npn
.ends
The printout of the updated ngspice by Massimilliano does show standard ngspice updated. However this is not used by KiCad. KiCad does use ngspice as a shared library. Its location depends on the operating system.