Amateur Radio
 
Home Page
Menu

AMTOR
Portable Operating
Batteries
G4AON Universal Receiver
G4AON Companion Transmitter
G4AON SSB TX
Audio CW Filter using SMD parts
Simple vertical antennas
6m quad antennas
6m J-Pole antenna
Simple spectrum analyser
Radio Mods
PA0RDT Active Antenna
GPSDO
WiFi Remote antenna Switch
Making LED clocks
Making QRO L-Match boxes

 

Simple to make LED clocks

Introduction
It is surprisingly easy to make accurate clocks based on either a GPS signal, or using network time via a WiFi connection. The above image shows a WiFi connected clock that only needs 6 wires, or 4 if you omit the LED "sync fail" LED (the red LED on the right). You can pick any time zone, including UTC.

These projects are not my own design. The software has been tweaked by me with assistance from Claude AI.

Neither of these clocks are accurate to a few milliseconds, but they are good enough to be used as a shack, or room, clock and are well within one second. Note, the GPS clock will show a few seconds error for at least 15 minutes until the GPS unit has obtained sufficient data to correct the received time.

Both clocks automatically adjust for daylight saving time if set for your local time zone.

A GPS based clock is not too difficult to make either, the breadboard construction of one on test (image below) shows how few connections are needed.

Choice of clock type
The choice of whether to use a WiFi connection, or a GPS one, largely depends on how far from your router your clock is going to be located. The simple WiFi connected clock uses an ESP32 development board and these have a relatively poor WiFi range. Obviously the GPS one needs an antenna near a window.

Either type is easy to make and can be constructed on Veroboard. Power is via the USB connector on the processor board. Almost any 5V phone charger will power these clocks.

Programming the boards requires the Arduino IDE and STM32 Cube programs to be installed on your computer, both are free and the use of these programs is covered elsewhere on the internet.

None of the parts are difficult to source and the cost is minimal. The STM32F411 Black Pill board is available from the manufacturer (We Act Studio) on AliExpress. Some UK suppliers sell these Black Pill boards at a huge mark-up, buyer beware. The ESP32 boards are a similar price wherever you buy them.

LED displays
These clocks use a TM1637 display of the "clock" variety. The clock versions of these display type have a colon between the two sets of digits. If the display is too bright, which may be more of an issue with red LED types, add two 1N4001 diodes in series with the supply to the LED board. There are both 0.3 inch and 0.56 inch display types, the larger type is easier to read from a distance.

Building the WiFi clock
This is the easier of the two types, although neither are difficult. The original article covers the project very well. I have adjusted the code to add a time sync fail LED, the connections are from the LED anode to a 470 Ohm resistor and from the other end of the resistor to GPIO 33, and from the LED cathode to ground. The text suggests a 220 Ohm resistor which may be a little too bright. A short piece of black heatshrink over the LED will avoid it appearing to be lit if the sun shines on the case.

You will have to edit the code to suit your WiFi SSID and password, this can be done in the Arduino IDE program or using Notepad ++.

There is a link to the original article, and my revised code, at the end of this page. Note the original code did not include the LED.

Building the GPS version
I prefer this clock to the WiFi one, there is something nice about not relying on the internet to obtain the time.

The clock is based on a simple GPS disciplined oscillator (GPSDO) project that was posted on the EEV Blog and has quite a following. There is no need to worry about the complex code of a GPSDO as the clock will happily run without the ovened oscillator and the additional code items do not alter the LED clock display.

This clock has the advantage of being configurable via the USB port without needing to re-program it. You can set the time zone and view/configure the GPS module using the Arduino IDE program set to "serial monitor" via USB. The time display is not synchronised to the 1 pulse per second output of the GPS module, it simply reads and displays the incoming data with a correction for the difference between GPS time and UTC, followed by a further correction to your local time zone.

Almost any GPS module is suitable, the cheap Chinese copies of a Ublox 6M, 7N or 8N work well. The 8N type allows the use of both GPS and Galileo satellites that may be an advantage where your antenna does not have a good view of the sky. Do not waste money on a timing version, it has no advantage in this clock.

I have included a ready to load "hex" file for this GPS version. The instructions are also included for the Simple GPSDO, these include setting your time zone and making a temporary "through" connection to view/configure the GPS module. The "hex" file can be loaded into an STM32F411 Black Pill board using the STM32 Cube programmer. Note in order to program these boards, hold down the BOOT0 button while plugging the USB cable into your PC.

Links
Construction and programming page for the WiFi connected clock: https://lastminuteengineers.com/esp32-wifi-clock-with-tm1637-display/

My revised code for the WiFi clock, note you will have to add your WiFi SSID and password, the code includes UK local time, edit to your time zone.
../resources/NTP_Clock.zip

Circuit of the GPS clock: ../pdfs/GPS_LED_Clock.pdf

Hex file, ready to load into the GPS clock STM32F411 Black Pill processor: ../resources/LED_Clock_GPSDO_FreeRTOS_hex.zip

The command manual for the GPS clock, the time zone setting info is in part 7: ../pdfs/simple_gpsdo_manual.pdf

The thread on the EEV Blog covering the original GPSDO project:
https://www.eevblog.com/forum/projects/yet-another-diy-gpsdo-yes-another-one/

Protected by Copyscape Web Copyright Checker

 

Copyright © 2025 G4AON. All rights reserved.