如何使用 UliEngineering 在 Python 中计算分压器的电流
你可以使用 UliEngineering Python 库轻松计算流过分压器的电流:
voltage_divider_current.py
from UliEngineering.Electronics.VoltageDivider import *
from UliEngineering.EngineerIO import *
# 计算 5V 输入下 10k 和 10k 电阻的电流
current = voltage_divider_current("5V", "10k", "10k")
print(f"Current through 10k+10k divider at 5V: {format_value(current, 'A')}")
# 计算 12V 输入下 1k 和 9k 电阻的电流
current = voltage_divider_current("12V", "1k", "9k")
print(f"Current through 1k+9k divider at 12V: {format_value(current, 'A')}")示例输出
voltage_divider_current_output.txt
Current through 10k+10k divider at 5V: 250 µA
Current through 1k+9k divider at 12V: 1.20 mA电流使用欧姆定律计算:$I = \frac{V_{in}}{R_{top} + R_{bottom}}$
相关文章
- 如何使用 UliEngineering 在 Python 中按比例计算分压器的电阻
- 如何使用 UliEngineering 在 Python 中按比例计算分压器的下分压电阻
- 如何使用 UliEngineering 在 Python 中计算分压器的功耗
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