How to compute voltage divider power in Python using UliEngineering
You can easily compute the power dissipated in a voltage divider using the UliEngineering Python library:
voltage_divider_power.py
from UliEngineering.Electronics.VoltageDivider import *
from UliEngineering.EngineerIO import *
# Compute power for 10k and 10k resistors at 5V input
power = voltage_divider_power("5V", "10k", "10k")
print(f"Power in 10k+10k divider at 5V: {format_value(power, 'W')}")
# Compute power for 1k and 9k resistors at 12V input
power = voltage_divider_power("12V", "1k", "9k")
print(f"Power in 1k+9k divider at 12V: {format_value(power, 'W')}")Example output
voltage_divider_power_output.txt
Power in 10k+10k divider at 5V: 1.25 mW
Power in 1k+9k divider at 12V: 14.4 mWThe power is computed using the formula: $P = \frac{V_{in}^2}{R_{top} + R_{bottom}}$
Related posts
- How to compute voltage divider resistors by ratio in Python using UliEngineering
- How to compute voltage divider bottom resistor by ratio in Python using UliEngineering
- How to compute voltage divider current in Python using UliEngineering
Check out similar posts by category:
Electronics, Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow