Free Shipping on orders over US$49.99

Getting Time From NTP Server Made Easy

ashwiniEvery once in a while, you come across an idea where keeping time is a prime concern. For example, imagine a relay that has to be activated at a certain time, or a data logger that has to store values at precise intervals.

The first thing that comes to our mind is to use a real-time clock (RTC) chip. But since these chips are not accurate, we need to keep doing manual adjustments to keep them synchronised.

The solution here is to use network time protocol (NTP). The ESP8266 NodeMCU has access to the internet, so you can get day of the week and precise time within a few milliseconds of Coordinated Universal Time (UTC) for free! And you don’t need any additional hardware circuitry.

Fig. 1: NTP communication format structure
Fig. 1: NTP communication format structure

Download source code


This project will be published in a few weeks. If you want to access it now, refer to Electronics For You’s December 2022 Issue–print or ezine edition.

Source link

We will be happy to hear your thoughts

Leave a reply

Enable registration in settings - general
Compare items
  • Total (0)
Shopping cart