Saturday, September 22, 2018

Automated XLog backup

Back in the days when I worked for a living, one of the computer guys at the plant corrected me while I was talking about disc drives in our computers - I was saying "if it fails..."  He corrected me with "Not if it fails.  When..."

Though no longer required, lots of old-school Radio Amateurs keep a log.  Some use pencil and paper, but most do it digitally (and some, like me, do both).  Belt and suspenders.






With that in mind, I have written a Linux script that will help me avoid manual re-creation of my digital Amateur Radio log from the pencil and paper copy - which dates back to 1970 - when the computer finally fails.  I use XLog, but this should work for other Linux logging programs.

You will need some basic familiarity with Linux scripting and permissions, have crontab up and running and Dropbox installed.

The general scheme is to copy the XLog log file to a safe place at least once a day.  When my computer dies (and they all will), I could re-install XLog on a replacement and retrieve the latest of my daily log file copies kept remotely by Dropbox.

The scheme has three parts:
     (1)  Linux 'crontab'
     (2)  Dropbox
     (3)  The 'xlog_backup.cmd' script


'crontab'

Linux has a very handy program that allows users to schedule events at intervals.  I will not do a tutorial on cron or crontab, but will just show you the appropriate crontab file entry, below:

#       min     hour    day     month   day of  command
#                                       week            
#    
30 * * * *                        /home/MYHOME/bin/xlog_backup.cmd


Crontab reads this file and is directed to run the command xlog_backup.cmd (in the directory given) on the half-hour of every hour of every day of every month on every day of the week.  For you old timers, that's every time Mickey's long arm points down.


Dropbox

Dropbox is a commercial file sharing and storage program.  There is a fee if you want to store lots of data, but since XLog files are relatively tiny, we can just use the free ('Basic') version.  Check out:

          https://www.dropbox.com

You will have to create an account.  The script below could possibly work with another file-sharing program that works in a similar fashion.  Your decision.  I have no commercial interest in Dropbox, but it is quite handy for things other than saving Amateur Radio log files.

One you have Dropbox running and understand how it works, make a subdirectory, perhaps named "XLog", to match the script location below.


'xlog_backup.cmd'

Here is the backup script.  You will have to edit the various lines that are unique to your application - one example is the name of XLog's log file.   XLog typically keeps this file in the hidden directory '.xlog'.  Mine is named wb5bkl.xlog.

Make a copy of the script below and edit it:

#!/bin/bash
#  /home/MYHOME/bin/xlog_backup.cmd
#  Rev 002  07-05-2018  remove all but last 10 files   
#  Rev 001  12-13-2017  turn off report that file exists
#  Rev 000  12-12-2017  initial coding
#
#     check to see if a dropbox backup exists for today

##< edit the path to the Dropbox Xlog directory and your log name >##
if [ -e /home/MYHOME/Dropbox/XLog/LOGNAME.xlog.`date +%j` ]
then
#echo -e "\n wb5bkl.xlog.`date +%j` exists - quitting xlog_backup.cmd."
exit
fi 
#
#      Get rid of all but the 10 most recent log backups

##< again edit the path and file name and how many to keep >##
rm -f  $(ls -1t /home/MYHOME/Dropbox/XLog/MYLOG.xlog* | tail -n +11)
#
#
#      Copy current MYLOG.xlog file to Dropbox

##< edit both paths and file names >##
cp /home/MYHOME/.xlog/MYLOG.xlog /home/MYHOME/Dropbox/XLog/MYLOG.xlog.`date +%j`
#
#


Save the edited copy in your 'bin' directory (or wherever - but match your crontab entry) and make it executable.  The script only makes one copy per day - safe enough for me - but you can modify the if/then routine above and the crontab entry to suit your needs.

The backup file will have the name MYLOG.xlog.Julian_date, for example:  wb5bkl.xlog.147

I hope this works for you - and keeps your log(s) nice and safe.

cln - Nick
WB5BKL
Lake Buchanan

Tuesday, May 29, 2018

Fiberglass center support - 40M extended double Zepp

I do not recommend anything to anyone anymore.

Having said that, I am personally pleased with the fiberglass tubing products from Max-Gain Systems.

I wanted to replace the relatively short fiberglass over galvanized steel center support for my 40M extended double Zepp (edZ).  I had two goals:  make it higher and make it non-conductive - simplifying the routing of the ladder-line feed.  

The telescoping fiberglass mast from Max-Gain is very nicely made.  The clamps are well thought-out and the instructions are clear.  The problems I had were entirely my own.

The clamps are entirely non-conductive and have a clever over-center lever to hold the tubing in place.  My problem was similar to the old British motorcycle joke about fasteners in aluminum castings:

Stages of bolt tightening for the novice mechanic:
                                               Loose
                                               Snug
                                               Tight
                                               Very Tight
                                               Loose


I snapped one of the clamping bolts during extension of the third fiberglass tube - it had been tightened to the 5th stage above.  After that, I was much more cautious.


Within a month I discovered I was too cautious.  With the constant flexing in the wind, two of the sections had partially collapsed - you can see one just above the roof level in the image to the right.  The looped ladderline is a dead giveaway.  

My QTH is in an area with almost constant breezes (a good thing in the Texas hill country).  The mast has one clamping support (at the roof apex) and is guyed only by the 40M edZ itself.

This means the mast is free to move in the wind.  In strong winds (say around 45 mph), I have seen the top of the previous fiberglass mast bent to almost 45 degrees.  We have had wind gusts of over 65 mph during storms with no permanent damage - it waves around like a fishing rod.   But all this movement did allow the telescoping mast to creep downward, especially in the lower sections which bear the weight of the sections above plus the downward component of the tightened edZ wires. 

[I know I am taking a chance here with minimum guying - but I am willing to bear that risk.  The previous fiberglass support was up for well over 12 years with no
apparent damage.]

I did not want to secure the sections with non-conductive pins. Sooner or later I would have to lower the mast and Max-Gain specifically warns against damaging the tubing finish as clearances are tight.  The same argument applies for any sort of clamp that would mar the tubing.


What I devised is shown to the left, just above the clamp mechanism.  It consists simply of three or four layers of electrical tape overlaid with a very tight tie-wrap (I have lots of tie-wraps, so I don't mind snapping one to get to stage 4, above).  Obviously I had noted that the tubing collapse halted when the electrical tape and tie-wrap holding the ladderline hit the clamp.  

Seems to work well.  I will post a follow-up report in a year or so.   





40M extended double Zepp details:

Orientation:                Roughly North-South
Center height:            about 46 feet
South end height:      about 25 feet (Live oak)
North end height:      about 30 feet (Pine)
Feed:                          450 Ohm ladder line


Best wishes to all.

cln - Nick
WB5BKL




Sunday, December 3, 2017

QCX - 30M Transceiver

Recently, I built a QRPLabs QCX, the 30M version.  I have stopped recommending anything to anyone, but I hope to build both the 40M and the 20M versions in the near future.  I have collected a few hints, in no particular order:

Hints:

*  There is a impressive video of a QCX build here by IZ7VHF.  Worth a look if you are considering the QCX.

*   The local big-box office supply store wanted more than the list price of the QCX to print a color manual - even just B/W was more than Hans charges for the kit plus shipping.  I put the manual on an old iPad and propped it up near my work area.  I only printed the inventory pages, the section concerned with winding of T1 and the Cheat Sheet near the end of the manual.  I had the Cheat Sheet laminated.

*   If you use something like an iPad or PC to display the manual, all the illustrations can be handily expanded.

*   I used a pair of binocular magnifying glasses.  Also very handy.

*   I would strongly advise a complete inventory of all parts (also see below).  I had one extra capacitor.

*   I would also strongly advise organizing - at an absolute minimum - the capacitors and resistors by value.  Muffin tins would be nice (and would only take moments to wash and slip back into the kitchen).  If you are fortunate enough to have a workplace that will remain undisturbed, at least draw circles for each value on a piece of cardboard and stick them in that.

*   All of my placement errors were with the resistors.  I strongly advise the hint above, and re-checking the color codes against each other and the inventory listings.  Use a VOM to resolve problems with color resolution.  Slight color (colour?) blindness runs in my family.

*   With my tired, old eyes, I found it hard to count the turns on T1.  I ended up taking a photo with my phone, transferring it to my PC and enlarging it on-screen.  I had one turn too many on the S3 winding.

*   When you cut the small connectors apart, I would strongly advise covering the connector and tool with a cloth.  My first cut ricocheted off the wall, then the bookcase then my chest.  Miraculously, I found it in the work area after an extensive search of the floor.  Of course, use eye protection.

*   Take Hans' suggestion and orient all the parts either the same way or at least in such a fashion that the values can be read later.  Remember that this project will be very crowded at the end.



*   The page breaks in the manual are occasionally unfortunate.  Be extra careful when the instructions and the illustration are on different pages.  As mentioned earlier, the illustrations in the Manual I downloaded to my iPad can be enlarged when clicked.

*   From my experience with SMT projects, I now have a large, cheap aluminum foil cookie sheet with a properly sized piece of white cotton cloth taped inside.  Very handy.  If you ground it, even better.




Finished:

First impressions - the receiver is HOT!  I am impressed.  The QCX seems to hear almost everything my K3 does.  




Power output was low - measured externally at about 1.4W.  

I spent some time reading the QRPLabs e-mail reflector and then followed Hans Summers' recommendations for mods to the QCX.


Mods:

Here is a listing of the modifications I made.

Before and after each change, I made a series of measurements.  First was a 5 second key-down followed by a 15 second rest, then repeated twice more.  Then a 30 second key-down, followed by a 1 minute rest , then repeated twice more.  I am reporting averages of these measurements.  Power was measured independently of the QCX with a 20W Elecraft 50 Ohm dummy load.  I also recorded the supply potential.

I did the mods in two stages, mostly because the changes to L1, L2 and L3 were a little tedious.

Mod #1        -   12.55V supply
    Before:      5s      1.55W
                30s      1.69W
    ** Removed 1 turn from L1, L2, and L3
    After:       5s      1.36W
                30s      1.38W
    ** Re-alignment
    After        5s      1.56W
                30s      1.52W 

Mods #2&3&4   -   12.38V supply
    Before       5s      1.4W
                30s      1.5W
    **Install 1N5819 Schottky diode
    After        5s      1.5W
                30s      1.6W
    **Install 10K resistor from Q5 drain to +12V
    After        5s      1.4W
                30s      1.6W
    **Replace MPS 2907 with MPS751
    After        5s      1.5W
                30s      1.6W


    **Re-alignment
    After        5s      2.0W
                30s      2.0W


The image below shows the diode and resistor addition to the bottom of the PCB.


I think (but do not know) that the removal of one turn from the low-pass filter did not do much.  I think the addition of the 10K Ohm resistor and the change to the MPS751 did a little good.

At this writing, I am satisfied enough that I will await more information from the designer before diving into the circuit board again.  

As it stands, 2W seems to do well on 30M given reasonable propagation.  The Reverse Beacon Network seems to hear me just fine.

More to come, I hope.


cln - Nick
WB5BKL

 

Friday, December 1, 2017

Ham Gadgets Ultra PicoKeyer

I have been using the AA0ZZ EZKeyer II for several years (see my earlier post).  It has worked well with my K1, which I typically use portable.  There are shortcomings, however:  No easy speed control and only 3 memories. 

I tried a keyer with 8 memories, but had so many problems with missing, broken or incorrect parts, odd i/o design and sporadic support that I gave up - sadder but wi$er.

 Then I found the Ham Gadgets Ultra PicoKeyer.
 

The price was right - and I could even chose a color!  Woo-hoo!  

The construction was pretty easy (and the manual is very good).  It was ready to go in under two hours (I work very slowly).

I hooked it up to the Elecraft K1, switched the K1 to 'straight key' mode and gave it a try...

Semi-gibberish.

After several tries and careful inspection - to no conclusion - I decided to give it a try with my K2.  Again semi-gibberish. 

More experiments and some searching of the Elecraft e-mail list archives suggested that the 'ring' connection was live. 

Note:  Elecraft requires a 1/8" three-conductor (stereo) plug for CW input to their K1 and K2 transceivers.  If used in straight key mode, nothing can be connected to the 'ring', just the tip and the shell.  Straight Key mode allows control by an external keyer.

I sacrificed a cable and opened the 'ring' wire.  Everything worked just fine!   How odd.

Then I decided to take a very close look at the PCB for potential shorts.  None found, but there was a PCB connection to the 'collar' pin on the output jack.  It was NOT on the schematic, but it's there:




Since it seemed to be the cause of the problem, I cut that trace.  Success! 

Everything worked normally for both the K1 and the K2. 

I did communicate my findings with Ham Gadgets, but I am not sure they fully understood the issue when the PicoKeyer was used with these Elecraft rigs. 

Hence, this entry.

I filled in the embossing on the front of the keyer.  Looks nice.





This is a neat little keyer.

cln - Nick
WB5BKL

Sunday, November 5, 2017

Debian Linux on an old Netbook


Briefly, an old Toshiba NB205 netbook made its way to me.

I was about to donate it to the local thrift store as it was missing a keytop and the Windows version installed had trouble with the WiFi hardware - but I decided to give Linux a go.






















I won't repeat that procedure here - check my older postings "Adventures with a 'Thin Client' – a HP t5740" and "Dual Booting Debian and Windows XP" for some hints on dual-booting Debian.

I was pleasantly surprised when the new OS was able to handle WiFi nicely.  Now the only blemish on this old machine was the missing key.

Sure enough, eBay had several dealers who had keys.  After some careful reading and research, I ordered a CTRL keytop from a dealer in Canada.

The keytop arrived in a few days along with some abbreviated instructions.  As I did not want to break anything, I looked for further information and - sure enough - there were a lot of YouTube videos on how to remove and replace keytops.

Success!
Now it's back in the stable of 'spares' and occasionally useful tools.  An old, but working, netbook (dual boot) with working WiFi for about $3.50.

cln - Nick
WB5BKL

Wednesday, August 9, 2017

The Hendricks DC30B Resurrection






Recently I found a partially completed Hendricks DC30B 30M transceiver kit on eBay. It is small - a bit larger than a pack of playing cards.  The transceiver is direct conversion, crystal-locked and CW only.  Below is the eBay posting image:

 
The partial kit was advertised as “incomplete, not working and/or for parts”. The image reveals some of the missing parts, Q1 (the final), a toroidal transformer, one capacitor, the case top, etc. For some reason the 78L05 voltage regulator had been removed and replaced but not soldered. I ordered about $5 worth of parts (including the suspect 78L05).

While waiting on the parts, I very carefully went over the construction and found one electrolytic installed backwards. Otherwise, I thought the build quality good.

I wonder why it was abandoned...





Once the missing parts arrived, I followed the extensive assembly instructions available on the web and – to my pleasant surprise, it fired right up. Here's the testing lash-up.



I found a fine resource in the Yahoo DC40Kits email group. I got good advice and welcome encouragement both on and off-list.

 
After testing, I completed the installation in the supplied clamshell chassis half. Unfortunately I could not locate the top – and have yet to find a suitable replacement.

Output was right at 1 Watt with a nice 12.6V supply. I called CQ a lot until I made my first QSO with NK8O in Kansas (image to the left). The antenna was a 30M sloper and Chas gave me a 579. I have since had better luck when 30M was in good shape, usually at night.  (Note:  The K3 was on - but not in use)


Some thoughts:

This was a lot of fun for the price of a couple of fancy coffees for the better half and me. My biggest mistake was to limit myself to the supplied case. I have since learned of several mods which I could have applied easily. My second mistake was to not mount a socket for the crystal. The supplied Xtal (10.120KHz) is nowhere near the usual QRP frequencies.  Personally, I consider the keyer IC WB5BKL-unfriendly.  I have also read of a few design deficiencies – which have not bothered me.

All in all, a fun project.

cln – Nick
WB5BKL

Sunday, August 6, 2017

Importing N1MM ADIF export files into XLog


I like the N1MM Contest Logger program for Amateur Radio contesting.

N1MM is quite amazing for free software and is very well maintained. It is aimed just at contesting and covers most of the major contests worldwide. It is easy to install and – though there is a steep learning curve – once set up, solid.

It supports exports to Cabrillo (.log) for contest log submissions and to the ADIF (.adi) format for import into other logging programs.

I prefer to use Linux on my computers. My 'Amateur Radio computer' is a dual-boot machine just so that I have access to the N1MM Contest Logger and an antenna modeling program – both available only on Windows. To the best of my knowledge there is no Linux equal for N1MM.

My everyday logging program is XLog – a Linux program. After each contest, I move the results into XLog. Unfortunately a direct import of the N1MM .adi file into XLog leaves a lot to be desired for me.

N1MM exports only the start time – to 6 places (hhmmss). I like both the QSO start and end times to be entered and 4 places (hhmm) is more common. I note that QSO start and end times in a contest are almost always identical.

N1MM exports the frequency to the nearest 0.1KHz. XLog's default is to the nearest Khz.

N1MM exports both a sent and a received signal report. In the weekly CWT contests I enjoy, neither report is exchanged but N1MM defaults to reports of 599 for both. I prefer that those false reports not be entered into XLog.

N1MM does export the contest exchange, but I like to include the name of the contest following the exchange in XLog.  XLog has a different name for this field.

Here is an example of one record from the N1MM exported .adi file. Note that this is all one line:

<CALL:4>K5OT <QSO_DATE:8>20170802 <TIME_ON:6>190518 <BAND:3>15M <STATION_CALLSIGN:6>WB5BKL <FREQ:8>21.03258 <CONTEST_ID:6>CW-Ops <FREQ_RX:8>21.03258 <MODE:2>CW <NAME:5>LARRY <RST_RCVD:3>599 <RST_SENT:3>599 <TX_PWR:1>5 <OPERATOR:6>WB5BKL <CQZ:1>4 <STX:1>2 <APP_N1MM_EXCHANGE1:3>127 <APP_N1MM_POINTS:1>1 <APP_N1MM_RADIO_NR:1>1 <APP_N1MM_CONTINENT:2>NA <APP_N1MM_RUN1RUN2:1>1 <APP_N1MM_RADIOINTERFACED:1>1 <APP_N1MM_ISORIGINAL:4>True <APP_N1MM_NETBIOSNAME:11>OPTIPLEX755 <APP_N1MM_ISRUNQSO:1>0 <EOR>

And here is what I would like the same line to look like for import into XLog:

<CALL:4>K5OT <QSO_DATE:8>20170802 <TIME_ON:4>190518 <TIME_OFF:4>190518 <BAND:3>15M <STATION_CALLSIGN:6>WB5BKL <FREQ:6>21.03258 <CONTEST_ID:6>CW-Ops <FREQ_RX:8>21.03258 <MODE:2>CW <NAME:5>LARRY <TX_PWR:1>5 <OPERATOR:6>WB5BKL <CQZ:1>4 <STX:1>2 <COMMENT:15>127 CWT-1900 <APP_N1MM_POINTS:1>1 <APP_N1MM_RADIO_NR:1>1 <APP_N1MM_CONTINENT:2>NA <APP_N1MM_RUN1RUN2:1>1 <APP_N1MM_RADIOINTERFACED:1>1 <APP_N1MM_ISORIGINAL:4>True <APP_N1MM_NETBIOSNAME:11>OPTIPLEX755 <APP_N1MM_ISRUNQSO:1>0 <EOR>

I have highlighted the areas that have been modified.

I did this with a little Bash script and the sed (Streaming EDitor) command. Below is the operational part of the sed command for one of the little contests I enjoy, the CWT at 1900Z each Wednesday:

# CWT1900.sed
#
#
s/\(<TIME_ON:6>\)\([0-9]*\)/<TIME_ON:4>\2 <TIME_OFF:4>\2/
#
s/<FREQ:8>/<FREQ:6>/
#
s/<FREQ:7>/<FREQ:5>/
#
s/ <RST_RCVD:3>599 <RST_SENT:3>599 / /
#
s/\(<APP_N1MM_EXCHANGE1\)\(:[0-9]*\)>\([A-Z0-9]*\)/<COMMENT:15>\3 CWT-1900/
#
#

This sed file makes the four changes I listed above. Now I can run the .adi output files from N1MM through my little bash script and import them into XLog with no editing needed!

If you would like copies of my bash script for the three CWT contests, with the accompanying sed files and some informal notes, email me at my QRZ.com address.


cln - Nick
WB5BKL