#electrical
6 APIs with this tag
Conduit Fill API
NEC conduit-fill and box-fill maths as an API, computed locally and deterministically — the electrical-code calculations an electrician or estimator does on every run. The conduit-fill endpoint takes a set of conductors (as size:count pairs, e.g. 12:3,10:2) and a conduit trade size and returns the conductor cross-sectional area, the conduit's internal area, the fill percentage and whether it stays within the NEC Chapter 9 limit — 53 % for a single conductor, 31 % for two, 40 % for three or more — so nine #12 THHN fill a half-inch EMT to 39 % (legal) but ten do not. The box-fill endpoint applies NEC 314.16(B): each conductor adds its free-space allowance (2.00 in³ for #14, 2.25 for #12, and so on), a device yoke counts as two, internal cable clamps as one, and all equipment grounds together as one — all at the largest conductor's volume — to give the minimum junction-box size, checked against a box volume if you give one. Uses the THHN/THWN and EMT areas from NEC Chapter 9. Everything is computed locally and deterministically, so it is instant and private. Ideal for electrical-contractor, estimating, inspection and electrician app developers, conduit and box-sizing tools, and apprentice training. Pure local computation — no key, no third-party service, instant. Imperial: square inches and cubic inches. Live, nothing stored. 2 compute endpoints. Always verify against the adopted code edition — this is an estimating aid, not an inspection.
api.oanor.com/conduit-api
Three-Phase Power API
Three-phase AC power maths as an API, computed locally and deterministically. The power endpoint solves the three-phase power triangle from the line-to-line voltage, the line current and the power factor — the apparent power S = √3·V_L·I_L in volt-amperes, the real power P = S·cosφ in watts, the reactive power Q = S·sinφ in VAR and the phase angle — or works backwards to find the line current a load draws for a given real power. The wye endpoint gives the star-connection relationships, where the line-to-line voltage is √3 times the phase voltage and the line and phase currents are equal. The delta endpoint gives the delta-connection relationships, where the line and phase voltages are equal and the line current is √3 times the phase current. Supply a line or phase quantity and it returns the rest. Everything is computed locally and deterministically, so it is instant and private. Ideal for electrical, motor, industrial-automation, solar-inverter and building-services app developers, switchboard and motor-sizing tools, and electrical-engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is balanced three-phase power; for the single-phase power triangle use a power-factor API and for voltage drop a voltage-drop API.
api.oanor.com/threephase-api
Wire Gauge API
AWG (American Wire Gauge) maths as an API, computed locally and deterministically. The awg endpoint returns the physical properties of a gauge — the diameter, 0.127·92^((36−n)/39) mm, the cross-section area, the DC resistance per kilometre and per 1000 ft for copper or aluminium, and the Preece fusing current (the point at which the wire melts, far above any safe operating ampacity). The fromdiameter endpoint goes the other way, giving the nearest AWG for a measured diameter or cross-section area, n = 36 − 39·log₉₂(d/0.127). The resistance endpoint gives the resistance of a wire run from its gauge, length and material, R = ρ·L/A. Gauges 0/0 (1/0), 00 (2/0) and 000 (3/0) are entered as −1, −2 and −3. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, electrical and maker app developers, wiring and cable-selection tools, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is wire-gauge geometry and resistance; for cable voltage drop over a circuit use a voltage-drop API.
api.oanor.com/wiregauge-api
Voltage Drop API
Cable voltage-drop and conductor-sizing maths as an API, computed locally and deterministically. The drop endpoint computes the voltage lost along a cable run from the current, the one-way run length, the conductor cross-section and the material: the conductor resistance R = ρ·L/A, the voltage drop Vd = k·I·R (k = 2 for single-phase, √3 for three-phase), the drop as a percentage of the supply and the voltage left at the load. The sizing endpoint works backwards: from an allowable percentage drop it returns the minimum conductor cross-section needed, A ≥ k·I·ρ·L/Vd_allow, rounds up to the next standard cable size (1.5, 2.5, 4, 6, 10, 16, 25 … mm²) and reports the actual drop at that size. The power endpoint computes the power dissipated as heat in the cable, P = N·I²·R (N = 2 or 3 current-carrying conductors), and the cable efficiency given a load power. Copper (ρ = 0.0172) and aluminium (ρ = 0.0282 Ω·mm²/m) are supported. Everything is computed locally and deterministically, so it is instant and private. Ideal for electrical-installation and panel-design tools, cable selection to wiring-regulation limits, solar, EV-charger and sub-main sizing, and electrical-engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is cable voltage drop and sizing; for Ohm's law, reactance and resonance use an Ohm's-law API and for transformer ratios use a transformer API.
api.oanor.com/voltagedrop-api
Wire Gauge (AWG) API
American Wire Gauge maths as an API, computed locally and deterministically from the AWG definition. The awg endpoint takes a gauge — an integer, or 0/00/000/0000 (1/0–4/0) — and returns the conductor diameter (millimetres, inches, mils), the cross-section area (mm², kcmil and circular mils), the DC resistance per kilometre and per 1000 feet for copper and aluminium, and a typical ampacity. The convert endpoint finds the nearest standard AWG for a given cross-section area, diameter or kcmil, and also reports the exact non-integer gauge. The voltage-drop endpoint computes the round-trip voltage drop and power loss for a wiring run from the gauge (or area), length, current and conductor material, with the percentage drop and the voltage left at the load. Everything is computed locally and deterministically, so it is instant and private. Resistances are at 20°C; ampacity figures are typical guidance only — real installations are governed by the NEC/IEC tables for the conductor, insulation and conditions. Ideal for electrical and electronics tools, maker and hobby projects, solar and automotive wiring, and AV and installation planning. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is wire-gauge physics; for Ohm's-law voltage/current/resistance use an electronics API and for resistor colour bands use a resistor API.
api.oanor.com/awg-api
Lighting Calculator API
Lighting design maths as an API, computed locally and deterministically. The room endpoint works out how many lumens a room needs from its area and a target illuminance — given directly in lux or chosen from a room-type preset (living, kitchen, office, workshop and more) — and, optionally, how many fixtures at a given lumen output and how many watts at a given lamp type. The lux endpoint converts between lux, footcandles and lumens over an area, so you can find the illuminance from a light output and a room size or vice versa. The efficacy endpoint relates lumens, watts and luminous efficacy (lumens per watt): give any two — or a lamp-type preset such as incandescent, halogen, CFL or LED — and it computes the third. Everything is computed locally and deterministically, so it is instant and private. It is a lumen-method estimate: target levels are typical guidance (EN 12464 / IES) and a full design would add room and utilisation factors. Ideal for lighting and electrical tools, interior-design and home apps, retrofit and energy-saving calculators, and smart-home planning. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is illumination maths; for Ohm's-law electrical quantities use an electronics API.
api.oanor.com/lighting-api