Electronic – Power line communication, how to check if frequency is present

cortex-m3power line communication

I'm trying to communicate on a power line without external filters (only a filter for the 50/60Hz), because I want to use only digital filters.
My processor is a Cortex-M3 device running at 24MHz.
My communication is very simple, if the frequency of the carrier is present this is a 1, if not, is a 0. Obviously I will use a start bit for sincronization.
The frequency of the carrier is 125kHz.
In simple words, I wanna recreate the TDA5051 ASK power-line modem, with software.
I think that there are 2 valid method for doing this:
– Filter the signal with a series of FIR or IIR filters and analize the resulted signal
– Making FFT without filters the signal and check if the portant is present.
What's the best method? There is a best way?

Best Answer

FFT is overkill. Use the Goertzel algorithm to detect a single frequency.

This effectively implements a second-order IIR filter with poles at e + 2πiω and e − 2πiω, and requires only one multiplication (assuming 2cos(2πω) is pre-computed), one addition and one subtraction per input sample. For real inputs, these operations are real.

"My communication is very simple, if the frequency of the portant is present this is a 1, if not, is a 0."

This is called on-off keying. I'm not sure if Goetzel is the optimal method for demodulating this in digital, but at least one person recommends it.