Install?
40 hardware design calculators whose every number traces to a standard (IPC-2152/2221C/2141, ST AN2867, NXP UM10204, IEC 60063), with live labelled schematics and PCB cross-sections. Hydrogen UI, CLI and HTTP API.
adom-wiki pkg install adom/hardware-calculator
Latest: v0.4.0, published
README
htmlREADME
markdownHardware Calculator
40 hardware design calculators whose every number traces to a standard, with a live schematic of the circuit you are sizing.
Trace width to IPC-2152, clearance to IPC-2221C, impedance to IPC-2141, crystal load caps and oscillator start-up margin to ST AN2867, I²C pull-ups to NXP UM10204. Each result shows the formula it used and the document, revision and section it came from, and 26 calculators draw the circuit or PCB cross-section labelled with your values as you type.


Install
adom-wiki pkg install adom/hardware-calculator
hwcalc --ai-thread "<name>" start # opens the calculator in a Hydrogen tab
Say it to your AI
- "with the hardware calculator, what trace width for 3 A at 20 °C rise on 2 oz?"
- "size the load caps for a 12 pF crystal and check the gain margin with 25 mA/V gm"
- "hardware calculator: clearance for 300 V on an external coated layer"
- "open the hardware calculator on a buck from 12 V to 3.3 V at 2 A, 500 kHz"
Or from the terminal, no server needed: hwcalc calc trace I=3 dT=20 oz=2, hwcalc calc crystal CL=12p Cs=4p --svg osc.svg.
Calculators
✎ = draws the circuit or cross-section.
- Basics: Ohm's law & power · Voltage divider ✎ · LED series resistor ✎
- Signal: RC / RL / LC time constants & cut-off ✎ · Rise time, bandwidth & critical length · Skin depth · Reactance & RLC resonance ✎ · Op-amp gain & bandwidth ✎ · 555 timer ✎
- PCB: Trace width for current (IPC-2152 / IPC-2221) ✎ · Microstrip / stripline impedance (IPC-2141) ✎ · Conductor spacing for voltage (IPC-2221 Table 6-1) ✎ · Differential pair impedance (edge-coupled) ✎ · Via: resistance, current, parasitics ✎ · Fusing current (Onderdonk)
- Power: Linear regulator dissipation ✎ · Buck converter: inductor & ripple ✎ · Boost converter: inductor & ripple ✎ · Hold-up / bulk capacitor ✎ · Battery life (duty-cycled load) · Adjustable regulator feedback resistors ✎ · MOSFET conduction & switching loss ✎ · PDN target impedance
- Interfaces: I²C pull-up resistor range ✎ · Crystal oscillator load capacitors (CL) ✎ · Frequency tolerance (ppm)
- Measurement: Current-sense shunt ✎ · ADC resolution & ideal SNR · NTC thermistor (β model) ✎
- Thermal: Junction temperature & heatsink ✎
- Wiring: Wire gauge: resistance & drop
- RF: dBm · watts · volts · Wavelength & antenna lengths · Resistive attenuator (Pi / Tee) ✎ · VSWR · return loss · mismatch loss · Planar spiral inductor ✎
- Components: Standard values & resistor codes · Series / parallel combinations ✎ · Two-resistor combination finder ✎ · Length & copper unit converter
Why you can trust it
- Standards checked for currency (2026-09-25): IPC-2221 is Rev C (Dec 2023), IPC-2152 is still Rev 0 (2009), and so on. The register with every source, its revision and the date checked is in SOURCES.md.
- No undisclosed fits. Where a standard is chart-only (IPC-2152) the published curve fit is named; where a table is paywalled (IPC-2221 Table 6-1) the values were cross-checked against two independent reproductions.
- Tested against the sources' own worked examples, for example AN2867's 8 MHz crystal: gm_crit 0.23 mA/V and gain margin 107. 140 automated checks run on every change.
- Honest limits. Closed-form impedance says ±5–10 % and to confirm with your fab's field solver; unmodelled effects are stated under each result.
Contributing
Anyone in the adom org can publish. Every change follows the hwcalc-calculator-standards skill (Dev skills tab): source
fetched and revision confirmed, a test reproducing the source's worked example, a labelled drawing for any circuit, and the
sources register updated. Releases follow hwcalc-release (Publish skills tab).
Interfaces
One formula module (calcs.js) drives the Hydrogen UI, the CLI and an HTTP API: POST /api/calc {calc, inputs},
GET /api/schematic?calc=<id>&… (SVG), POST /api/open {aiThread, calc, inputs} to put a calculation in front of the user.
Zero dependencies beyond Node.js 18+. MIT licensed.