Files
zmVault/timestamped/2026-03-05_10-26-48.md

1008 B

id, title, tags, date-created, daily
id title tags date-created daily
2026-03-05T10:26:48-0500 2026-03-05 10:26:48
status/draft
2026-03-05T10:26:48-05:00 2026-03-05

2026-03-05 10:26:48

Python SQLite Voltage Drop Calculator

Python script to account for voltage-drop based on various factors given in various forms

Python to handle calculation, defaults. SQLite to store conductor properties (resistance, reactance)

Allowable voltage drop given by

  • percent overall
  • percent per n feet
  • volts overall
  • volts per n feet
import math

"""
current
apparent_power
voltage
phases
wire_size
parallel_runs
wire_material
conduit_material
"""

if (!current) {
    current = apparent_power / voltage
}

if (phases = 3) {
    max_resistance = voltage_drop_volts / math.sqrt(3) * current
}
else {
    max_resistance = voltage_drop_volts * current * 2
}

power_factor_angle = math.acos(power_factor)

effective_z = ac_resistance * math.cos(power_factor_angle)
    + reactance * math.sin(power_factor_angle)