• It currently has a round
robin display of time and date
for Sydney, Frankfurt, London,
New York, Houston, Denver,
Phoenix, and Los Angeles, and
you can change these for other
locations if you want to modify
the code provided.
• The clock can run in 12
or 24 hour formats.
• It runs a finite state
machine that will recover
automatically if network
connectivity is lost and then
regained, and it will recover
from power outages
automatically as well.
• The design consists of
two components only: a NodeMCU Amica ESP8266
module and a 1.8” LCD display. One cannot build many
circuits simpler than this.
• This world clock can be built for as little as $22.
As soon as you power-up this design, it accesses NTP
time wirelessly via the Internet, and then calculates and
displays the time and date in the cities mentioned above.
There is nothing to set or configure, and it will continue to
display the time and date until it is powered down. You
might call this a no fuss world clock because there is
nothing users have to do.
When DST arrives in one or more of the target
cities/time zones, it will automatically be taken into
consideration. It even knows how to deal with places like
Arizona which don’t use DST.
The world clock presented here is an adaption of the
world clock example program included with the Timezone
library which will be described later. My contribution is
the use of NTP as the source of the time data; the state
machines that allow the clock to recover from Wi-Fi,
Internet, or power disruptions; and the formatting and
display of the time and date information on the LCD
The hardware Parts List shows the components
required to build a world clock and where to get them. As
you can see, there isn’t much to it.
Figure 1 shows a Fritzing diagram for the world clock.
Figure 2 shows the design wired up and working on a
breadboard. As implied above, the clock is powered via a
USB cable and a USB power supply module, or
alternatively, it can be plugged into a USB port on your
Table 1 as they might not be completely clear from the
Both the Adafruit and the SainSmart displays have a
micro SD memory card connector and interface which
can be used with the ESP8266 although they are not
required for this project.
The software for the ESP8266 world clock was
developed using the Arduino IDE (integrated development
environment). I used version 1.8.0 for MacOS, but you
should be able to use the Arduino IDE on Windows as
well. Refer to my previous articles or the Resources
July 2017 31
To post comments on this article and find any associated files and/or downloads,
go to www.nutsvolts.com/magazine/issue/2017/07.
■ FIGURE 1. ESP8266
world clock wiring
■ FIGURE 2. ESP8266 world clock breadboard.