Traceable datasheet-to-SPICE model generation for power MOSFETs and diodes, with validation benchmarks.
The local browser workbench lets a user upload a MOSFET or diode datasheet PDF, review automatically extracted parameters, choose model families, and generate a ZIP model bundle.
The HTTP handler is intentionally thin. Extraction, fitting, model bundle
generation, and raster digitization are implemented in datasheet2spice.service
so the same backend logic can later be exposed through FastAPI, a desktop shell,
or tests without rewriting the workbench.
Start it from the repository:
python -m pip install -e .[pdf]
datasheet2spice serve --host 127.0.0.1 --port 8765
Open:
http://127.0.0.1:8765
ABM Behavioral Model, VDMOS Compact Model, Diode Compact Model,
or Diode Behavioral Model, and the target SPICE dialect.
The workbench can emit common SPICE, LTspice, ngspice, PSpice, HSPICE,
Xyce, and experimental QSPICE bundles. See SPICE Dialects.Generated files are written under build/webapp/<session>/generated/.
Extraction results are cached under build/webapp/<session>/extract_result.json;
open http://127.0.0.1:8765/?session=<session> to replay a previous review
state for visual regression or continued checking.
The local server also exposes GET /api/capabilities, which reports the active
runtime mode and the shared API contract used by the frontend/backend split.
The v1.0 workbench uses PyMuPDF text extraction plus datasheet heuristics. It is good enough to create a reviewable starter model from many tabular MOSFET and diode datasheets, but it is not a full semantic datasheet parser.
The extractor currently targets common fields:
MOSFET:
VDSS, continuous ID, VGS_on, VGS_offVGS(th), RDS(on), gfs, internal RGCiss, Coss, CrssQg, Qgs, QgdVSD, trr, Qrr, IrrmDiode:
VRRM, IF(AV), IFSMVF, leakage IRCj or Cttrr, Qrr, and IrrmDiode series datasheets are handled as a first-class extraction result. The
backend returns the selected project, a series summary, and
variant_projects for each detected part number. The UI can generate either
one selected model or a ZIP bundle containing all variants in separate folders.
If only one capacitance point is found, the workbench creates a conservative
starter C(V) curve so the built-in emitters can run. Replace it with a
digitized curve for serious transient fitting.
Ciss/Coss/Crss log-log plots when the PDF
preserves curves as vector paths.KID, CGD_SCALE, and CGS_SCALE, and diode ABM
recovery parameters such as TAU_ns and RR_SCALE.