This live screen grab is from one of my HamClocks. It updates automatically every minute after making a random tap. Click for an hour history.

Ham Clock

This page refers to my QST article in the October 2017 issue. All updates will be posted here.

Click on the tabs below for more information.

I would like to give a Big Shoutout to Adafruit for their great electronics, software and tutorials.

News highlights. See the Download tab, below, for complete version history.

  • DX Spider spots are now an option in the center plot area. Tap to set DX.
    Note: You are logged into a cluster while this pane is visible.
  • Setting a new DX location now displays call sign prefix at that location
  • New stopwatch screen, tap the icon below the seconds to activate
  • New option to set DE Lat/Long automatically using IP geolocation service
  • New plot option to display VOACAP band predictions from DE to DX. See the Controls tab for details.
  • Now manufactured by Veritium Research and marketed by Gigaparts rebranded as HFClock.
  • Added desktop versions for linux (including Raspberry Pi) and macOS. See Desktop tab for details.

73, Elwood Downey, WBØOEW

Original QST Article proof

Corrections:

Download current stable release source code Version 2.29.

Revision history:

Version 2.29: Version 2.28: Version 2.27: Version 2.26: Version 2.25: Version 2.24: Version 2.23: Version 2.22: Version 2.21: Version 2.20: Version 2.19: Version 2.18: Version 2.17: Version 2.16: Version 2.15: Version 2.14: Version 2.13: Version 2.12: Version 2.11: Version 2.10: Version 2.09: Version 2.08: Version 2.07: Version 2.06: Version 2.05: Version 2.04: Version 2.03: Version 2.02: Version 2.01: Version 2.00: Version 1.94: Version 1.93: Version 1.92: Version 1.91: Version 1.90: Version 1.89: Version 1.88: Version 1.87: Version 1.86: Version 1.85: Version 1.84: Version 1.83: Version 1.82: Version 1.81: Version 1.80: Version 1.79: Version 1.78: Version 1.77: Version 1.76: Version 1.75: Version 1.74: Version 1.73: Version 1.72: Version 1.71: Version 1.70: Version 1.69: Version 1.68: Version 1.67: Version 1.66: Version 1.65: Version 1.64: Version 1.63: Version 1.62: Version 1.61: Version 1.60: Version 1.59: Version 1.58: Version 1.57: Version 1.56: Version 1.55: Version 1.54: Version 1.53: Version 1.52: Version 1.51: Version 1.50: Version 1.49: Version 1.48: Version 1.47: Version 1.46: Version 1.45: Version 1.44: Version 1.43: Version 1.42: Version 1.41: Version 1.40: Version 1.39: Version 1.38: Version 1.37: Version 1.36: Version 1.35: Version 1.34: Version 1.33: Version 1.32: Version 1.31: Version 1.30: Version 1.29: Version 1.28: Version 1.27: Version 1.26: Version 1.25: Version 1.24: Version 1.23: Version 1.22: Version 1.21: Version 1.20: Version 1.19: Version 1.18: Version 1.17: Version 1.16:

• How do I build the software?

  1. Install the latest Arduino IDE with these these instructions. I am currently using version 1.8.10.
  2. Load up the ESP extension described here then Exit the Arduino IDE.
  3. Download and install the following Arduino libraries: (If you need help with libraries in general try here )
  4. Connect your computer to the Huzzah with a USB port
  5. Download current stable release Version 2.29, unzip it any place you wish.
  6. Start the Arduino IDE. Open the ESPHamClock.ino file you just unzipped. This will create a new project.
  7. In the IDE Tools menu make the following selections:
    ide
    If the options you see do not look exactly like mine do these steps:
    1. open Tools → Board → Boards Manager...
    2. In the search box type esp. Look for esp8266
    3. Click More Info
    4. Click Select version and select 2.4.0 (not newer versions)
    5. Click Update
    6. Click Close
  8. Run Sketch → Compile then Sketch → Upload
  9. Your HamClock should start running. Follow the touch screen and setup functions carefully.

• How does the DX Cluster feature work?

  1. In the Setup page, set the internet host name and port for a DX Spider node. A good list is here. Be sure to choose a Spider node, AR clusters are not supported. If you leave the host name blank, then the entire cluster option will be disabled.
  2. Once the HamClock is up and running, tap the center plot pane until the DX Cluster appears. The name of the host will be shown in yellow, and it will turn green when a connection is established. If the connection fails, it will show an error in red.
  3. Once connected, just leave it run, new spots will be listed, scrolling when full. Tap on a spot to set DX to that location. Pretty neat!
  4. Please note: the cluster node is logged into using the call sign you use for HamClock. If you want to use the unassisted category in a contest, you should set the host to blank in the Setup menu to insure you don't accidently log into a cluster -- some contest judges will check!
  5. Spider nodes support a lot of options. HamClock makes no attempt to reproduce any of these. But you can set them by logging in with the same call sign from a different application or telnet session. Most nodes will carry the filter settings over to all login sessions, so this will effect the HamClock session as well. Here is just one example of a set of filters that will show only CW spots from operators in US or southern Canada:
        filter1 reject not by_zone 3,4,5
        filter2 reject not on hf/cw
        filter3 reject on hf/rtty
        filter4 reject on hf/ssb
        filter5 reject info ft8
                    

To use a 9" ER-TFTM090-2 from buydisplay.com:

Select these options during purchase:

This is the wiring list:

    EP = ESP Huzzah
    BM = BME280 sensor
    PC = photo cell
    DP = display

    EP_SCL    BM_SCK
    EP_SDA    BM_SDI
    EP_3V     BM_VIN
    EP_GND    BM_GND

    EP_ADC    PC_1, 330k
    EP_GND    PC_2
    EP_3V     330k

    EP_SCK    DP_8
    EP_MO     DP_7
    EP_MI     DP_6
    EP_2      DP_5
    EP_16     DP_11
    EP_USB    DP_3, 4, 37, 38
    EP_GND    DP_1, 2, 13, 31, 39, 40
	

Pros:

Cons:

The display stand from Adafruit can be made to work with a little ingenuity but is not perfect for the LCD. Send suggestions for better ideas and I will post here.

If you find your display idea works better if the cable exits from the top, there is an option in the Setup screen that allows you to flip the display upside down.

Shack photo showing 7" version.

Rear of 7" version

Both the 7" and 9" versions.

Rear of 9" version

This is a guide to the touch controls and map symbols of HamClock. Click for a printable view in a separate window.

• HamClock may now be built for linux, Raspberry Pi, macOS, FreeBSD or any other UNIX-like system with the X11 Windows development library. Or, on the Raspberry Pi, HamClock may be configured to take over the entire HDMI display as a dedicated application using /dev/fb0. Use this version when you want to connect to your Pi using ssh and not use the linux desktop.

HamClock may be built in the following sizes:

Operation of the HamClock on these platforms is exactly the same as the ESP8266 version with the following exceptions:

• To give it a try on your desktop, follow these steps:

  1. open a terminal on the target system desktop to get a command line prompt
  2. run these commands:
    curl -o ESPHamClock.zip http://www.clearskyinstitute.com/ham/HamClock/ESPHamClock.zip
    unzip ESPHamClock.zip
    cd ESPHamClock
    make -j 4 hamclock
    ./hamclock
    
  3. This example command will build HamClock at 800x480 pixels for X11. Type make help for a complete list of other sizes and desktop environments.
  4. On macOS, you can turn the bare executable into a clickable App and test it as follows:
    mkdir -p HamClock.app/Contents/MacOS
    cp hamclock HamClock.app/Contents/MacOS
    open HamClock.app
    
  5. If you get errors:
    • on linux try updating and loading more packages such as
      sudo apt-get update
      sudo apt-get -y install make g++ libx11-dev
      
    • on macOS try installing XQuartz and Xcode. Then run
      xcode-select --install
      

• To try it on a Pi using a dedicated fb0 HDMI display, follow these steps:

  1. log in via ssh (or putty, etc)
  2. run sudo raspi-config one time and set the following options:
    1. Boot Options -> Desktop/CLI -> Console
    2. Network options -> Network Interface names -> enable predictable names? No
    3. Advanced options -> Resolution -> choose any 1600x960 or larger
  3. reboot
  4. connect to your Pi again with ssh and run HamClock on the HDMI fb0 display as follows:
    curl -o ESPHamClock.zip http://www.clearskyinstitute.com/ham/HamClock/ESPHamClock.zip
    unzip ESPHamClock.zip
    cd ESPHamClock
    make -j 3 hamclock-fb0
    sudo ./hamclock-fb0
    
  5. This example command will build HamClock at 1600x960 pixels for RPi fb0 HDMI. If you want the smaller size 800x480, perfect for 7" touch panels, use hamclock-fb0-small. Type make help for a complete list of other sizes and display environments.
  6. If you see a little blinking line near the left edge, try running this command:
    sudo bash -c "echo 0 > /sys/class/graphics/fbcon/cursor_blink"
    
  7. Note that both versions emulate the ESP non-volatile EEPROM with the file ~/.rpihamclock_eeprom. Removing this file will reset the HamClock back to all default values.

• If you want to use the Bosch BME280 environment sensor on RPi, follow these steps:

  1. connect the sensor to the Pi using the 40 pin connector as follows:
        Pi 1    BME Vin
        Pi 3    BME SDI
        Pi 5    BME SCK
        Pi 9    BME GND
    
  2. install i2c-tools:
        sudo apt-get install i2c-tools
    
  3. run sudo raspi-config and set the following options:
        Interface Options: I2C: enabled
    
  4. Check the Bosch is connected correctly with these tests:
        sudo i2cdetect -y 1
    
    you should see 77 in lower right corner of matrix; then
        sudo i2cdump -y 1 0x77 b
    
    you should see a matrix of numbers, NOT XX
  5. Restart hamclock by tapping and holding the padlock for 3 seconds.
  6. After HamClock is running again, click in the lower half of SDO image pane to see environmental plots.

• To start hamclock-fb0 automatically when the system boots, use crontab. For example:

  1. Start crontab with the edit option:
    crontab -e
    
  2. Add this one line:
    @reboot cd ESPHamClock; sudo ./hamclock-fb0 > hamclock-fb0.log 2>&1
    
  3. Save and exit the editor. Test by rebooting. This example assumes ESPHamClock is in your home directory
    and you want to run hamclock-fb0 therein. Adjust if necessary to match your configuration.
  4. To learn more about crontab type:
    man 5 crontab