Post #1849702
2026-01-25 15:59 UTC
Managed to detect 8 different frequencies in an input signal (50 times per second) using just 1mA of current, running the chip at 4.2MHz. Pretty sure I can do better than this with some more work. But that's already potentially ~50 bytes data per second I can transfer.
The algorithm I am using is the Goertzel algorithm:
https://www.embedded.com/the-goertzel-algorithm/
It's a relatively unknown algorithm, but it's extremely simple and I think better suited to the task than the well known FFT family of algorithms (yes there are multiple FFT algorithms).
The implementation I wrote is fixed point and uses about 8 cycles per iteration. I should write a blog post about it some time.
Eventually I want to send data/programs using nothing more than a cheap microphone and some audio processing. Let's see if that's possible.
#dsp
Replies (1)
-
@ayke@hachyderm.io 2026-02-13 16:08
Update: after heavily optimizing the Goertzel algorithm (in ARM assembly of course) it's now at ~18 frequencies that can simultaneously be detected (4.2MHz chip, 35000 samples/sec, 100 times per second). That appears to be about as far as I can push it. Note that in the above post I probably used a sample rate of 25000 which needs fewer cycles to process. Next up: defining some sort of framing format with preamble so the receiver can lock on to the signal and calibrate the various frequencies. And see how much data can actually be sent over sound without getting lost in noise.