Audio processing for amateur radio voice communications…

October 28, 2009 | Amateur Radio | By: Mark VandeWettering

This is just a brief note to myself to archive, well, what amounts to a single command that processes an audio file, but to stand as a placeholder for an interesting topic that I know virtually nothing about. 🙂

Here’s the basic idea: Amateur radio SSB communications are limited to narrow bandwidths (around 2.7khz is considered fairly typical). Unlike in conventional recording where fidelity might be desired, what is desired in amateur communications is to maximize the ability for you to understand the voice. Therefore, it’s fairly common for rigs to employ some kind of speech processing circuitry to modify the incoming voice signal to maximize its legibility. Often this is some hardware inside your rig, but it’s not unheard of for this functionality to be provided via software, either running on an embedded processor in your transceiver, or even as an external process running on your computer.

I was interested in trying to sort out what kind of processing was needed. It seemed to me that there were several components.

  • Resample the audio down to a lower sample rate (say around 8khz)
  • Bandpass filter the audio. My voice is fairly deep, but the frequencies below about 300hz aren’t very important for legibility. Wasting energy by sending them is probably misguided. Similarly for frequencies above 2700Hz or so, not for legibility, but because we don’t want our signals to be wide.
  • We want to have some kind of a “noise gate”. Background noise should drop out entirely.
  • Companding. We want lots of power to be placed in all the places where the noise gate isn’t on.

To prototype this idea, I recorded some audio (on my iPhone, it was convenient):

CQ from K6HX at 44.1Khz, 16 bit stereo sound, no processing…

I then used the audio “swiss army knife”, sox to process this sound using the following command:

sox memo.wav -r 8000 -c 1 compand.wav \
  highpass 300 lowpass 2400 \
  compand 0.1,0.1 -60,-60,-40,-10,-20,-8,-10,-6,-6,-5,-3,-3 -6 \
  polyphase

The command is a bit cryptic, but here’s the explanation. It specifies the input as being memo.wav, and the output will be compand.wav, resampled to 8khz and only one channel. The rest of the command specifies some processing to be done. The highpass and lowpass commands are there to trim the audio spectrum (I couldn’t remember how to specify bandpass filters with sox, but this works), followed by a “compand” function, which specifies attacks and decays at 0.1 seconds, followed by a list of gains. Each pair specifies an input power in db and an output power. Hence, -60db signals get mapped to -60db, but -40db signals get boosted to -10, -20 to -8, and so on. The overall signal is reduced by six db to avoid clipping. The polyphase command specifies a reasonably high quality rate converter to be used to downsample to 8khz.

And, here’s the resulting voice file:

Same file, K6HX calling CQ, but at 8khz, bandpass filtered and companded

The overall quality seems quite good, the legibility seems high and reasonably free of annoying artifacts. The only problem I see is in the pronunciation of “KAY” in my callsign, we lose most of the explosive sound at the beginning, and it sounds a lot like “AY”. I probably can adjust the attack/delay a bit to help that. I’ll muck with it some more in the future Ultimately my idea would be to implement a simple speech processor like this as a portable stand alone project. Using portaudio it should be very straightforward.

Some interesting new (to me) radio techniques…

October 28, 2009 | Amateur Radio | By: Mark VandeWettering

The Knightsqrss mailing list still intrigues me, although my own qrss beacon has been off the air for a while (I’m trying to get around to homebrewing its replacement, but have been distracted by other facets of life for a while). Recently, Eddie G3ZJO offered this rather interesting circuit which I scratched my head about for a while:

wspr-organ-cct

This “WSPR-ORGAN” is an interesting idea. It uses a 74HC86 Quad Exclusive NOR gate in a clever way. Two of the gates are configured as oscillators/inverters fed by a pair of identical crystals, one running with a fixed capacitance, the other with some capacitance switched in via a control signal. The output of these two oscillators is fed in to a third XNOR gate which serves as a mixer, producing sum and differences of the two signals. Eddie is interested in the difference, which is small (in the audible range) and which has little drift, since the two oscillators will likely have identical drift characteristics which will cancel out when using the signal to get the difference signal. What we essentially have is a very precise voltage controlled oscillator which puts out a signal in the audio range. Pretty neat.

The resulting discussion on the Knights was similarly interesting, and lead me to a series of interesting web pages. I hadn’t seen the 74HC86 used in this application before, but a little quick Googling lead me to Ian, VK3KRI’s page on using the 74HC86 as a crystal synthesizer. A diversion into the world of “subharmonic” mixers yielded a link to this interesting receiver design for QRSS which uses a common 5.0688Mhz oscillator which is tricked to operate at twice the frequency to provide good reception around the QRSS watering hole at 10.140Mhz. This page also links to LA8AK’s page which explains some of the interesting mixer ideas. Too much for me to absorb before coffee, but all cool stuff.

Addendum: Checking the prices of Digikey reveals that 5.0688Mhz crystals are in fact a very common item, and can be had for about $.40 a piece. Frankly, the 10.140 Mhz crystals offered by Expanded Spectrum Systems aren’t exactly burdensome, but it’s interesting to see other designs which make use of even more common crystal frequencies.

Link to K7QO’s Lab Notebook

October 26, 2009 | Amateur Radio | By: Mark VandeWettering

I missed out on last night’s Echolink QRP confab (Sundays, at 6:00PM Pacific time) but I did notice that Henry had posted a summary of topics and links (thanks again Henry) and included a link to Chuck Adam’s lab notebook. I’m just about to dash off to work, but it looks like it has lots of awesome tips and techniques on how to assemble homebrew circuits, and is 162 pages long. A nifty resource, and thanks to the Echolink QRP conference for bringing it to my attention.

Chuck Adams, K7QO, Lab Notebook

The principles underlying radio communication

October 25, 2009 | Amateur Radio | By: Mark VandeWettering

Picture 2While digging around for some information on crystal radios on the Internet (since i seemed to have misplaced the book on the subject I was looking for) I encountered some references to a book which happened to have been digitized and made available on archive.org. This book was published by the National Bureau of Standards, and no less of a luminary than Thomas Edison wrote:

This is the greatest book on this subject that I have ever read, and I want to congratulate you and your Bureau on its production.

The principles underlying radio communication

Make an Instant-Charge Screwdriver | Popular Science

October 24, 2009 | Amateur Radio | By: Mark VandeWettering

Ben Tongue’s article on using a supercapacitor to hold energy harvested from an antenna tuned to strong local broadcast system got me thinking about supercapacitors again. Digging around uncovered a link to a DIY project (very simple) for creating your own electric screwdriver powered by supercaps. (I think they are a bit cavalier with the charging circuit, which basically just dumps the current from a USB port into the caps without any leveling or the like, but shrug….) One interesting thing that I found was that SparkFun apparently carries 10F (yes, 10 farad) 2.5 volt supercaps for around $5. Neat!

Make an Instant-Charge Screwdriver | Popular Science

Addendum: Here’s an even simpler project to power a flashing LED.

AA1TJ — “El Silbo”, a voice powered radio (complete with QSOs!)

October 23, 2009 | Amateur Radio | By: Mark VandeWettering

I subscribe to the very interesting QRP-L mailing list, and recently read an article by Michael Rainey, AA1TJ about an interesting radio and set of QSOs that he conducted. Michael’s experiments are amazing and cool, but I think his latest effort takes the cake: he had a number of QSOs using a transmitter powered entirely by the power of his own voice. He calls the project El Silbo and it is a transceiver which uses a loudspeaker as a generator that drives a very low power transmitter. I find it interesting because it is obvious that if you tried to yell, you might be heard over a distance of one or two kilometers, but Michael was able to use the same power to communicate over distances greater than a hundred kilometers. Very cool.

MJRainey – El Silbo

Zero Threshold MOSFETs…

October 23, 2009 | Amateur Radio | By: Mark VandeWettering

I don’t know why this percolated to the top of my consciousness today, but I thought I’d dump a link here so I can find it again. I recalled reading an article about the use of a particular special MOSFET device for use in crystal radios. It took me a tiny bit of time to find it, but here is a link to the Bob Cutler’s QST article A High Sensitivity Crystal Set. In conventional FET devices, the FET doesn’t conduct unless the gate voltage exceeds the threshold voltage. For a common power MOSFET like the IRF510, the threshold voltage might be 2 volts. For devices like the ALD110900A (datasheet here) the threshold is essentially zero. This makes a great variety of very lower power oscillators and amplifiers possible.

Cutler’s crystal set design is innovative because it doesn’t require an outdoor antenna or ground to function. It’s a zero power radio with enhanced performance provided by this MOSFET device. I’m not the only one who thinks so either: no less a radio luminary than Wes Hayward, W7ZOI found Cutler’s ideas thought provoking and interesting.

Addendum: G3XBM was looking at the same zero threshold devices. His page links to an application note for a 32 uw oscillator that can operate on a mere 0.5v supply voltage.

Addendum2: Ben Tongue has an interesting article on extracing energy received from a strong radio station to charge a supercapacitor, and then power a very low power amplifier that can be used to enhance the operation of his crystal set. It seems to rely on a micropower operational amplifier manufactured by Texas Instruments.

EtherGeist: Quick prototype printed circuit boards

October 22, 2009 | Amateur Radio | By: Mark VandeWettering

I was reviewing Stu’s articles on his “Ethergeist” blog again regarding his QRPp WSPR beacon, and was admiring his nice looking prototypes. I’ve goofed around with using tin snips to cut small pieces of copper clad and gluing them down to make solder pads, but Stu just uses a carbide tip scribing tool to cut straight lines into copper clad. The results look really nice, so I stopped and picked up a carbide tipped tool from Home Depot (about six bucks). Preliminary testing shows that it is necessary to use a straight edge and that it takes about ten passes to cut through the copper, but the resulting lines do look nice. I might use this on a future project.

Check out EtherGeist: Quick prototype printed circuit boards.

Using the 74HC240 in radio applications…

October 19, 2009 | General | By: Mark VandeWettering

There are a number of interesting radios based upon using things like hex inverters or octal drivers as both oscillator and amplifier. In digging around, I found the most common chip used in this application is the 74HC240. Here’s a link to a page which contains many interesting links:

Testes com 74HC240

Another link to a similar design which points at a QST article which you can access if you are a registered ARRL member.

Picture 1

DC40B, Day 4, and stupidity on my part…

October 19, 2009 | Amateur Radio | By: Mark VandeWettering

Well, over the weekend I completed the trial assembly of my DC40B. The voltages all measured out correct, but the oscillator seemed to not start reliably. It appears that the twin 47pf caps that provide crystal feedback may not be quite sufficient to reliably start the oscillator on power up. If I prod the base of Q5 with my oscilloscope probe, the oscillator starts right up. In discussions on the dc40kits yahoo! group, it appears that at least one other ham found that he had to add some capacitance to his dc40b kit, so I’ll give that a try.

In a fit of stupidity though, I went blindly forward, and promptly installed all the ICs. Like an idiot though, I wasn’t watching what I was doing. No, I didn’t install anything backwards, I installed the 8 pin op amp in place of the 8 pin AVR and vice versa. Guess what? The Atmel AVR gets pretty hot when you install it in the wrong place! IDIOT. Oh well. While no magic smoke was released, it appears that I have zorched the chip, so I’ve got an email into KI6DS to order some replacements (maybe I should get more than one…)

Anyway, that’s my update.

dc40b

No DC40B work tonight…

October 16, 2009 | Amateur Radio | By: Mark VandeWettering

Too tired, so instead I took the wife out for some Mexican food and a movie, and when I got back I relaxed a bit. I have the feeling in my tired state I would have just made mistakes. I did dust off my old Manhattan style constructed oscillator since AK6L was going down the path of building them, and I decided to hook it up to my $20 oscilloscope and see what it looked like. It’s currently got a 7.040 crystal in it, and I must admit: the waveform looks pretty nice (excuse the iPhone picture, I haven’t been able to find the SD card reader for my Canon, and I didn’t spend any time improving the lighting).

photo

Not bad at all.

DC40B Construction: Day 3

October 15, 2009 | Amateur Radio | By: Mark VandeWettering

Toroids. Today it was winding toroids. I really don’t mind winding ’em, it is stripping and tinning the leads that seems to be annoying. Nevertheless, I got the four toroids done (two simple, one bifilar transformer and one regular) and installed on the board. A simple continuity check between the pads indicates that all is well.

Should be really easy to finish the radio this weekend, just need to install the transistors, ics, a couple of electrolytic caps, and then power/speaker leads.

Midway DXpedition, courtesy of my HW-8

October 15, 2009 | Amateur Radio | By: Mark VandeWettering

Well, as I was heading off to bed, I was reminded that there is currently a DXpedition operating from Midway island using the callsign K4M. A quick google revealed that they were operating on 7.078 SSB, so before heading off to bed, I decided to power on my HW-8 (ever since I got it, the FT-817 has been side lined) and see if I could hear anything. And, voila, here is K4M responding to G0HNW (in England). I just grabbed a small snippet of audio, but it gives you some ideas as to what you can hear with a radio like the HW-8.

K4M answering G0HNW on 7.078 SSB, October 15, 2009 07:05 UTC

Addendum:

Same recording, but with noise reduction courtesy of Audacity

Addendum2: I was wondering what algorithm Audacity actually implemented for noise gating. It’s spectral noise gating. I had previously blogged that papers by James Moorer provided some details of similar algorithms, but it appears that my previous links to him had decayed, so there is a fresher one.

DC40B construction: Day 2

October 14, 2009 | Amateur Radio | By: Mark VandeWettering

Well, I found a replacement for the one resistor I screwed up, and started work on all the caps. They are all in and double checked (I only screwed up one capacitor, which I quickly desoldered, moved, and resoldered). I then got the trimmers in, and soldered in the 16 pin socket. I was gonna start on the toroids, but Mythbusters was on, so I thought I’d take a break. I’m guessing it will take a couple more sessions to get all the semiconductors in, do some minimal testing, and then apply power for real.

Stay tuned….

DC40B construction underway…

October 13, 2009 | Amateur Radio | By: Mark VandeWettering

DXxxB3Well, after playing around with my Heathkit HW-8, I was struck by a feeling of productivity and started working on my latest kit, a DC40B from Hendricks’ QRP Kits. It’s a very cute little rig, consisting of a 1 watt (ish) transmitter with a built in Atmel AVR keyer, and a direct conversion receiver. It’s crystal controlled, and this one will be built on the crystal frequency of 7.040 Mhz.

Tonight, I started soldering in all the resistors, the diodes, the one molded inductor, and the two eight pin sockets. I noted a couple of issues with the instructions. First, it says that R5 is a 2.2K ohm resistor, but that it’s code should be BROWN-BLACK-RED (which is actually the code for a 1K ohm resistor). I worked around the instructions, and figured that it probably should be a 2.2K resistor and that the listed color code was wrong. I’ll double check with the schematic when I have a chance. In the process though, I managed to goof and install one resistor in the wrong place. Hence, I need another 2.2k ohm, and I couldn’t find one in my junk box. Oh well, a trip to Radio Shack or Fry’s should make that happen if I can’t scrounge the right one together. It also says there should be a 16 pin socket (which reading the Yahoo! help group, nobody seems to get). I could solder it in place, or get a socket.

I did make two mistakes (I mixed a RED-RED-RED with a RED-RED-ORANGE, and mixed a resistor with a similarly marked molded inductor which was truly stupid), but some snips, soldering braid and the like, and I’m back on track.

I might try my hand at winding some of the toroids tonight, and tomorrow: all the caps will go in. Then, it should be a short walk to a working radio!

I’ll keep ya posted.