Skip to content

PN Junction Basics Lab

Objectives

  • Understand diode equation parameters and SRH recombination impact.
  • Run a vectorized IV sweep and interpret semilog plots.

Prerequisites

  • Installed package and numpy basics. See Getting Started.

Tasks

  1. Instantiate PNJunctionDiode at 300 K with doping_p = doping_n = 1e17.
  2. Sweep V from 0 to 0.8 V and compute I with and without SRH (set n_conc, p_conc).
  3. Plot I–V (linear and semilog). Identify knee voltage and ideality deviation.

Hints

  • Use numpy.linspace and device.iv_characteristic(V, n_conc, p_conc).
  • Use matplotlib or utils.plotting.apply_basic_style().

Solution (Reference)

import numpy as np
from semiconductor_sim.devices import PNJunctionDiode

V = np.linspace(0, 0.8, 81)
d = PNJunctionDiode(doping_p=1e17, doping_n=1e17, temperature=300)
I_no, _ = d.iv_characteristic(V)
I_srh = d.iv_characteristic(V, n_conc=1e16, p_conc=1e16)[0]

How to Run

  • Use the examples/example_pn_junction.py script for a quick start.
  • Or open this lab alongside a notebook to iterate on plots interactively.