Browser-based coil and LC-tank calculator for radio hobby projects (including crystal radio), built with plain HTML/CSS/JS.
- Repository: https://github.com/tixset/CoilCalc
- GitHub Pages URL: https://tixset.github.io/CoilCalc/
- Author: Zelenov Anton
- Core coil/tank calculations:
- inductance L
- DC/AC resistance (Rdc/Rac)
- Q factor and Xl
- self-resonant frequency
- operating frequency for selected C
- tuning range for Cmin/Cmax
- winding geometry and mass estimates
- Interdependent field synchronization:
- frequency range <-> capacitor parameters
- frequency <-> capacitance
- geometry <-> inductance
- Hold system per section with conflict validation.
- Searchable wire and capacitor standards references.
- EN/RU user interface.
- 3D LC model: coil + variable capacitor + connection wires.
- Live 3D legend (Material/Core/L/C/f).
- e2e Hold scenarios (Playwright, 12 tests).
Built on Three.js and includes:
- coil generated from N, pitch, layers, and diameter
- former and optional core
- variable capacitor rotor position mapped to Cmin..Cmax
- interconnect wires between coil and capacitor
- labels and live legend
Camera controls:
- LMB: rotate
- wheel: zoom
- RMB or Shift+LMB: pan
- Active Hold prevents external auto-writes to fields in held sections.
- This includes values coming from standards modals.
- Invalid Hold combinations produce non-blocking toast notices.
- Inductance and parasitic capacitance formulas are approximate.
- Nearby metal objects and mounting parasitics are modeled partially.
- Rac is estimated with simplified skin-effect/type factors.
- Litz/stranded models use engineering approximations.
- Core effect is modeled through effective permeability.
- Reference tables are practical guides, not strict datasheet guarantees.
For real builds, verify with measurements and actual component datasheets.
- Open index.html in your browser.
- For e2e tests: install Node.js 18+ and npm.
- Run npm install.
- Run npm run test:e2e.
- index.html: UI layout and sections.
- styles.css: styling, responsiveness, notices, 3D legend styles.
- script.js: calculations, synchronization, Hold, i18n, 3D, references.
- vendor/three: local Three.js and OrbitControls delivery.
- tests/e2e: Playwright scenarios for Hold contract.
- Three.js and OrbitControls are self-hosted in vendor/three for better reliability.
- Keep releases tracked via CHANGELOG and tags.
Pull requests are welcome. For major changes, open an issue first.
MIT License. See LICENSE.
- Author: Zelenov Anton
- Email: tixset@gmail.com
- GitHub: https://github.com/tixset/CoilCalc