How to compute non-inverting summing amplifier in Python using UliEngineering
You can easily compute the output voltage of a non-inverting summing amplifier using the UliEngineering Python library:
from UliEngineering.Electronics.Amplifiers import summing_amplifier_noninv
# Compute output for two inputs with equal gain
vout = summing_amplifier_noninv([1.0, 2.0], ["10k", "10k"], "10k")
print(f"Output (1V, 2V inputs): {vout:.2f} V")
# Compute output with different input resistors
vout = summing_amplifier_noninv([0.5, 1.5], ["10k", "5k"], "10k")
print(f"Output (0.5V, 1.5V, weighted): {vout:.2f} V")Example output
Output (1V, 2V inputs): 3.00 V
Output (0.5V, 1.5V, weighted): 2.50 VThe non-inverting summing amplifier computes the weighted sum of input voltages, providing an output that is the sum of the inputs scaled by their respective resistor ratios. This is useful for analog signal processing, audio mixing, and combining multiple sensor signals in instrumentation applications.
The output voltage is computed using the formula: $V_{out} = (1 + \frac{R_f}{R_{g}}) \times \frac{\sum \frac{V_i}{R_i}}{\sum \frac{1}{R_i}}}$, where $V_{out}$ is the output voltage, $R_f$ is the feedback resistor, $R_g$ is the ground resistor, and $V_i$ and $R_i$ are the input voltages and their respective input resistors. The weighting of each input is determined by its resistor value.
Related posts
- How to compute logarithmic amplifier output voltage in Python using UliEngineering
- How to compute logarithmic amplifier input current in Python using UliEngineering
- How to compute RC time constant in Python using UliEngineering