DJ1YFK's random Ham Radio stuff

All kinds of things too precious not to share... constantly under destruction.
Last modified: Wednesday, 28-Jul-2010 19:07:18 CEST


fkurz.net -> Ham Radio -> Stuff


Contents


Experimental JavaScript Morse Decoder

As a complement to the many practice modes for receiving Morse code at Learn CW Online, I have been investigating ways to implement some kind of sending practice in the browser.

Taking CW input from the mouse key works very well with millisecond resolution (certainly less in reality, but accurate enough), so writing a little decoder for straight key CW only took half an hour including all testing. But I failed to produce a reliable sidetone: Triggering an HTML5 audio-element that plays a OGG file with an infinite sine tone by the play() and pause() methods was the closest I got, but it was too sluggish for anything above 5wpm.

For what it's worth, feel free to play with it, sans side tone:

Speed: 8WpM

Added: 14-Jul-2010. Last modified: 14-Jul-2010.


Idea: Morse Code Alarm Clock

I've always been a night owl and never managed to get out of bed easily in the morning. That is, until I started using my Morse Code Alarm Clock!

Instead of listening to the usual beep beep, I added a line to my crontab, which starts my 'wakeup'-script. What does it do?

  1. wget the latest weather information from Weather Underground via their XML API
  2. Send current weather (temperature, clouds, wind, ...) in CW
  3. Invoke cwbiff which fetches all new mail headers from my mailbox and sends them in CW

Depending on the amount of mail that arrived while I was sleeping, the whole thing takes between one and five minutes. And usually one of the mails is a good enough reason to get up!

It is running on my beloved little Dell Inspiron Mini 12 netbook, which I keep running overnight. It doesn't have any fans and the harddisk goes to sleep, so it's completely silent.

Added: 14-Jul-2010. Last modified: 28-Jul-2010.


Code snippet: Generating SSTV Martin 1 signals

A small C implementation (should compile on all platforms, but tested on Linux only) for Martin 1 SSTV. Converts a JPEG input file (using jpeglib) to a WAV output file (using libsndfile).

Originally written for transmitting live images from a high-altitude balloon, that carries a small embedded Linux computer. It could probably be optimized a bit for speed and timing accuracy, but already produces pictures with a usable quality (example: input, output). On the author's 1.8GHz machine generating a WAV file from a JPEG image takes about 2 seconds.

Update 11/08: Some actual pictures generated with it here and here.

sstvtx.c C source code - Licensed under the MIT License - SVN access

Added: 29-Jul-2008. Last modified: 23-Nov-2008.


PHP code snippet: Distance and bearing calculation for Maidenhead QTH locators

Demo:

From:
To:

Download PHP source code

Added: 09-May-2008. Last modified: 09-May-2008.


Morse code palindromes

Several Palindromes, which entirely consist of symmetric CW signs are obviously also palindromes in Morse code. But there are also some words which are not palindromes in letters, but only in Morse code.

A small Perl script cwpalindrom.pl was written to find some of those, using several word lists found on the internet.

LanguageMorse Palindromes
Englishan, Bev, feel, waiting, sees, Wang, pop, footstool, gnaw, outdo, sexes, USD
Germanan, Weg, du, stets, weg, tot, Ehe, Otto, Na, Pop, ewige, Reittier
Frenchdu, ses, été, sans, n'a, an, tant, fil, pop
Dutchtot, na, weg, du, Kok, fel, keek, pop, an, ere, kook, lof
CallsAN5AN, DF0LU, DL5FU, G5W, OH5HO, OM5MO, S55S

Added: 11-Apr-2008. Last modified: 04-Jun-2008.


A small PHP script to generate morse encoded barcodes

Text:
Dot width:
Height:

Written in PHP and using the GD library. Output as GIF image (can easily be changed to PNG, JPEG etc). To use this on your own website, just download bcw.zip and follow the instructions of the readme file.

Added: 19-Mar-2008. Last modified: 19-Mar-2008.


Narrow CW filters, do they help?

Some examples (and a small program to generate such files) of different CW filter widths applied to the same received signal, at different signal levels.

FileDescriptionSNR/dB (for each bandwidth)
sweep009.wav Very weak signal (constant), bandwidth changing 100 -> 500 -> 1000 ->2100Hz1.8, -0.4, -3.4, -6.4
sweep011.wav Weak signal (constant), bandwidths as above 3.7, 1.3, -1.6, -4.8
sweep020.wav Moderate signal (constant), bandwidths as above 8.8, 6.5, 3.5, 0.36
sweep060.wav Loud signal (constant), bandwidths as above 18.3, 16, 13, 9.8
400-800-400.wav Weak signal, 2.1kHz bandwidth, pitch changing between 400 and 800Hz.

noise.tar.gz - C source code (12. February: Added SNR calculation)

Psychoacoustics suggest that at lower frequencies you can hear weak signals better.
Why is that? The ear works like a filter bank, of 24 frequency bands. At low frequencies, those bands are of equal width and about 100Hz wide each. With increasing frequency, their width increases. (See e.g. Bark scale)

If you now hear a weak signal within wideband noise (no other signals present), what your ear/brain signal processor actually has to figure out is only the signal vs. noise in the particular frequency band. All other frequencies are pretty much irrelevant.

Now it seems logical, that it's easier to discern a signal at the same strength in a frequency band that is only 100Hz wide than in a wider frequency band.

That also explains, why it hardly matters whether you listen to a weak signal in a 100Hz filter or a 2kHz wide filter (with, mathematically, very different SNRs, as can be seen in the table). Your ear/brain does all the work. The filter bandwidth only matters in the presence of other signals, QRM etc.

Another point worth considering is, if you are listening to a desired signal, plus a jammer signal 100Hz above. At 800Hz, this means the signals are 12.5% separated, at 600Hz it is already 16.6%, etc.

There are many benefits from chosing a low BFO frequency, few benefits from spending a lot of money for super narrow filters. Note that (real) narrow filters also have a higher insertion loss than wide filters.

Added: 06-Feb-2008. Last modified: 12-Feb-2008.


Morse My IP

Morse My IP. Plays your IP address in morse code (embedded wave file). Useless and ridiculous.

Added: 29-Jan-2008. Last modified: 29-Jan-2008.


A Beverage antenna switch with pushbuttons

Unlike most antenna switches which use a rotary switch to select the antenna, this version uses push buttons to quickly select a receive antenna. The circuit is very simple and only uses two logic ICs (instead of a microcontroller) plus a few transistors to drive the relays.

While designed with Beverage antenna switching in mind, it may be used as a basis for any kind of antenna switchboxes. The circuit can easily be extended for a any required number of switches.

Added: 29-Jan-2008. Last modified: 29-Jan-2008.


How does CW head copy at high speeds work?

There are some myths and some facts about copying high speed morse code. One is that you are hearing complete words as single units. That's neither right, nor wrong. I tried to explain how it works for me in this usenet posting a while ago.

You may also find interesting what Tommy, W4BQF has to say about this subject.

Added: 28-Jan-2008. Last modified: 28-Jan-2008.


db.pl - A small Perl script to do some power calculations

Being tired of typing the same stuff into my calculator again and again, I wrote a small script in Perl to save some work. From the source:

# Input formats:
# 
# 1)      x POWERUNIT (+/- y RATIOUNIT) (in POWERUNIT)
#        e.g.  db.pl 5W + 10dB in dBm
#              db.pl 100W + 6dB [in W]
#              db.pl 100W - 1SU
#              db.pl 100W in dBm
# 2)      x POWERUNIT to y POWERUNIT, output: dB and S-Units
#        e.g.  db.pl 100W to 200W 
#              db.pl 200W to 5W 
#
# POWERUNITs:  [pnumkMG]W, dBm, dBW, S (defined as S9 = -73dBm, 6dB per unit)
# RATIOUNITs:  dB, SU (S-Units, 6dB each) 

download db.pl (2008-Jan-19)

Added: 23-Jan-2008. Last modified: 23-Jan-2008.


Stereo CW - Dots on one, Dashes on the other ear. Does it work?

A few example MP3s created following a discussion on the AGCW mailing list, whether reception of CW can be improved by splitting dots and dashes between the right and left ear. Listen for yourself, at different speeds:

Conclusion: Confusion!

But there is more to it. While this may not work well for aural copy, you may want to check out what DF9IV, M0ERA and DK6TM are working on: Morse code reception via vibrotactile stimulation.

A modified version of my program ebook2cw which produces stereo output can be obtained here (source code. compiled versions on request.)

Added: 23-Jan-2008. Last modified: 13-Mar-2008.


Using GNUplot for some quick contest statistics

Frequency tracking from an Cabrillo file

From my CQWW CW 2007 log. Easy to see when I was CQing and S&Ping. The low number of sweeps over the band also explains the low number of multipliers...

10m 15m 20m 40m 80m 160m

Also a graph over all bands was made. The Gnuplot script is here.

CQWW Zones vs. Time

Also created from a Cabrillo-File with very little effort, a map of CQ-zones vs. time

WPX-Contest: Sent serial number vs. received serial number

Always good to be on top :-). Saturday, Sunday.

Added: 23-Jan-2008. Last modified: 23-Jan-2008.


QSL return rate statistics

Sorted by country. Note that many countries with a relatively low number of contacts or QSLs are statistically not relavant and may have extreme values which are not representative.

Bureau

Last updated: December 2008. Bureau QSL return rates

LOTW

Updated: October 2009. LOTW confirmation rate.

Added: 23-Jan-2008. Last modified: 28-Oct-2009.


A QSL card backside made in LaTeX

To be modified as needed. qsl.tex, Example PDF (DARC logo).           What is LaTeX?

Added: 23-Jan-2008. Last modified: 29-Jan-2008.


fkurz.net -> Ham Radio -> Stuff