06 April 2009

MP3 WSPR

Stimulated by a post on the soldersmoke blog and a direct email from Bill N2CQR about simple transmitters for WSPR, I have done some real-world tests.

My idea of a simple WSPR transmitter does not include a computer to send WSPR itself, but rather use a pre-recorded sound and play it endlessy with a MP3 pen. (But record it at the highest WAVE rate your player can reproduce, ie 44100 Hz 16 bit.)

First of all, a WSPR transmission lasts 1 minute 50+ seconds and starts at the 00 second of each even minute (x:00:00, x:02:00, x:04:00, ...). I have observed this by simply listening to WSPR program in TX-only mode.

So I need a 2 minutes long file containing my WSPR message. Problem: does my mp3 player insert a gap between the end and the begin of a file played in loop?

To find out, I recorded a single tone of 5 seconds, put it in the player and played back to the computer for a few cycles. On the computer I recorded it and then used an audio editing program to analyse it. Of course the length of the test tone is non relevant to this test, just make it long enough to be able to see it on the screen. As a result, my player introduces about 660ms (0.6") between each file. Thus the total length of my WSPR pre-recorded message has to be 2 minutes minus 0.6 seconds long.


After a short session on the wave editor program, I loaded the file in my mp3 pen, wired it to the PC soundcard and fired up WSPR in RX mode. In order to take into account human errors and reaction times, I added 1" worth of silence before the WSPR message begins. So, watching the WSPR screen and the advancing clock, I press the Play button one second before the reception begins (hh:oddminute:59).
Sit back and relax (work). It takes few runs to determine how good you were in measuring the delay. After 10 runs, 20 minutes, my WSPR looked like this one on the left (first picture).
The interesting column is DT, that shows how much "off sync" the signal is with respect to the machine clock. A DT value of 1 means your WSPR signal is 1 second late. Mine started 0.9" late and decreased constantly of a 0.1 factor each 2 minutes.

This means my WAVE file + mp3 pen delay was 0.1" too short. For curiosity I left it running for few hours until it got to -2.3 (seconds) and WSPR stopped decoding. At this point probably my WSPR signal is starting too early and WSPR doesn't catch it anymore.
Back to the audio editing I added 100ms of delay and I am watching the result while typing. Now I get an increase of 0.1" every 3-4 runs (5.0, 5.0, 5.0; 5.1, 5.1, 5.1; ...), so now I'm a bit too fast. But wait, it also decreases... I might be there!

If not, with 2-3 more iterations I should be able to get a correctly timed file.

There's another way to achieve more accuracy: generate a looooong recording, such as 1 hour or so, by concatenating many 2'00.0" sections. Your mp3 player loop delay will then occur only once in a hour, allowing for a much longer unattended operation.

One more info: for these off-the-air tests and measurements you do not need a properly GPS/WWL-locked synced machine clock. So feel free to experiment!

Now I need a simple WSPR TX, but I might try this out on the air tonight. I have it ready with 27dBm, 0.5W, my FT-817 minimum setting. I'm getting excited.

No comments: