How to compute diode current using the Shockley equation in Python using UliEngineering

You can easily compute the current through a diode using the Shockley equation using the UliEngineering Python library:

shockley_diode_current.py
from UliEngineering.Electronics.Diode import *
from UliEngineering.EngineerIO import *

current = shockley_diode_current(voltage="600mV", saturation_current="1pA")
print(f"Diode current: {format_value(current, 'A')}")

Example output

shockley_diode_current_output.txt
Diode current: 13.9 mA

Check out similar posts by category: Electronics, Python