Como calcular tensão através do resistor em Python usando UliEngineering
Você pode calcular facilmente a queda de tensão através de um resistor usando a lei de Ohm com a biblioteca Python UliEngineering:
Σ
TechOverflow calculators:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button.
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button.
Ω
⚠
A
⚠
voltage_across_resistor.py
from UliEngineering.Electronics.Resistors import *
from UliEngineering.EngineerIO import *
# Calcular tensão através de resistor de 1kΩ a 5mA
voltage = voltage_across_resistor("1k", "5mA")
print(f"Voltage across 1kΩ at 5mA: {format_value(voltage, 'V')}")
# Calcular tensão através de resistor de 100Ω a 33mA
voltage = voltage_across_resistor("100Ω", "33mA")
print(f"Voltage across 100Ω at 33mA: {format_value(voltage, 'V')}")Exemplo de saída
voltage_across_resistor_output.txt
Voltage across 1kΩ at 5mA: 5.00 V
Voltage across 100Ω at 33mA: 3.30 VA tensão é calculada usando a lei de Ohm: $V = I \times R$
Posts relacionados
- Como calcular corrente através do resistor em Python usando UliEngineering
- Como calcular o valor do resistor a partir de tensão e corrente em Python usando UliEngineering
- Como calcular potência a partir de corrente e tensão em Python usando UliEngineering
Check out similar posts by category:
Calculators, 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