Category Archives: Projects

morse-1 code

Cron Driven Morse Code Time Sounder

My goal was to make a new hourly chime,something with a bit of intelligence to it than just the same tone every hour. It was actually one of those random things that runs through your head when laying in bed trying to get in a mood to sleep.

A bit of history

Typically I have been using a preexisting system sound on a Linux PC to annunciate that it is the top of the hour. This helps to keep track of how long I am on the computer, time to take a break maybe. It also makes me away of the time, in case I am in the zone with coding or whatnot and need to be aware of how time flies. Once you have this, you kind of look for it, even when you are in the room doing something other than computer work.

Up to now this is what I typically had in my crontab…

00 09-23 * * * aplay /usr/share/sounds/fLight__2.0/stereo/Message.wav

I restrict the hours down, just so the thing doesn’t wake me at night if I forget to turn off the PC.


Years ago I used Festival, the text to speech program and made it annunciate the time. This works OK as long as you are at the PC. If you are away from it a bit, you don’t always pick up what the machine generated voice is saying. Morse Code has an advantage over voice, in that the tones are easy to pick up, even when faint. I have a ham license and have experienced this first hand. So that was my line of thinking with using Morse to give me the time at the top of the hour. It would be easy to not only know that it is the top of the hour but, I can tell what hour it is easily with Morse code. Plus it seemed like a fun twist. I have even thought of putting something like this on my Pi which runs 24/7 in my office. In our living room we have a bird clock, that has different bird sounds for each hour and that has been pretty useful at times, so that got me going on this whole hourly chime adventure years ago.

I was initially inclined to make my own tones but, a brief search found Stephen C. Phillips site and his Morse Code Translator. Using it I was able to create a more code “hour” sound file from 0-23, that plays the correct sounding for every hour.

It is possible to take any sound files and label them 0-23.wav and get other types of sounds to chime at the top of the hour. Birds songs, train whistles, nature sounds, the possibilities are endless.

How it works

Using the Morse Code Translator, I was able to create a series of Morse Code translations from 0-23, in WAV file format. The WAV files get put in a directory, morse-code-audio under my home folder and the following script gets called in place of the line shown above in my crontab….



# Grab the Hours off of the date.

hour=$(date +"%H")

#Call the correct file based off of the hour
 aplay $sounddir/$hour.wav

WAV Files for the Morse Code Time Sounder

I put the 0-23.wav files online, as a tar.gz.


Compression, Signal Processing, Information Theory and Cryptography

Uncompressed the 24 WAV files in the tar file are a total of 348K , it is interesting just how compressible single frequency tones are. All of them compress down to a 2.8K tar.gz. I had to check twice, I thought I was missing a bunch of files. But it stands to reason when one thinks of a single frequency turned on and off slowly, has very little bandwidth. Provided the keying is shaped in a way so that it is not a pure sine wave modulated by a square wave, the pulses have to be shaped the corners rounded off to get the bandwidth below 100Hz. Thinking of Fourier transform, a tone left on from infinity has a bandwidth of zero. A digital signal, pulse shaped, on and off keying at 20WPM code is going to have a real narrow bandwidth, therefore highly compressible. The opposite extreme, white noise, would not be compressed down at all by gzip or any of the fancier types of compression. White noise is random, equally distributed across the spectrum, hence incompressible. But it makes for a hell of an encryption key for that very reason. The worlds of signal processing and cryptography do come together in interesting ways!


Stephen C Phillips has an excellent website and blog that covers a lot of technical topics among with the Morse Code Translator is an example. He also covers Python code and the Raspberry Pi for example.

The featured image is from this site and it is an interesting read…

magnetic knife holder

Hard Drive Magnet Knife Holder

Recently I finished a small project to make a knife holder for the kitchen. It was made using one small block of wood, some screws and 8 magnets that came out of dead harddrives. The magnets were bought in Ithaca, New York from the Fingerlakes Re Use center ( 2255 N. Triphammer Road Ithaca,NY in the Triphammer Marketplace, phone 607-257-9699). Fingerlakes ReUse rebuilds and sells used computers ( much more other items as well ) and they sell harddrive magnets for 50 cents each (as of Sept. 2015 ). They have a pile of these magnets and it is worth picking through the pile to get some flat ones, looking for matching pairs and ones that will take a #6 screw for a project like this.

Harddrive Magnet Knife Holder
Harddrive Magnet Knife Holder

For the knife holder, I used a piece of oak flooring 3/4 inch thick, 10 inches long. It is best to use a piece of thick wood, because when you pull the knife off, there is a tendency to pull from the bottom handle out, which tips the knife towards the cabinet as the bottom magnet releases first. If the wood was thin the knife point would tip against the cabinet.

I cut the tongue and groove off the board ( trims it to 2-1/2 inches wide ) and then sanded it a bit on a belt sander to make the edges a bit rounded. Then using a drill press, I drilled out the holes to take #6 screws, 16 for the magnets (#6-5/8 machine screws), 2 (#6 – 1-1/2 wood screws ) with countersinks for the mount points. The whole process took about 20 minutes. For finishing I used a bit of linseed oil on it and then left it in the trunk of the car so a week while it was sunny and hot allowing the finish to be “baked” good and dry.

magnetic knife holder drilled
Magnetic Knife Holder Drilled

Strong Magnets

The magnets are rare earth magnets and are very strong. Therefore the piece of wood has to be screwed in good or it will probably pull off the cabinet when used. One caution with these magnets is that they will pinch your finger if you get it between them and another magnet or anything else ferrous. When I was cutting the wood I put one of the magnets down on the table saw. The steel on the table saw is so massive that the magnet was hard to get off, I had to use a screwdriver to pry the corner up, I could not lift it with my fingers!

Knife Holder Mounted To Cabinet
Knife Holder Mounted To Cabinet