Analog: Ngspice, Cookie Box (publ. 2025-03-12)

KiCAD, Ngspice progress

Yesterday I experimented with using hierarchical sheets in KiCAD and refining the inverter schematic and simulation. I figured out how to map the op amp pins correctly to the model and how to use hierarchical labels. I made a slight adjustment to the LM358 model so that there was 0V offset, rather than the default 2mV, with the idea of having a more ideal analog module.

Here is a screenshot of the root schematic page where two inverters are chained together, which should be an identity function. I attenuate the final stage so we can see that line distinctly on the graph.

KiCAD screenshot of two inverters hooked together

Here is the screenshot of the signal graph generated by Ngspice and Gnuplot:

screenshot of Ngspice and the Gnuplot graph with input, stage one, and final stage drawn

I haven't got around to looking more into the error with the KiCAD spice interface. Likely the problem just has something to do with paths to Ngspice models or libraries.

Hardware analog computer update

I just got in a box of parts including the multipliers and parts for filtering and for the voltage reference. I also got some other parts from a local shop, including some 5k pots and some small electromechanical relays, which I intend to use for switching all the integrators at once between RUN and IC (Initial Condition), and some banana plug sockets.

I realized, if I'm going to keep using the white breadboards for this project, I am going to need some new ones as the ones I have are in poor shape. Some holes are melted from past experiments, and I also got some glue in some of the holes. So I just placed an order for those and a few other little parts.

While waiting for that, I started drilling holes in the cookie tin, to fit the pots and the banana plug sockets. I don't think this will look very pretty in the end, but it has been a good learning experience so far. I'm still saving up to buy an Analog Thing but it might be a few months more before I can afford it.

This work © 2025 by Christopher Howard is licensed under Attribution-ShareAlike 4.0 International.

CC BY-SA 4.0 Deed

Proxied content from gemini://gem.librehacker.com/gemlog/starlog/20250312-0.gmi

Gemini request details:

Original URL
gemini://gem.librehacker.com/gemlog/starlog/20250312-0.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.