View Single Post
  #16   Report Post  
Old January 1st 04, 01:34 AM
Richard Hosking
 
Posts: n/a
Default

Thanks to all for your replies
With regard to Tim's idea of the dual comparators, I presume these would in
"series". For the integration idea to work, the comparators would obviously
have to have their gain set carefully, otherwise random noise would
integrate to 1/2 time and be interpreted as signal. The circuit I was
thinking of would set the DC comparison point at halfway (say 2.5V for a 5V
logic level) with the DC level of the signal also at 2.5V. I presume in your
system the uP controls the comparison voltage and sets it with a DAC and the
signal DC level is 0V. Is this correct?
In my idea I was going to use the timing of signal transitions in a hard
limited signal. If there were several transitions with the same timing, I
would presume a "tone" was present and signal was being received. Randomly
timed transitions would indicate noise.The uP could follow the tone as an
adaptive filter to track carrier freq. Once carrier is received the uP then
captures dot, dash and space timing with the histogram as you describe. If a
moving average filter of these is kept, then the uP could track sender speed
variations.
Anyone have ideas as to the theoretical performance of such an idea or any
potential problems?

Thanks again
Richard
Tim Wescott wrote in message
...
Disclaimer: I've never decoded morse in my life, so most of what I write

is
educated guessing.

For my master's thesis I built a receiver that demodulated 400 baud MSK.
The RF chain delivered a signal centered around 2kHz to a 68HC11 which
sampled at 6400Hz and demodulated the data entirely in software -- and it
only had 2k bytes of code space. Granted, it was all in assembly, and it
used 94% of the available processor time to do it, but it did work. In
spite of having some really ugly compromises in the signal processing (the
sampling rate was really too low, and the only "multiply" was to add, not
add, or subtract from an accumulator) the receiver had performance within

a
dB of the theoretical optimum. I think with something modern like an AVR

or
a PIC a 16-baud OOK signal should be possible (fun, too).

OK, so you still have the problem with the math.

Consider using not one, but two comparators to square up your signal, so a
"non-signal" rarely gets above the threshold. You're back to needing AGC
(at least to set the comparator), but you can close the loop in your
software by looking at the comparator outputs for the right signatures

(too
much output = too low threshold, too little output = too high threshold),
and set the threshold from the uP. With a good signal to noise ratio this
should have a nice broad center to it that'll be easy to find. With a

good
narrow CW filter your signal to noise ratio will get better...

Once your threshold is set you can integrate the "buzz" from the

comparators
to see if you're receiving a carrier. You should probably integrate for
some period of time (the length of the fastest code you want to receive
would be good, it'd give you a sorta-kinda-matched filter) and take the
presense of signal 1/2 of the time to indicate the transmitter is "on".

I like the idea of using the dibits to form a PLL, but for receiving bad
code at an unknown rate you'd probably be better off making a little
histogram of the on and off times of the code. You should be able to see
two peaks in the histogram for "on" corresponding to dot and dash, and

three
for "off" corresponding to intra-letter, inter-letter and inter-word
spacing. At this point you can start looking for dashes, dots, and spaces
(maybe going back over your data to catch the beginning of the message, if
you have enough RAM) and decoding words. You could also estimate the

speed
of the code that you're receiving and feed it back to your KSMF (that's
kinda-sorta-matched filter, of course) for better noise figure.

Once you have your stream of dashes, dots, inter-charater and inter-word
spaces you can separate the charaters, look them up in a table and just
reject anything that doesn't seem to fit. I suspect that your performance
would be pretty good at this point, and if not the theoretical

ne-plus-ultra
of decoders it would be better at receiving the lousy senders than
Wofgang's.

"Richard Hosking" wrote in message
u...
Wolfgang
Thanks for your reply
I am not very sophisticated mathematically and I have not studied
communication theory. Your article is most helpful. However it looks as