[McHUG] Re: CW Decoder for Arduino ([email protected])

n3sb at qis.net n3sb at qis.net
Sun Oct 12 11:06:53 EDT 2008


Hi Pat;

The program I posted does not depend on a specific audio frequency - it's
looking for a digital input that is sampled at 1000 Hz. The digital input could
come from a PLL chip such as a 567 tone decoder. You can test the program with a
hand key to send CW into it. Don't feed it audio. That's not to say that an
audio demodulator won't be implemented sometime in the future, but 567 chips
are less than $2 each, are great for this type of application, and are easy to
work with.

The decoded ASCII data is output at 9600 baud over the RS-232 line. The data is
sent on the same serial interface used to program the Arduino. You could use a
terminal program and connect to the Arduino via the same interface. (I've done
this and it works fine.)

I'll have an update available shortly. I've implemented an automatic speed
tracking algorithm that allows the Arduino to copy CW over a wide speed range.
The delay value hard-coded into the program I posted is 100, which is a dot
length of 100 ms. That translates to about 12 WPM, but there's considerable
leeway in the copyable speed.

I have a couple ideas about what can be further done. As-is, it copies CW pretty
well, which is a useful application in itself. But I'd like to add an interface
to a PS-2 keyboard to support sending CW. I also want to merge this code with
the LCD interface code I have, to make a self-contained CW device. 

Beyond that, there are some possibilities with high speed CW. Imagine being able
to transfer messages / data at 100 WPM. Shouldn't be a big problem at all.
Imagine adding some string parsing code to evaluate the received CW, and then
manipulate various digital outputs on the Arduino. Applications include a
pager, remote control device, etc. How about a $20 Arduino-based device that's
very low  power (battery operated) that hooks up to any old VHF transceiver or
scanner tuned to the local repeater, that could monitor for CW pages to you,
general announcements, or ARES / RACES alert pages (and blink a big red light
and activate a buzzer) all using simple CW.

I also have some plans to write an RTTY decoder. That code will actually be
easier to implement than the CW decoder. The Arduino may have enough program
space to hold both programs at the same time. 

73; Steve, N3SB

Quoting Pat Kilroy <pat at patkilroy.com>:

> Hey Steve,
> 
> This is great stuff, THANK YOU!  
> 
> Your program is the perfect companion to our 
> PICetSat II telemetry output!  (Oh yes, I 
> have an updated schematic diagram to share 
> with you and others, as you asked last month.)  
> 
> I will put one of my students on reproducing 
> your program, starting before this month is 
> out to poke, prod & play with it.  No doubt 
> we will have questions -- and offer some 
> "requests" too!  
> 
> The first couple things I noticed are (1) 
> your filtering frequency and (2) your 
> output printing.  
> 
> (1) Our output cw note is at 700 Hz.  We can 
> change it to 1000 Hz, of course, but maybe 
> we'll first try all as is, keeping an eye 
> how much the difference of 300 Hz may be.  
> Do you have a circuit diagram?  Or is that 
> pretty trivial?  
> 
> (2) I'm not sure if your coding is directing 
> the results to anything but the screen.  One 
> of the things we need for our telemetry is 
> an ASCII capture buffer.  We capture the TLM 
> in the decoded CW and then, with a separate 
> program, we parse the file.  We then decode 
> the parsed TLM in a spreadsheet.  
> 
> So, are you able to include one or more 
> capture buffers?  
> 
> Catch you later!  
> 
> Thanks again,
> 
> Pat
> N8PK
> 
> 
> > -----Original Message-----
> > From: mchug-request at mailman.qth.net 
> > Sent: Sunday, October 12, 2008 04:01 AM
> > To: mchug at mailman.qth.net
> > Subject: McHUG Digest, Vol 6, Issue 2
> > 
> [snip]
> > Today's Topics:
> > 
> >    1. CW Decoder for Arduino (n3sb at qis.net)
> > 
> > 
> > ----------------------------------------------------------------------
> > 
> > Message: 1
> > Date: Sat, 11 Oct 2008 20:56:05 -0400
> > From: n3sb at qis.net
> > Subject: [McHUG] CW Decoder for Arduino
> > To: mchug at mailman.qth.net
> > 
> > Hi Folks;
> > 
> > The code below is my very first attempt at decoding CW. It works, 
> > but needs refinement. It's attached below for anyone who wants 
> > to play with it.
> > 
> > 73; Steve, N3SB
> > 
> > -------------------------------------------------------------------
> > 
> > // Program morse1 written October 11, 2008 N3SB
> > //
> > // This program is the first attempt to receive CW on an Arduino
> (ATMega168
> > based)
> > // The program depends on a 1000 Hz interrupt routine, which is used to
> [snip]
> 
> 
> 
> 
> ______________________________________________________________
> McHUG mailing list
> Home: http://mailman.qth.net/mailman/listinfo/mchug
> Help: http://mailman.qth.net/mmmain.htm
> Post: mailto:McHUG at mailman.qth.net
> 





More information about the McHUG mailing list