Setup

Imports

Setup PySpice

We use own compiled version of ngspice and set NGPSICE_LIBRARY_PATH accordingly. Reason is to use more recent version (>= 35) that speeds up the simulation wirh the ngspice decks. Also the provided .spiceinit file in the running directory is needed to get this speed up.

Support code

The bandgap circuit

Sub-blocks

MOS Ids vs Vgs=Vgds

We use l of 2µm

IO nmos

IO pmos

Bandgap design

This is a quick design for a working bandgap design. Better optimization for sensitivity to process and voltage variations are left for a follow-up exercise.

bipolar ratio

We use 9 bipolar transistor in the design in a common centroid design: 1 in the first branch; 4 in the second and third branch. This results in a ratio for the bipolars for 1:4

Transistor sizing

We assume a supply voltage of 3.3V nominal and design to optimize the temperature sensitivity for this nominal voltage. If we assume a voltage over the bipolars of around 0.7V we can design the circuit for 20µA for a l of 2.0µm. As Vt for nmos is lower than for pmos to compute the w of the transistors we use Vds of 1.25V for nmos and 1.35V for pmos. This gives values for w of 3.7µm for nmos and 18µm for the pmos.

Resistor sizing

Resistor 1 sizing

We size resistor 1 to get the 20µA current used for sizing the transistors