Skip to content

Analog Basics

Simulate an AND gate

I tried to use Kicad as an editor and use it’s embedded SPICE simulator You have to use symbols from the Simulation_SPICE Library.

Then you can edit the properties and clic the Simulation Model… button

You can then change the type of simulation model used, and the dimensions of the transistor (in Geometry). You can also do that in the properties window.

There is a code tab but where you can change stuffs but not everything stays…

After a bit or reading the doc and trying stuffs, I found a solution : putting the Piecewise Linear (PWL) line directly in the Value field of the voltage source.

You can manually click on the signal you want to scope

Make an OR gate then simulate it

I then moved transistors and rewired the circuit to make an OR gate.

Then simulated it

Make a Schmitt trigger and identify the transistors that affect the upper and lower voltage threshold

I could not find how to reproduce the inputs so I just put a sine wave instead. It seems that Q5, the PMOS near the output, shifts the most both the lower and upper voltage thresholds. The NMOS at the bottom seems to change the upper threshold voltage. The voltage shifted right (higher hysteresis) :