Skip to content

Repository files navigation

Semiconductor Device Virtual Laboratory

An interactive, physics-first laboratory for analyzing abrupt silicon p–n junctions. Change doping, temperature, voltage, area, mobility, and lifetime; then inspect how the junction electrostatics and ideal current respond.

New to Python or GitHub?

Follow the beginner guide. On Windows, download and extract the repository, then double-click START_LAB.bat. The launcher prepares the environment and opens the laboratory in your browser.

What the first module calculates

  • temperature-dependent silicon intrinsic carrier concentration;
  • thermal and built-in voltage;
  • total, p-side, and n-side depletion widths;
  • space charge, electric field, and electrostatic potential profiles;
  • peak electric field and depletion capacitance;
  • minority-carrier ideal saturation current;
  • ideal diode current–voltage characteristic;
  • warnings when the model approaches important limits.

The application also exports the calculated depletion profiles as CSV data.

Quick start

Python 3.10 or newer is recommended.

python -m venv .venv

Activate the environment, then install the interface dependencies and launch the app:

python -m pip install -r requirements.txt
streamlit run app.py

Run the numerical example:

python -m examples.run_analysis

Run the tests:

python -m unittest discover -s tests -v

Model

For a uniformly doped abrupt junction, the built-in voltage is

$$ V_{bi}=V_T\ln\left(\frac{N_A N_D}{n_i^2}\right), \qquad V_T=\frac{k_BT}{q}. $$

Under applied voltage $V_A$ (positive for forward bias), the depletion approximation gives

$$ W=\sqrt{\frac{2\varepsilon_s}{q}(V_{bi}-V_A) \left(\frac{1}{N_A}+\frac{1}{N_D}\right)}. $$

Charge neutrality requires $N_Ax_p=N_Dx_n$. The maximum field and small-signal depletion capacitance are

$$ |E_{max}|=\frac{qN_Ax_p}{\varepsilon_s}, \qquad C_j=\frac{\varepsilon_s A}{W}. $$

The diffusion-current model uses

$$ I=I_S\left[\exp\left(\frac{V_A}{nV_T}\right)-1\right]. $$

Assumptions and limits

This is an educational model, not a process-calibrated device simulator. It assumes:

  • a one-dimensional, abrupt, uniformly doped silicon junction;
  • complete dopant ionization and nondegenerate carrier statistics;
  • the depletion approximation;
  • low-level injection and steady state;
  • constant mobility and minority-carrier lifetime;
  • negligible series resistance, surface leakage, and generation–recombination current;
  • no avalanche or Zener breakdown.

Strong forward bias, degenerate doping, breakdown, nonuniform profiles, heterojunctions, and nanoscale devices require more complete models.

Repository structure

├── app.py                  # Interactive Streamlit laboratory
├── START_LAB.bat           # One-click Windows launcher
├── BEGINNER_GUIDE.md       # Step-by-step instructions for new users
├── pn_junction_lab/
│   ├── __init__.py
│   └── model.py            # Tested physics calculations
├── examples/
│   └── run_analysis.py     # Reproducible command-line example
├── tests/
│   └── test_model.py       # Physics and boundary-condition tests
└── requirements.txt        # Interface dependencies

Suggested extensions

  1. C–V profiling and extraction of nonuniform doping
  2. Shockley–Read–Hall generation–recombination current
  3. Avalanche and Zener breakdown models
  4. Heterojunction band alignment
  5. Comparison with measured diode data
  6. Links to the matching modules in the Semiconductor Physics course

Educational use

Use the simulator to test a prediction, not to replace a derivation. Estimate the trend first, calculate second, and explain whether the result is physically plausible.

About

Interactive p-n junction analysis lab for semiconductor physics education

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages