# Simple way to decoding FSK

I'm trying to build simple fsk transmitter and receiver, the transmitter is just an FPGA with a wire, the logic is quite simple, I mix (with a XOR) the transmission frequency with a lower frequency, thats create some distortions which can be picked up with a simple FM receiver.

The receiver is based on the TDA7000 (yes I know that's obsolete) with a fixed tuning frequency. Here is the received spectrum for two different case, the peak at 1.1 KHz should indicate logic LOW and the peak at 1.6 KHz should indicate HIGH, the peaks are about 300mV, but I guess it may vary

Note that there are distrotions at 2.1 Khz and and 3 Khz.

How can I feed the signal to an FPGA, which should count and identify the frequency, with a minimal number of parts, I guess LM741 is too much for that kind of task. How do I deal with the distortions? Any other suggestions?

simulate this circuit – Schematic created using CircuitLab

You could get the signal into the FPGA by running it through an op-amp to give it a DC offset (and possibly increase the amplitude, although that's not strictly necessary), then into an ADC; the ADC doesn't need to be particularly fast given that your signals are at quite a low frequency, and an FPGA can drive any ADC with an SPI (or parallel) interface with some very simple logic.

Once the FPGA can "see" the signal via the ADC, you have any number of DSP options for decoding it. Xilinx, for example, have free IP cores for digital filters and/or FFT engines, either of which can do what you need - discarding unwanted frequencies (including the distortions you refer to) and detecting your desired frequencies.

• I've managed to identify the frequencies with arduinos adc and a simple sketch using the fft, I'll try porting it to something smaller like the attiny 13,I guess it might save the mess with embedded cores – Kirill Kulakov Aug 11 '13 at 16:12

This should be a comment but there isn't enough room.

Don't bother voting/down-voting on that basis.

The top trace looks like 1.6kHz (high) and the bottom trace looks like 1.1kHz (low). What equipment are you using for getting these spectrum traces? Also, where on the TDA7000 are you measuring? Also what carrier frequency are you using?

The top trace also shows a peak at about 3kHz and don't be surprised by this because your modulation method stinks and it will produce harmonics of the modulator frequency and the carrier frequency.

I'd say the distortion you are seeing on the top trace is at 3.2kHz and on the lower trace I'd say you are seeing 2.2kHz and 3.3kHz.

I'm not that certain because we don't know anything about the display with the green traces on?

• I've connected the output of the TDA7000 to speakers and get the spectrum with an Android app which plots the the spectrum from the microphone.The carrier frequency is 105.33Mhz – Kirill Kulakov Aug 10 '13 at 16:01
• What's the android app called - there is a good one called FrequenSee. I use it for on the spot audio checks. How did you extract the screen data by the way? – Andy aka Aug 10 '13 at 16:58
• Yes, that it, I'm using this one as well. I took a screen shoot, try holding two physical keys togather – Kirill Kulakov Aug 10 '13 at 17:10
• @KirillKulakov I must be going blind!!! – Andy aka Aug 10 '13 at 17:21
• any suggestion about the decoding circuit? – Kirill Kulakov Aug 10 '13 at 17:33