Como encontrar o próximo valor de resistor padrão inferior em Python usando UliEngineering

Você pode encontrar facilmente o próximo valor de resistor padrão inferior usando a biblioteca Python UliEngineering:

next_lower_resistor.py
from UliEngineering.Electronics.Resistors import *
from UliEngineering.EngineerIO import *

# Encontrar próximo valor de resistor E96 inferior a 1.5k
resistor = next_lower_resistor("1.5k")
print(f"Next lower than 1.5k: {format_value(resistor, 'Ω')}")

# Encontrar próximo valor de resistor E24 inferior a 120Ω
resistor = next_lower_resistor("120Ω", sequence=e24)
print(f"Next lower than 120Ω (E24): {format_value(resistor, 'Ω')}")

Exemplo de saída

next_lower_resistor_output.txt
Next lower than 1.5k: 1.47 kΩ
Next lower than 120Ω (E24): 100 Ω

A função next_lower_resistor() encontra o próximo valor de resistor padrão inferior a partir da série E especificada (o padrão é E96).


Check out similar posts by category: Electronics Python