30 July 2017
BUILD IT YOURSELF
What do most movie scenes of the stock market trading floor and most high-end
international hotels have in common? They both have world clocks that allow people
to see the time and date in remote locations of the world.
By Craig A. Lindley
World clocks are important to business as they allow companies and/or individuals to have an idea of the time of day and date where their
customers reside. There is nothing more embarrassing
than calling an international client in the middle of the
night because you figured the time difference incorrectly.
World clocks can even be important to families that have
members distributed across the US or the world so they
know when would be a good time to make contact.
In order for world clocks to be useful, they must be
accurate; they must show the time and date correctly for
each location; and they must take worldwide Daylight
Saving Time into account.
To assure the accuracy of this world clock design, I
have opted to use the Network Time Protocol (or NTP) as
the provider of time information. NTP can provide time
accurate to within a second to devices over the Internet,
which is good enough for our application here.
Basing a digital clock design on NTP requires access
to the Internet which can be expensive to implement, but
allows for a very simple clock design for a couple of
First, no battery backup circuitry is required to
maintain the time setting. If clock power is lost, the
connection to the Internet will automatically be reestablished once power is restored, and the clock will
automatically set itself to the correct time.
Second, no controls for manually setting the time and
date are typically necessary because the
time and date are set automatically.
The ESP8266 family of devices makes
inexpensive access to the Internet possible,
so it is a natural to use in digital and world
clock applications. Readers of Nuts & Volts
may remember my previous articles using
these amazing devices:
1. “Meet the ESP8266: A Tiny, Wi-Fi
Enabled, Arduino Compatible Microcontroller” in the
October 2015 issue.
2. “Thinking of You” article in the November 2015 issue.
3. “ESP8266 NTP Clock” article in the June 2016 issue.
4. “ESP8266 Weather Clock” article in the November
5. “ESP8266 RSS News Reader” article in the January
The hardware used in articles 3, 4, and 5 is exactly the
same, so there is just one hardware setup (be it a
breadboard or a printed circuit board [PCB]). With
different software, you can have an NTP clock, an NTP
clock and weather station combination, or an RSS news
Now, with this article, the exact same hardware can
function as a world clock as well.
The world clock design presented here has some
rather interesting attributes, including:
• It uses NTP, so it sets itself automatically whenever
it is powered up. There is no need for switches or buttons
for setting the time or date. In fact, there are no switches
or buttons at all in this design.
• It uses a time zone library that automatically deals
with Daylight Saving Time (DST) worldwide, so there is no
need to reset the clock when the time changes or to click
a button to enter/exit DST.
Build an ESP8266
Hardware Parts List
NodeMCU LUA Amica R2 Module Electrodragon.com
1.8” TFT SPI LCD Display
Adafruit.com - Product ID: 358 or
SainSmart.com 1.8 ST7735R TFT LCD
Module with MicroSDSKU:20-011-920
USB Cable - USB A to USB Micro B RadioShack or similar
USB Power Supply Capable of at
least 1A 5V RadioShack or similar