A Bell 202T modem uses FSK modulation (1200HZ, 2200HZ) and send data at up to 1800 bits per second. I need to replace an "analog" version of this with a digital version, sampling the phone line with an A/D and "decoding" the 1's and 0's in firmware (ARM C). My question is how.. The modulation index is too narrow to count zero crossings, so I believe I need a "phase coherent decoder", which is something like looking at the slope then working back to frequency of the sine function... BUT that's as far as I've gotten. Anyway, I'm looking for a good reference "how to" for dummies, or at least a starting point so I can maybe figure something out. Any references/advice is appreciated. Thanks.
Decoding FSK
Started by ●September 20, 2008
Reply by ●September 20, 20082008-09-20
Jon Mcleod <jonmcleod2003@yahoo.com> wrote:>A Bell 202T modem uses FSK modulation (1200HZ, 2200HZ) and send data at >up to 1800 bits per second. > >I need to replace an "analog" version of this with a digital version, >sampling the phone line with an A/D and "decoding" the 1's and 0's in >firmware (ARM C).>My question is how.. The modulation index is too narrow to count zero >crossings, so I believe I need a "phase coherent decoder", which is >something like looking at the slope then working back to frequency of >the sine function... BUT that's as far as I've gotten.I implemented such a FSK demodulator once. It was diabolically simple: you take the quadrature input samples, and convert them to polar notation. You ignore the amplitude and look just at the phase, and then you take the first order difference function. (i.e. you subtract adjacent samples of the phase). The result is a staircase waveform, with the amplitude of each step corresponding to the modulated frequency. At this point you could apply a matched filter and detect the data. You may be wondering how to get a quadrature signal from the 202T- modulated real-valued waveform. I think you could demodulate the real-valued waveform with a quadrature mixer at center frequency 1700 Hz. There may be other approaches. I did not face this particular issue in the system I worked on, as it had a quadrature demodulator to begin with.>Anyway, I'm looking for a good reference "how to" for dummies, or at >least a starting point so I can maybe figure something out.>Any references/advice is appreciated.Sorry I don't have any references on how to do this. Steve
Reply by ●September 20, 20082008-09-20
Jon Mcleod wrote:> A Bell 202T modem uses FSK modulation (1200HZ, 2200HZ) and send data at > up to 1800 bits per second.Do you have to be compatible to BELL 202 or any specific protocol?> I need to replace an "analog" version of this with a digital version, > sampling the phone line with an A/D and "decoding" the 1's and 0's in > firmware (ARM C). > My question is how..That's simple: 1) sample the incoming data by a comparator 2) xor the input with the signal delayed by something like a half period of 1200Hz (can't remeber what is optimal delay from the top of my head).> The modulation index is too narrow to count zero > crossings,You can do that, too. It works.> so I believe I need a "phase coherent decoder", which is > something like looking at the slope then working back to frequency of > the sine function...It could be done in that way, however, with B202, there is really no reason to strive for the optimality.> BUT that's as far as I've gotten. > Anyway, I'm looking for a good reference "how to" for dummies, or at > least a starting point so I can maybe figure something out.The protocol part over B202 (such as MNP5 or V42B) is much more complex then the modem part itself. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●September 20, 20082008-09-20
Steve Pope wrote:> I implemented such a FSK demodulator once. It was diabolically > simple: you take the quadrature input samples, and convert them > to polar notation. You ignore the amplitude and look just at > the phase, and then you take the first order difference function. > (i.e. you subtract adjacent samples of the phase). The result is a > staircase waveform, with the amplitude of each step corresponding to > the modulated frequency. At this point you could apply a > matched filter and detect the data. > > You may be wondering how to get a quadrature signal from the 202T- > modulated real-valued waveform. I think you could demodulate the > real-valued waveform with a quadrature mixer at center frequency > 1700 Hz. There may be other approaches. I did not face this > particular issue in the system I worked on, as it had a quadrature > demodulator to begin with.OK, I mix with 1700Hz and then have a stream of I and Q samples.. I[] and Q[], for a new signal at +500hz and -500hz... To convert to polar notation, are we talking about I[n] + Q[n]j converted to A * e ^ (j x theta)? Then you just keep theta? Then I subtract adjacent theta values some come up with (essentially) and FM signal that I can slice?
Reply by ●September 20, 20082008-09-20
Jon Mcleod <jonmcleod2003@yahoo.com> wrote:>OK, I mix with 1700Hz and then have a stream of I and Q samples.. I[] >and Q[], for a new signal at +500hz and -500hz...>To convert to polar notation, are we talking about I[n] + Q[n]j >converted to A * e ^ (j x theta)? Then you just keep theta?Correct. If in matlab, the function angle().>Then I subtract adjacent theta values some come up with (essentially) >and FM signal that I can slice?An AM signal actually, or more technically speaking ASK -- amplitude shift keying. Steve
Reply by ●September 20, 20082008-09-20
Steve Pope wrote:> An AM signal actually, or more technically speaking ASK -- amplitude > shift keying.Right. Sorry. I meant you have a representation of the "baseband" used to generate the FM(FSK) signal in the first place.
Reply by ●September 20, 20082008-09-20
On Sep 21, 10:21 am, Jon Mcleod <jonmcleod2...@yahoo.com> wrote:> A Bell 202T modem uses FSK modulation (1200HZ, 2200HZ) and send data at > up to 1800 bits per second. > > I need to replace an "analog" version of this with a digital version, > sampling the phone line with an A/D and "decoding" the 1's and 0's in > firmware (ARM C).Why? Analogue is geberally simpler and better for some applications. Why re-invent the wheel?
Reply by ●September 21, 20082008-09-21
HardySpicer wrote:> On Sep 21, 10:21 am, Jon Mcleod <jonmcleod2...@yahoo.com> wrote: >> A Bell 202T modem uses FSK modulation (1200HZ, 2200HZ) and send data at >> up to 1800 bits per second. >> >> I need to replace an "analog" version of this with a digital version, >> sampling the phone line with an A/D and "decoding" the 1's and 0's in >> firmware (ARM C). > Why? Analogue is geberally simpler and better for some applications. > Why re-invent the wheel? >The old system (analog modem + Z80 cpu) has a bunch of obsolete parts. They just want to redo it. HOWEVER, that being said, the Arm7 in the new design isnt going to be able to "do the math" in real time (the angle function) so maybe you're on to something..
Reply by ●September 21, 20082008-09-21
Jon Mcleod <jonmcleod2003@yahoo.com> wrote:>The old system (analog modem + Z80 cpu) has a bunch of obsolete parts. >They just want to redo it. HOWEVER, that being said, the Arm7 in the >new design isnt going to be able to "do the math" in real time (the >angle function) so maybe you're on to something..Try a lookup table. An arctan() function has 8-way symmetry so the table only needs to cover 45 degrees. Anything but the slowest imaginable ARM should be able to demodulate 300 bauds. (Of course I don't know what else this ARM is required to do.) Steve
Reply by ●September 21, 20082008-09-21
> Any references/advice is appreciated. Sorry its in german, but the pictures should be clear enough: http://www.embeddedforth.de/temp/fsk.pdf Its the usual delay & multiply version. Simple on a microprocessor if you can fix the sample-rate to get the required delay. Its noncoherent. Coherent is in theory better because a local oscillator is less noisy. Coherent is rare for FSK. If you wanted PSK as an option you would need a more complex decoder and that could be used to do FSK coherent. The old AMD 1200 baud modem-ICs did it that way. MfG JRD