ESP8266-based Clock Synchronized With Network Time Service

ESP8266-based Clock Synchronized With Network Time Service

Thanks to Internet, the problem of time shifting in embedded and connected devices was solved using time synchronization over Internet.

National Institute of Standards and Technology provides a service called Network Time Service (NTS) over the Internet. The project of ESP8266-based clock, published on embedded-lab, is going to demonstrate how to make a benefit from NTS to accomplish time synchronization over the Internet.

This clock retrieves time information from NTS and display it on a 4-digit seven segment LED display, and the connection to NIST time server through your local WiFi network will be by using ESP-01 WiFi module.

The 4-digit seven segment LED display breakout includes MAX7219 IC which is a seven segment driver. Three GPIO pins from ESP8266 module are used, where MAX7219 needs one for serial input,one for clock line and one to drive LOAD pin of MAX7219.

MAX7219_app

espCLOCK_Circuit

The firmware was developed using Arduino core for ESP8266. The firmware queries the time from NTS with 2-minutes interval that because NIST does not allow queries to any of their servers more frequently than once every 4 seconds, according to the blog post. During the 2-minutes, time display is kept running locally using the delay() routine.

To see the full instructions and to download the code you can visit the embedded-lab blog.

ESPclock

Please follow and like us:
Pin Share

Embedded Hardware Engineer interested in open hardware and was born in the same year as Linux. Yahya is the editor-in-chief of Atadiat and believes in the importance of sharing free, practical, spam-free and high quality written content with others. His experience with Embedded Systems includes developing firmware with bare-metal C and Arduino, designing PCB&schematic and content creation.

view all posts by yahya
Subscribe
Notify of
guest

1 Comment
Inline Feedbacks
View all comments
coertvonk

Thanks for sharing. My son had a similar idea, but also hooked it up to Google Calendar. If you’re interested, his description is not complete, but the schematic and the code are. You find the notes at
http://www.coertvonk.com/technology/unfinished/connected-alarm-using-esp8266-15838

cheers
/c

Get new posts by email:
Get new posts by email:

Join 97,426 other subscribers

Archives