Sunday, February 15, 2009

How to capture output from a CW beacon with an Arduino?

So what the hell am I talking about? In them olden days CW, or as we know it, morse, was the primary means of radio communications. CW is still in active use today. Its common for HAM repeaters to use CW to identify their call sign. CW is also used for MEPT beacons. Its these beacons that I'm interested in listening out for. There are a couple of uses that beacons serve, firstly its a really useful thing to have a beacon on 24/7 to listen for so you can tell what the radio propagation is like. Another useful thing is many beacons are time based, so they transmit in regular intervals, ie every hour/half/quarter.

Now where does the Arduino fit into this? Ideally we need to monitor the incoming signals. We can do this with programs like glfer or baudline in Linux. In windows land there is Spectran and Argo. This requires the operator to sit and watch the waterfall screen scroll by and wait to see whats out there. Often what happens is that the operator will do a screen capture of the window with the waterfall to share what they saw. Often there will have to be a series of screen captures to get the entire message. I'm aiming to find a way to use the Arduino to monitor the audio from a Pixie2. Once an interesting signal is detected it either records the audio stream or attempts to decode it.

I'm sure there are useful SDRAM devices that you can store an audio stream to, not sure of the bandwidth, but expect that 10-44KHz audio wouldn't be that much of a challenge. Once you have the data then you manually need to view or listen to all the recorded streams and see of any of them are indeed useful. Perhaps its a little ambitious, but what I'd like to do is to decode the CW audio into text and record on the fly. Perhaps also logging to a serial port. We're talking about 25 words per minute, tops, for manually sent CW from a good operator. With QRSS we are talking about 0.3 baud, so much, much less. The hard part is actually processing the data and making clever descisions about what is real signal and what is noise.

If you've ever watched the waterfall scroll by, you'll see that there is a lot of noise out there. Much more than you'd expect. Every plasma TV, every AM radio station, every computer, etc adds to electrical and magnetic junk flying around. The power supply on my laptop is amazingly bad. So much so that I've added extra filtering so that I can use it near my Pixie2 to record the audio coming from it. Actually I don't use the PSU when recording any more, luckily the laptop has a 5 hour battery life. The laptop itself isn't too bad. I have added RF filtering on the audio input cable, which solved a bunch of things, but has reduced the sensitivity a bit. Its hard to measure.

Measuring seems to be the black art of HAM radio. Yes a DMM, a digital multi-meter will do a lot of things, but doesn't do everything. A while back I found a LCR meter, which has been really handy. L is inductance, C is capacitance, R is resistance. It does the job ok, but I'd like to compare it to another meter see see if its accurate.

Building radio gear is easy if you know all your components are right. I had a battle with measuring inductance before. Calculating coils it easy but you don't know if your theoretical model actually matches your hand wound inductor in the low pass filter. Is it really 2.2uF? Am I really getting RF above 4MHz filtered out? Is it actually 3MHz? I suppose thats where a spectrum analyser comes in. Good radio practice is all about measuring things. Things that measure things are not cheap as I've discovered.

My ongoing reading leads me down the path of buying some existing kits. Why? Other people measured things and made a kit with all the part supplied. You don't have to think too much about measuring the details, because the kit is supposed to work =) Not casting nasturtiums at all. However if I've any change to understand how all this stuff works, you need to cut the code yourself, wind the toroids yourself, put the transistors in backward the first time and mess with it and measure until you've got what you expected. I mean, who'd have thought that the 2N2222's that I baught from Dick Smith have a different pin out to the data sheet?!?!

Where was I going... oh yes, there is a point at which you don't want to have to build everything. There are nice kits out there and there are building blocks that you just want to slot in that just work. I am finding that I need to actually build some anyway as its the only way to learn about this stuff. Electronics isn't as easy as it first looks. Just like code, you have APIs, you have to muck around with the input/output matching, buffers and sometimes you need to add a few bypass capacitors, just because! I don't know why yet, but it makes a difference. One of these days I'm sure I'll understand RFC's too, people put them in funny places.

RF propagation is at a low right now. Sun spots are also at a low. Yes these are related. While propagation is bad, folks are playing with MEPT beacons that use QRSS, its a really slow form of CW. Why? Because when you slow down the data rate, you can decrease the bandwidth needed to send the signal. If you are narrowing the bandwidth you can use less power too. When receiving a QRSS signal, you only need to look at a very narrow chunk of RF spectrum. As little as 10Hz. Folks are using tiny amounts of power to get their signals around, as little as 100uW. 10mW will travel from the USA to Australia.

Stability becomes a problem when we are talking about a band 100Hz wide. You also need an oscillator that is very temperature insensitive. Which is where something simple like the Pixie2 comes in, it listens to a much wider chunk of RF spectrum. A peecee sound card has an input bandwidth around 44KHz. That is plenty wide enough to allow for a beacon and receiver to drift around. The main battle is find the signal in the first place.

As you make the radio hardware simpler, you may need to make the software a little more complex. A peecee has more then enough capacity to process this amount of information, but does an Arduino? I'm hoping that it does. To record a QRSS MEPT transmission and play back the message. Also I'd really like the Arduino to be independent from a peecee, so it can be remote.

The other option is a full SDR, software defined radio, but these are very expensive. Also a lot more flexible than a little direct conversion (DC) receiver like the Pixie2. The way the Australian dollar is compared to the US dollar theres no chance an SDR will land in my radio shack this year.

kim vk5fnet

2 comments:

sk2 said...

Really interesting posts - keep them coming!
I should aim to get my amateur radio licence in the next round...

Donte said...

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.


Joannah

http://transcendmemory.net