Skip to content
tixsetPublic

About

Calculate inductance, resistance, Q factor, self-resonant frequency, LC tuning range, and physical winding parameters.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CoilCalc - LC Coil Calculator

English | Русский

License: MIT Platform Language Status GitHub Issues Last Commit

Browser-based coil and LC-tank calculator for radio hobby projects (including crystal radio), built with plain HTML/CSS/JS.

✨ Key Features

  • 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).

🧊 3D Model

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

🔒 Hold Contract

  • 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.

📐 Model Assumptions

  1. Inductance and parasitic capacitance formulas are approximate.
  2. Nearby metal objects and mounting parasitics are modeled partially.
  3. Rac is estimated with simplified skin-effect/type factors.
  4. Litz/stranded models use engineering approximations.
  5. Core effect is modeled through effective permeability.
  6. Reference tables are practical guides, not strict datasheet guarantees.

For real builds, verify with measurements and actual component datasheets.

🚀 Quick Start

  1. Open index.html in your browser.
  2. For e2e tests: install Node.js 18+ and npm.
  3. Run npm install.
  4. Run npm run test:e2e.

🗂️ Project Structure

  • 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.

📝 Notes

  • Three.js and OrbitControls are self-hosted in vendor/three for better reliability.
  • Keep releases tracked via CHANGELOG and tags.

🤝 Contributing

Pull requests are welcome. For major changes, open an issue first.

📄 License

MIT License. See LICENSE.

📞 Contacts

About

Calculate inductance, resistance, Q factor, self-resonant frequency, LC tuning range, and physical winding parameters.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages