Some examples for power supplies:
SMPS, step up, with MC34063
33063-KiCad-StepUp.7z (10.5 KB)
SMPS, step down, with MC34063
33063-KiCad-StepDown.7z (10.2 KB)
Detailed circuit descriptions (in German, you may use Google translate for any other language): https://www.mikrocontroller.net/articles/MC34063
A linear regulator (LM317)
LM317.7z (5.3 KB)
A complete power supply with LM317, mains to dc
LM317_power_supply.7z (9.8 KB)
Some reading on
Power Supply Simulation .
A modern LDO regulator, filtering noise
The TI model is slightly modified, corrected:
TPS7A54.7z (10.9 KB)
A 50W, 48V to 5V DC to DC Converter with UC1825
1.5MHz clock frequency, and pulse width modulation
Slide6-Orig.7z (24.8 KB)
This circuit has been presented in the UC1825 data sheet at https://www.ti.com/lit/gpn/uc1825 . More details are available at https://www.ti.com/lit/pdf/slua053 .
Hybrid Switched Capacitor converter, 28 to 700 V using current GaN switching transistor and SiC Schottky multiplier diodes. Please see Design and Evaluation of Hybrid Switched Capacitor Converters for High Voltage High Power Density Applications. (Conference) | OSTI.GOV for its description.
HSCC-1-pub.7z (16.4 KB)
Simulation results, voltages at the different stages, input is 28 V, efficiency is around 90%:
Details plus inductor current I(RESR1):
A simple TRIAC circuit
TRIAC.7z (27.8 KB)
Full-bridge, 200 V, 20 A
Just a demo, not a productive circuit.
Uses Infineon SOI half-bridge drivers with integrated bootstrap.
Full-Bridge.7z (15.9 KB)
Digital
Some examples for digital devices (NAND, INV, FF) based on CMOS,
Original (KiCad 5) is found here: GitHub - bobc/kicad-simulation-examples: Example projects for spice simulation in KiCad
Updated to KiCad 6.0.2 and slightly improved:
digital-by-bobc.7z (22.6 KB)
Miscellaneous
You love tubes? ECC83 is here:
ECC83.7z (6.6 KB)
A CMOS Operational amplifier
CMOSOpAmp.7z (10.7 KB)
A CMOS version of the famous 555 timer circuit
CMOS555_2.7z (21.5 KB)
Using the 555, a police “Dee-Dah” Siren
CMOS555_3.7z (9.1 KB)
The simulation reveals the two frequencies:
With the additional discrete ngspice (by exporting the netlist together with the .control scipt), a fft is performed, clearly showing the two frequencies (and some harmonics)
A 555 with bipolar transistors
555-bipolar.7z (19.0 KB)
Various ring oscillators, demonstrating the power of subcircuit models
(7404, CMOS inverter, inverter made of switches which replace the MOS)
RO.7z (8.2 KB)
Monte Carlo simulation is applied in the next three examples, to a Wien Bridge Oscillator. The ngspice control language is used to modify two resistors, run the loops, evaluate and print the data. Some more info is available in mc_info.txt.
In the first example the resistors R1 and R2 are modified directly.
MC1.7z (8.6 KB)
In the second exampl the resistor values are modified by using the ‘alter’ command.
MC2.7z (7.8 KB)
In the third example random values are generated at constant time steps, to modify the resistors. So you have all data available in a single transient simulation run.
MC3.7z (9.4 KB)
A simple Phase Shift Oscillator
bip-osc.7z (7.3 KB)
Phase shift oscillator with OpAmp
Including frequency measurement with FFT
OpAmp-Osc.7z (10.4 KB)
Some reading about Phase-Shift (or RC-) oscillators:
https://www.electronics-tutorials.ws/oscillator/rc_oscillator.html
A quartz crystal oscillator
clapp-crystal-oscillator.7z (8.0 KB)
Astable multivibrator
provided by paulvdh, slightly modified:
astable.7z (6.5 KB)
Comparator Oscillator
Circuit idea by BobZ
Comp-Osc.7z (7.8 KB)
Schmitt trigger relaxation oscillator with 40106
relax.7z (9.5 KB)
0V to 5V Bar Graph Meter with LM3914 including a ‘home-made’ LM3914 Spice model
3914.7z (12.4 KB)
S-Parameter Analysis
(RF simulation using external ngspice-37)
S-Param.7z (5.0 KB)
Mixed Signal (Analog + Digital) Simulation
The next project is sort of preview, as it will need ngspice-39, which is just out today. It is a mixed analog/digital simulation and uses gtkwave for plotting the digital signals.
QEI_public.7z (22.5 KB)