FSK Decoding

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have an FSK signal that I want to reverse engineer. I know...

 

a) the two frequencies involved (scope/spectrum analyser tells me that)

b) the bit time (scope)

c) the sort of data the signal carries

 

Rather than build a hardware decoder I'm wondering if anyone has used and can recommend a software solution.

 

I'm thinking that I clean up the signal and then digitise is using a logic analyser giving me a file of sampled data at 2*Nyquist (at least). What I'd like to do is feed that into 'something' to extract the bit stream.

 

Any thoughts?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Search for RTTY demodulator software, as these signals are often sent using FSK or AFSK. 

 

Edit:  There are some examples in the project section using FSK as a search term.

 

 

 

 

 

Last Edited: Thu. Jun 16, 2016 - 02:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you tell me the freqs and baud rate, I'll post the c source to a decoder. Have to wait till I get home.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the two freq , and what is the baudrate compared to the lowest freq? (perhaps it's (G)MSK )

 

There is a way (can't remember but I think I can google it when I come home), with just a filter, and a compare (perhaps ABS SQR), and then you get high and low out.

 

I have decoded 9600 baud (GMSK) in SW.

 

 

Add:

And if it's a clean signal you don't need to sample that fast, I can decode the 9600 baud with a sample rate of 11KHz (PC soundcard)

Last Edited: Thu. Jun 16, 2016 - 02:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I know you said software solution, but I have a few of these sitting here:

 

http://www.ti.com/lit/ds/symlink...

 

If you want a quick hardware solution.

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank would be awesome, 8660 baud, mark is two cycles of 17.32kHz and space is 4 cycles of 34.63kHz.   Thanks again

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Measure time between zero crossings? 1/17.32khz and 1/34.64khz?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

can recommend a software solution

You were probably trying to locate a canned solution, which I can't offer, but if you wanted to write your own there are obviously several approaches one can use.

 

I think one of the more interesting approaches is to use a Goertzel Algorithm for known frequency tone detection.

 

A FFT (or DFT, really), takes an input signal and tells you the magnitude of the various frequency components within the signal.

Computationally it uses LOTS of processing power, as it is calculating the presence of a signal, and its energy, for "all" of the frequencies in the spectrum it covers.

(Well, that's half true, it breaks the spectrum into little bands, (bins), and doesn't do a true analog sweep of "every" frequency)

 

But the point is if you know ahead of time the frequencies within the input signal that you are looking for, (which you do for an FSK decoder), then you can dump the DFT and use a Goertzel algorithm to tell if there is any signal energy present in the input signal for the desired frequency one is looking for.  This is a much simpler task, computationally.

 

I used an Xmega to built a one-chip DTMF decoder, using the Goertzel algo and having it check for 16 frequencies, (The Row and Column Freq's).

 

Note that with my marginal programming skills I used a 32 MHz uC to do this, while people did this back in the 1980's (?) with a micro running on a 3.x color burst Xtal, 10 times slower, (albeit in Asm Language).

 

The photo shows two Xproto's (Xmega's), one used to generate DTMF's and the other decoding the DTMF signal.

 

JC

 

 

 

 

 

Last Edited: Wed. Aug 17, 2016 - 08:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I remember that that there is an APP note somewhere where a old 8 bitter (can't remember which 6502 Z80  or something like that, I remember it was without a MUL instruction), make a 4x4 (phone decoder)  , ASM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps this one from Texas Instruments:

Add DTMF Generation and Decoding to DSp-uP Designs.  1989.

 

JC

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are there start and stop bits like rs232, or is it synchronous like a zilog scc 8530? (async is easier)

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

stownley wrote:
Thank would be awesome, 8660 baud, mark is two cycles of 17.32kHz and space is 4 cycles of 34.63kHz.   Thanks again

 

Is this the OP's signal ?

Is that over an analog-link, or arriving digital (as in an IR link) ?

If digital, it sounds similar to manchester/BiPhase.  Viz: Same time for a 1 or 0, but the edges in the time slot determines 1 or 0.

Main issue here is going to be phase-locking to the 8660 bit times - I guess there is some known preamble ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No it was a normal micro without a MUL instruction, because I remember that some of the coefficients was a bit of the correct value so less bits was set, so a inline MUL could be done faster, (but I can't find it now)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you post a data file or a scope trace? I'm working on an 8660bps decoder that uses a start and stop bit at home...

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Since the LM567 are very common part and low cost solution. With only 51/52 MCUs+LM567,you could decode the FSK with minimum budget.
I already made with only PC BASIC but another (the MCU) finished but didn't tested yet.
Tiro

Last Edited: Fri. Aug 19, 2016 - 05:20 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want to make 8660 baud, then perhaps take a look at the way of how AIS does it.

It's 9600 baud GMSK on a normal VHF channel, at that not to had to decode on an AVR.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've got the 8660 sender working. Trying to get the receiver to work. Is the waveform async like a uart? 8, none and 1? Is the gizmo that uses a bastard baudrate a secret? Google doesn't show any hits on 8660 baud or bps.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess that we have changed OP! (so forget my #16)

 

To look for 17kHz and 34KHz I guess that the easy way (unless some special HW in the micro can be used), is to digitize the signal, and measure the time between two low going edges (that way the the digitized signal don't need to be in balance ).

 

Something like a 100KHz timer ISR could then easy check if there are about 3 or 6 isr's between the edges.

 

For HW use I guess that we need to know witch micro you want to use? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would consider a few different options... for either OP ;-)

 

1) Write your own plugin for a saleae using their SDK

 

- or -

 

2) Skip the LA step and capture your cleaned up signal using a PC sound card, then analyse using either gmfsk or multimon.  Neither is likely to yield anything useful out of the box, but they are open source tools so I should be easier to tweak them than to write your own from scratch.  If you can't easily tweak for the correct frequencies, you can re-sample the capture using an audio editor like Audacity.  For the '2nd' OP, with frequencies as high as 34 kHz, you might be out of luck.  While many PC sound cards can sample at 96 kHz, the analog front end is likely to have a low pass filter with a cuttoff in the neighbourhood of 20 kHz.

 

EDIT: This might prove fruitful:

http://hackaday.com/2016/04/12/dump-your-old-computers-rom-using-audacity/

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Sat. Aug 20, 2016 - 02:40 PM