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.
(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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.