krishnax12/tensa-zangetsu-keychain-nfc

Summary: Calculates target inductance and estimated resonance for a 14.5 MHz square antenna using chip, interturn, bridge, and connection capacitances.

Version
0.0.13
License
unset
Stars
1

antenna-tuning.ts

import { estimatedInductanceH } from "./square-antenna"

// NXP AN11276 sections 4.2.1–4.2.3; starting estimates for prototype tuning.
export const targetResonanceHz = 14.5e6
export const chipCapacitanceF = 50e-12
export const estimatedInterturnCapacitanceF = 3e-12
export const estimatedBridgeCapacitanceF = 1e-12
export const estimatedConnectionCapacitanceF = 1e-12
export const estimatedTotalCapacitanceF =
  chipCapacitanceF +
  estimatedInterturnCapacitanceF +
  estimatedBridgeCapacitanceF +
  estimatedConnectionCapacitanceF
export const targetInductanceH =
  1 / ((2 * Math.PI * targetResonanceHz) ** 2 * estimatedTotalCapacitanceF)
export const estimatedResonanceHz =
  1 / (2 * Math.PI * Math.sqrt(estimatedInductanceH * estimatedTotalCapacitanceF))