Apply 5 V and 15 V in reverse to two small diodes and see which readings are distinguishable from the empty fixture. Use the same dark socket for a silicon 1N4148 and a BAT85S Schottky diode. The empty socket and a known resistor give you a way to tell a small current from fixture leakage, a wrong scale or a failed source setting.
A diode is reverse-biased when its cathode is at a higher voltage than its anode. The anode and cathode are the device's two terminals. Reverse bias blocks most current, but a small current can still flow. This reverse leakage current can matter when a circuit must stay off for long periods or when a high-impedance node can only supply a little current. A current of 100 nA at 15 V corresponds to 1.5 µW at the device.
This experiment uses the Vishay 1N4148-TAP, a silicon switching diode, and Vishay BAT85S-TAP, a Schottky diode. A Schottky diode uses a metal–semiconductor junction. Both exact orderable parts have a small axial glass DO-35 body, with a band marking the cathode. In the data sheets, the 1N4148 has a 75 V reverse-voltage absolute limit and a 25 nA maximum reverse current at 20 V and 25 °C. The BAT85S has a 30 V reverse-voltage absolute limit and a 2 µA maximum at 25 V and 25 °C. The two maximum-current entries refer to different conditions. They give context for choosing a safe source range and a useful measurement scale. The 5 V and 15 V values of the two samples still have to be measured.
The instrument is a Keithley 2450 source-measure unit (SMU), which applies a controlled voltage and measures current at the same terminals. A reading with the device removed is a blank. It includes whatever current the instrument and the empty fixture show with that same voltage and layout. A blank taken only once can miss drift, so take one at the beginning and another at the end. Read the 10 MΩ control at both voltages as a separate check on current sign and scale.
Use a lab-rated interlocked test enclosure that meets the 2450 manual's full-capability barrier requirements. Have qualified lab personnel assemble and check it before using this procedure. Keep both instruments' protective-earth connections intact and all live parts behind the barrier. Keep the enclosure opaque to reduce light-driven changes in small currents. Use short rated leads and clean, dry insulating supports such as polytetrafluoroethylene (PTFE). Maintain fixed socket and lead positions, and keep the relay coils away from the diodes to avoid heating them. The drawing shows the measurement wiring and relay drive. The lab-approved interlock uses the enclosure and 2450 manufacturer documentation. Keep the source and sense settings unchanged and allow the parts to settle to room temperature.
Select Front and local two-wire sense on the 2450, using only FORCE HI and FORCE LO. Bond front FORCE LO to the instrument's front chassis-ground post using a rated ground connection. Wire FORCE HI through K1 and FORCE LO through K2 to the two fixed socket terminals. Fit two exact Pickering 104-1-A-5/3D normally open reed relays. On each relay the contact is between pins 1 and 7, and the coil uses pin 3 positive and pin 5 negative with an internal flyback diode. Install each diode under test with the banded cathode on socket HI and anode on socket LO. The SENSE terminals stay unused.
Drive both relay coils in parallel from the isolated CH1 output of a Siglent SPD3303X in independent mode. Set 5.00 V and a 75 mA current limit. Two nominal 220 Ω coils draw about 45.5 mA in total and dissipate about 0.23 W. Keep the auxiliary output floating and separate from FORCE LO, the socket and chassis. The relays disconnect both test leads during power transitions. The enclosure and its manufacturer-required interlock and protective-earth arrangements provide touch protection. There is no active measurement guard. The measured blanks include the closed relays, socket and wiring, along with any leakage they add.
On the 2450 choose source voltage and measure current. Fix the source range at 20 V, and fix the current measurement range at 10 µA. Set the current limit to 5 µA and set overvoltage protection (OVP) to 20 V under MENU → Source → Settings. Set Source Readback to On and verify that HOME displays MEAS for the sourced voltage. A programmed target and the actual voltage at the front terminals can differ, especially when the source reaches compliance. Compliance is the condition where the instrument limits current and may lower the applied voltage. Watch for the yellow LIMIT indication. Mark a row as limited if the instrument reports a limit, OVP or overrange. Turn off the output if the setup cannot reach its target.
Use Auto Zero and 10 NPLC. NPLC means the number of power-line cycles used to integrate a measurement. Give the 2450 its specified one-hour warm-up after each mains reconnection and power-on, with the device under test (DUT) isolated. The five mountings require at least five hours of warm-up in this power-off procedure. Preserve the settings across each restart and control the fixture's ambient temperature. The data sheet lists 10 pA current-measurement resolution and one-year accuracy of ±(0.025% of reading + 700 pA) on the 10 µA range under its stated calibration, temperature and measurement conditions. The change in current you can demonstrate with an actual socket depends on the blanks and repeat spread. The instrument’s last display digit alone cannot establish that change. Keithley’s application note uses rear triaxial connections for very small currents. The front-terminal fixture here may still leave some currents unresolved after a clean blank check.
With only the 2450 connected across the measurement path, install one Vishay MRS25 10.0 MΩ ±1% resistor for the current checkpoint. At 5 V it draws 0.50 µA nominally, and at 15 V it draws 1.50 µA. Both values fit the common measurement range and the 5 µA limit. Calculate its current from the actual source readback. At 15 V the resistor's nominal power is 22.5 µW. In the two diode mountings, keep the bias positive on the diode's cathode side.
| Stage | Socket | What it checks |
|---|---|---|
| open-before | Empty | Starting background current |
| resistor | 10.0 MΩ | Current sign and scale |
| silicon | 1N4148 | Reverse current |
| schottky | BAT85S | Reverse current |
| open-after | Empty | Background after remounting |
limited column for any LIMIT, OVP or overrange indication. The analyzer reads signed values and rejects flagged rows. If an overrange cannot be written as a finite current, treat the set as unresolved and take a new clean series after finding the cause.For each mounted device and each voltage, take the median of the three currents. Average the two open-fixture medians to estimate background current and subtract it from each device median. The script requires blank magnitude plus half its range to stay within 6 nA and the two blank medians to agree within 2 nA. The resistor's corrected reading must agree with V/10 MΩ within 2% of that expected current plus 3 nA. Each source readback must be within 25 mV of its target. Each group has a repeat-spread limit equal to the larger of 2.5 nA and 5% of its median current magnitude. A failed control means the readings cannot support the comparison.
The working margin starts with 2 nA as a practical instrument allowance. Add half the difference between the two blank medians, the larger of their two half-spreads, half the device's repeat spread, and 0.025% of the sum of the device median magnitude and the larger blank magnitude. Half-spread means half of the difference between the largest and smallest repeat. This explicit margin uses the observed fixture stability. It is a screening allowance, with no statistical confidence level assigned.
The script calls a positive corrected current above its margin above fixture floor. A corrected current within that margin is not separated from the floor. A negative result beyond the margin fails the run. For comparing the two diodes it uses the intervals formed by adding and subtracting their individual margins. An interval entirely above the other supports a higher current for that sample at that voltage. Overlap leaves their order unresolved even when the fixture controls pass.
At 15 V the included synthetic series gives +1.10 nA with a 2.66 nA margin for the silicon diode and +96.25 nA with a 2.68 nA margin for the Schottky. The first interval includes zero. The second lies above the entire first interval. These values demonstrate the calculation on constructed data. A real pair may produce a different result. If controls fail, check polarity, source readback, fixture cleanliness, ambient stability and whether the current has finished settling.
Use Python 3.9 or later and the standard library. Download the source, tests, editable figure, worksheet and synthetic data. The program reads the 30 rows in stage order, with 5 V then 15 V and repeats 1, 2 and 3 in each stage. Valid records can also show overlapping intervals. Exit 0 means the fixture checks passed, 1 means the measurement was unresolved, and 2 means invalid input or syntax. If a later control fails after the command has already printed results from the first voltage, exit 1 still marks the whole record unresolved.
python3 diode_leakage.py readings.csv
python3 diode_leakage.py synthetic/example.csv
python3 -m unittest -v test_diode_leakage
#!/usr/bin/env python3
"""Compare reverse diode currents against matched, bracketing open controls."""
import argparse
import csv
from dataclasses import dataclass
import io
from math import isfinite
from pathlib import Path
from statistics import median
import sys
STAGES = ("open-before", "resistor", "silicon", "schottky", "open-after")
LEVELS = (5, 15)
FIELDS = ["stage", "target_v", "repeat", "source_v", "current_a", "ambient_c", "limited"]
EPS_NA = 1e-9
class Unresolved(Exception):
"""The records do not qualify the comparison."""
def require(condition, reason):
if not condition:
raise Unresolved(reason)
@dataclass
class Sample:
stage: str
target: int
repeat: int
source_v: float
current_na: float
ambient_c: float
limited: bool
@dataclass
class Group:
voltage: float
current: float
half_spread: float
def read_samples(path):
with path.open("rb") as handle:
data = handle.read(20_001)
if len(data) > 20_000:
raise ValueError("file exceeds 20,000 bytes")
rows = csv.reader(io.StringIO(data.decode("utf-8-sig"), newline=""), strict=True)
if next(rows, None) != FIELDS:
raise ValueError("expected " + ",".join(FIELDS) + " header")
samples = []
for line, row in enumerate(rows, 2):
if len(row) != 7 or row[-1] not in {"0", "1"}:
raise ValueError(f"line {line}: expected seven columns and limited flag 0 or 1")
try:
target, repeat = int(row[1]), int(row[2])
voltage, current, ambient = map(float, row[3:6])
except ValueError as error:
raise ValueError(f"line {line}: invalid reading") from error
if not all(map(isfinite, (voltage, current, ambient))):
raise ValueError(f"line {line}: nonfinite reading")
samples.append(Sample(row[0], target, repeat, voltage, current * 1e9, ambient, row[-1] == "1"))
return samples
def collect(samples):
expected = [(stage, target, repeat) for stage in STAGES
for target in LEVELS for repeat in (1, 2, 3)]
require([(s.stage, s.target, s.repeat) for s in samples] == expected,
"expected 30 rows in stage, voltage and repeat order")
ambients = [row.ambient_c for row in samples]
require(min(ambients) >= 20 and max(ambients) <= 26
and max(ambients) - min(ambients) <= 1.0 + 1e-12,
"ambient must stay within 20–26 °C and vary by no more than 1 °C")
groups = {}
for start in range(0, len(samples), 3):
group = samples[start:start + 3]
stage, target = group[0].stage, group[0].target
label = f"{stage} at {target} V"
require(not any(row.limited for row in group), label + ": source limit or overrange flagged")
voltages = [row.source_v for row in group]
currents = [row.current_na for row in group]
require(all(abs(v - target) <= 0.025 + 1e-12 for v in voltages),
label + ": source readback differs from target")
require(all(abs(a) < 5000 for a in currents),
label + ": current is at or beyond the chosen 5 µA limit")
span = max(currents) - min(currents)
limit = max(2.5, 0.05 * abs(median(currents)))
require(span <= limit + EPS_NA, label + ": current repeat spread exceeds the screen")
groups[(stage, target)] = Group(median(voltages), median(currents), span / 2)
return groups
def compare_at(groups, voltage):
first = groups[("open-before", voltage)]
last = groups[("open-after", voltage)]
require(max(abs(row.current) + row.half_spread for row in (first, last)) <= 6 + EPS_NA,
f"{voltage} V: open-fixture current exceeds the blank screen")
drift = abs(last.current - first.current)
require(drift <= 2 + EPS_NA, f"{voltage} V: open-fixture drift exceeds 2 nA")
background = (first.current + last.current) / 2
standard = groups[("resistor", voltage)]
# V / 10 MΩ gives 100 nA per volt.
expected = 100 * standard.voltage
require(abs(standard.current - background - expected) <= .02 * expected + 3 + EPS_NA,
f"{voltage} V: 10 MΩ current checkpoint does not match measured voltage")
print(f"{voltage} V | blank centers {first.current:+.2f}, {last.current:+.2f} nA"
f" | resistor expected {expected:.1f} nA")
intervals = []
for stage in ("silicon", "schottky"):
row = groups[(stage, voltage)]
net = row.current - background
relative = .00025 * (abs(row.current) + max(abs(first.current), abs(last.current)))
margin = (2 + drift / 2 + max(first.half_spread, last.half_spread)
+ row.half_spread + relative)
require(net >= -margin - EPS_NA,
f"{voltage} V: {stage} has a negative corrected current beyond the fixture floor")
if net <= margin + EPS_NA:
conclusion = "not separated from fixture floor"
else:
conclusion = "above fixture floor"
print(f" {stage}: corrected {net:+.2f} nA, margin {margin:.2f} nA | {conclusion}")
intervals.append((net - margin, net + margin))
si, sb = intervals
if sb[0] > si[1] + EPS_NA:
print(" Schottky is higher in this record")
elif si[0] > sb[1] + EPS_NA:
print(" Silicon is higher in this record")
else:
print(" intervals overlap; ordering unresolved")
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("record", type=Path)
args = parser.parse_args()
try:
groups = collect(read_samples(args.record))
for voltage in LEVELS:
compare_at(groups, voltage)
except UnicodeError:
print("DATA ERROR: expected UTF-8 CSV", file=sys.stderr)
return 2
except (OSError, ValueError, csv.Error) as error:
print(f"DATA ERROR: {error}", file=sys.stderr)
return 2
except Unresolved as error:
print(f"UNRESOLVED: {error}", file=sys.stderr)
return 1
print("COMPLETED: conditional comparison for the measured samples and fixture.")
return 0
if __name__ == "__main__":
raise SystemExit(main())
At 15 V the two blank medians are 1.0 and 1.8 nA. A device median is 2.2 nA. If the computed margin is 2.6 nA, has the experiment separated its current from the fixture floor?
The blank estimate is 1.4 nA and the corrected reading is +0.8 nA. The 2.6 nA margin is larger than +0.8 nA, so the interval includes zero. Report a current not separated from the fixture floor.