Session 2: Analog Basics¶
Homework¶
I started with trying out ngspice on the examples. For the AND example, I was able to follow the netlist and see the output of A and B. However, the OUTPUT wasn’t shown. I also saw that there an OR netlist in the examples, and that file had the same problem with not showing the output with ngspice. I’m not sure why this is, as I can see the line plot v(AND)and plot v(OR) in the respective netlist files.

Running the Schmitt example, I do see both the voltage in and out here. From this chart, it looks like the threshold for rising voltage is about 0.6V and the threshold for falling voltage is about 0.4V.

Although there was an OR netlist in the examples folder, I attempted my own edits to swap the positions of the transistors in the pull-up network and and the pull-down network.
- AND: pull-up network has A and B in parallel; pull-down network has A and B in series
- OR: pull-up network has A and B in series; pull-down network has A and B in parallel
My edits matched the example, and also behaved the same when I ran ngspice.

I was curious as to the reason why you’d create an OR using an inverter like the AND, since I believe the logic is the same if you just place A and B in parallel, correct? Does this have to do with timing, as the simpler OR would be faster?

Moving to the Schmitt diagram, I found this video which goes into more detail: Schmitt Trigger
Most of the video was over my head, but I believe that upper threshold in this diagram depends on M6, and the lower bound depends on M3.

Finally, I tried a few starter tutorials in the Tinkercad circuit builder and created a simple circuit with a button. I know it doesn’t look like it’s lit up, but it is! The difference between ‘on’ and ‘off’ for these LEDs is pretty subtle. I also liked that when I initially created the circuit without a resistor, it gave me a little alert warning me that the current was outside of the recommended operation of the LED and would shorten its life.
