TCXO and hotspot frequency accuracy: why the modem drifts

Category: CalibrationDifficulty: ★★★~9 minutes

The hotspot is assembled, provisioning went through, the logs look clean, the radio is sitting half a metre from the board — and there's no link. Or there is a link, but the data quality is terrible: packets drop, Last Heard flickers, SMS don't arrive, and the modem's BER in the logs keeps climbing. In nine cases out of ten the root of the problem isn't "buggy software" or a "bad radio" but frequency drift: the hotspot transmitter's actual frequency differs from the one the radio is listening on by several kilohertz. And the main culprit behind this drift is the reference oscillator on the modem board. Let's work out why a cheap crystal "wanders", what a TCXO is, and how to fix drift both in software and in hardware.

Symptom: the radio is right there, but there's no link

The classic picture of frequency drift looks like this:

That last point is an almost certain diagnosis of temperature drift. If the behaviour depends on how long the modem has been running and how hot it has become, the problem is precisely the stability of the reference oscillator.

Why accuracy specifically mattersDMR uses narrowband 4FSK modulation with a carrier spacing of just 12.5 kHz. The receiver expects the carrier in a very narrow window. A drift of 1–2 kHz already shifts the symbols in frequency enough that the demodulator starts confusing dibits — hence the rising BER with no relation to signal level.

Cause: the crystal drifts with temperature and tolerance

The heart of any radio modem is the reference oscillator, which sets the baseline for the frequency synthesizer. On budget boards this is an ordinary crystal resonator (XO) at 12 МГц or 14,7456 МГц with no compensation whatsoever. Such a crystal has two flaws.

Initial tolerance. The rated accuracy of a cheap crystal is on the order of ±20…±50 ppm (parts per million). At an operating frequency of 434 МГц, even 10 ppm already amounts to 4,34 кГц of drift. That means two identical boards from the same batch can leave the factory differing in frequency by several kilohertz simply because of the manufacturing tolerance of the resonator.

Temperature drift. A crystal's frequency wanders with temperature along a characteristic parabolic curve. With an ordinary XO the coefficient can reach the same ±20…±40 ppm across the operating temperature range. When the board heats up — from its own consumption, from the Pi processor underneath it, from a closed case, from summer heat — the carrier creeps away. This is exactly why a hotspot "drifts" during operation: a cold start gives one frequency, the warmed-up state gives another.

Add the tolerance and the drift together, and you get a modem that neither sits on the factory frequency nor stays put.

What a TCXO is and how it fixes this

TCXO (Temperature Compensated Crystal Oscillator) is a temperature-compensated crystal oscillator. Inside the package, besides the resonator itself, there's a compensation circuit: it measures temperature and adjusts the load on the crystal to compensate for that very parabolic drift curve. The output is a stable frequency regardless of warm-up.

The numbers speak for themselves. A typical TCXO for MMDVM boards has an accuracy of ±0,5…±2 ppm against ±20…±50 ppm for a bare crystal. At 434 МГц that's the difference between drifting by hundreds of hertz and drifting by several kilohertz. And, more importantly, the TCXO holds that frequency across the temperature range — the hotspot behaves the same whether cold or warmed up.

The practical takeaway: a TCXO doesn't eliminate calibration (you still need to dial in the initial offset in software), but it removes the wandering. Without it you calibrate once when cold, and an hour later everything has shifted again.

How this shows up on ADF7021 boards

Most amateur hotspots are built around the ADF7021 transceiver — this includes both the HS_Hat (single-band boards for the Raspberry Pi) and the Dual_Hat (dual-band). The ADF7021 itself is a good chip, but its frequency stability depends entirely on the external reference oscillator fed to its REF input.

This is where the main difference between board versions lies:

If you're choosing between options, the difference between boards is covered in detail in the article on HS_Hat or Dual_Hat. For fighting frequency drift, the presence of a TCXO is a far more significant criterion than the number of bands.

How to tell a TCXO board apartTake a look at the board next to the ADF7021 chip: a TCXO is a metal rectangular package (usually 3,2×2,5 мм or larger) with a frequency marking, sometimes labelled TCXO in the silkscreen. An ordinary crystal has two or three leads and a characteristic "can" or a flat package with no circuit inside. If the seller says nothing about a TCXO — it almost certainly isn't there.

Software fix: RXOffset, TXOffset and calibration by BER

The initial frequency offset (the one from factory tolerance) is fixed without a soldering iron — in software. The MMDVM configuration has two parameters:

These offsets shift the actual frequency relative to the one set in the firmware, compensating for the reference oscillator's drift. The goal of calibration is to find the values at which BER is minimal. The easiest approach is to work from the observed BER: set the radio to a fixed frequency, transmit from the hotspot, and tweak TXOffset until the BER in the logs drops toward zero; then, working in the reverse direction, dial in RXOffset. This procedure and the tool for it are described step by step in the guides on frequency calibration and MMDVMCal step by step.

For what counts as a good result, see the article BER: the norm: the target is a steady few tenths of a percent and below. In parallel it's worth checking that the reception level is set correctly, otherwise a good BER can be confused with a gain problem — there's more on that in the note on RSSI calibration.

An important limitation. Software calibration fixes a single offset — for the temperature at which you calibrated. On a TCXO board this works beautifully: dial it in once and forget it. On a board without a TCXO calibration handles the tolerance but not the drift — the board warms up, and the chosen offset is wrong again. This is a fundamental distinction: software fixes a constant offset, hardware compensation fixes the wandering.

Hardware fix: a board with a TCXO

If the hotspot consistently drifts precisely when it warms up and no TXOffset holds for longer than half an hour — this can't be cured in software. The options:

When choosing a band and an offset margin, it helps to understand the modem's tuning limits — that's covered in the note on modulation and tuning range.

How to measure the drift

Before fixing anything, you need to see the drift in numbers. A few practical methods:

Practical tips

A stable hotspot is the foundation of a reliable network

Stable data reception is critical for SMS and Last Heard in DMRhub: frequency drift hits these features first. We cover calibration in detail in our guides.

Sources

  1. Jonathan Naylor (G4KLX). MMDVMCal — the MMDVM calibration utility. github.com/g4klx/MMDVMCal
  2. Analog Devices. ADF7021 — High Performance Narrow-Band Transceiver IC, datasheet.
  3. Jonathan Naylor (G4KLX). MMDVMHost — the RXOffset/TXOffset parameters in MMDVM.ini. github.com/g4klx/MMDVMHost
  4. Application note on using a TCXO as a reference oscillator in narrowband transceivers (general theory of ppm and the temperature drift of crystal resonators).