# Electronics Calculators Ohm's law, resistor codes and standard values, dividers, LED resistors, RC filters, battery runtime, wire gauge, decibels, 555 timers, power cost. ## How to pay Machine-payable over x402. USDC on: Base (eip155:8453), Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), Polygon (eip155:137), Arbitrum One (eip155:42161). No accounts. No API keys. No signup. The paying wallet is the account. ## Machine-readable - OpenAPI: https://electronics-calc.x402tookit.com/openapi.json - x402 manifest: https://electronics-calc.x402tookit.com/.well-known/x402 - Catalog (free): https://electronics-calc.x402tookit.com/catalog - Health (free): https://electronics-calc.x402tookit.com/health - Uptime (free): https://electronics-calc.x402tookit.com/uptime ## Endpoints (11) ### GET /battery-runtime — $0.02 Battery runtime estimate from capacity (mAh and volts, or Wh) and load (mA or W), with efficiency and usable depth of discharge. Params: capacityMah?: number, voltage?: number, capacityWh?: number, loadMa?: number, loadW?: number, efficiencyPct?: number, usablePct?: number Example: https://electronics-calc.x402tookit.com/battery-runtime?capacityMah=2000&voltage=3.7&loadMa=150 ### GET /decibels — $0.02 Decibel conversions: power or voltage ratio to dB and back, and dBm to milliwatts and watts and back. Params: ratio?: number, kind?: string, db?: number, dbm?: number, milliwatts?: number Example: https://electronics-calc.x402tookit.com/decibels?ratio=2&kind=power ### GET /led-resistor — $0.02 Series resistor for an LED from supply voltage, forward voltage and current, with nearest E12 and E24 values and real current. Params: supplyV: number, forwardV: number, currentMa: number, count?: integer Example: https://electronics-calc.x402tookit.com/led-resistor?supplyV=5&forwardV=2¤tMa=20 ### GET /ne555-timer — $0.02 555 timer calculator: astable frequency, period and duty cycle from R1, R2 and C, or monostable pulse width from R and C. Params: mode: string, r1?: string, r2?: string, c: string Example: https://electronics-calc.x402tookit.com/ne555-timer?mode=astable&r1=1k&r2=10k&c=1u ### GET /ohms-law — $0.02 Ohm's law and power: give any two of voltage, current, resistance and power and get all four, with engineering units. Params: voltage?: number, current?: number, resistance?: number, power?: number Example: https://electronics-calc.x402tookit.com/ohms-law?voltage=12¤t=0.5 ### GET /power-cost — $0.02 Energy use and running cost of a device from its watts, hours per day and electricity price: daily, monthly and yearly. Params: watts: number, hoursPerDay: number, pricePerKwh: number, daysPerYear?: number Example: https://electronics-calc.x402tookit.com/power-cost?watts=150&hoursPerDay=8&pricePerKwh=0.16 ### GET /rc-filter — $0.02 RC filter cutoff frequency, time constant and charge times to 63%, 90% and 99% from resistance and capacitance. Params: resistance: string, capacitance: string Example: https://electronics-calc.x402tookit.com/rc-filter?resistance=10k&capacitance=100n ### GET /resistor-color — $0.02 Decode 3 to 6 resistor color bands to ohms, tolerance and temperature coefficient, or encode a value into 4 or 5 bands. Params: bands?: string, value?: string, tolerancePct?: number Example: https://electronics-calc.x402tookit.com/resistor-color?bands=red%2Cviolet%2Corange%2Cgold ### GET /resistor-standard — $0.02 Nearest standard E6, E12, E24, E48, E96 or E192 resistor values to a target, with the percent error of each neighbour. Params: target: string, series?: string Example: https://electronics-calc.x402tookit.com/resistor-standard?target=4.3k&series=E12 ### GET /voltage-divider — $0.02 Resistor voltage divider: output voltage, current and power from R1 and R2, or the R2 needed for a target output. Params: vin: number, r1: string, r2?: string, vout?: number Example: https://electronics-calc.x402tookit.com/voltage-divider?vin=5&r1=10k&r2=10k ### GET /wire-gauge — $0.02 AWG copper wire: diameter, area and resistance per km, the nearest AWG for an area, and voltage drop over a run. Params: awg?: integer, areaMm2?: number, lengthM?: number, currentA?: number, supplyV?: number Example: https://electronics-calc.x402tookit.com/wire-gauge?awg=18&lengthM=10¤tA=2&supplyV=12 ## Terms Results are computed locally from standard formulas and published tables, provided as is, for ideal components at the stated conditions. Real parts have tolerances, temperature effects and limits. This service gives no safety ratings: it does not provide wire ampacity, fuse sizing, mains-voltage guidance or any rating that a fire or shock hazard depends on. Follow local electrical codes and ask a qualified person for anything involving mains power.