Close

First step: frequency estimation

A project log for Simple Digital Mode Transmitter

A low-power, all-digital transmitter.

robgRobG 05/12/2021 at 08:520 Comments

A key feature of FT8, WSPR and other waveforms is that the FSK tones are very closely spaced in frequency (compared to, say, the kind of FSK that an ISM-band device might transmit). Also, they change relatively slowly - only a few symbols per second, if that.

The first step, therefore, is to be able to very accurately (<1Hz) estimate the frequency of an audio-frequency tone that is presented to a pin on the Arduino. And to do this quickly, certainly less than 100msec.

The approach I've taken is to count rising edges (Ne) whilst simultaneously running a timer (f = 2MHz). After the measurement period is up, the frequency is simply f x Ne / timer_value.

It took a few hours of messing about with timers and interrupts, but finally it's working very nicely. The plots below show the measured frequency output for a given audio input.

Comparison of the frequency estimator output (graphed in Libreoffice - top) versus the spectrogram of the original audio (in Audacity) for an FT8 packet.

(Note: audio signal is applied to the Nano pin via a series capacitor (DC block) and resistor divider so that it is centred mid-rail.)

Discussions