How to compute logarithmic amplifier input current in Python using UliEngineering

You can easily compute the input current from a logarithmic amplifier output voltage using the UliEngineering Python library:

logarithmic_amplifier_input_current.py
from UliEngineering.Electronics.Amplifiers import logarithmic_amplifier_input_current
from UliEngineering.EngineerIO import *

# Compute input current for -0.161V output
iin = logarithmic_amplifier_input_current(-0.161, "10k", "0.7V")
print(f"Input current (-0.161V output): {format_value(iin, 'A')}")

# Compute input current for -0.230V output
iin = logarithmic_amplifier_input_current(-0.230, "10k", "0.7V")
print(f"Input current (-0.230V output): {format_value(iin, 'A')}")

Example output

logarithmic_amplifier_input_current_output.txt
Input current (-0.161V output): 1.00 µA
Input current (-0.230V output): 10.0 µA

This calculation determines the input current that would produce a given output voltage from a logarithmic amplifier. This is the inverse operation of computing the output voltage, useful for calibration, sensor readout interpretation, and designing measurement systems that use logarithmic amplifiers for wide dynamic range applications.

The input current is computed using the inverse of the logarithmic relationship: $I_{in} = I_s \exp\left(-\frac{V_{out}}{V_T}\right)$, where $I_{in}$ is the input current, $V_{out}$ is the output voltage, $V_T$ is the thermal voltage (approximately 26mV at room temperature), and $I_s$ is related to the reference voltage and feedback resistance. This exponential relationship shows that small changes in output voltage correspond to large changes in input current.


Check out similar posts by category: Electronics, Python