Arduino Ethernet Shield & MAX7219 8-digit LED Display - Get Time and Date From the Internet

by RonFrtek in Circuits > Arduino

233 Views, 4 Favorites, 0 Comments

Arduino Ethernet Shield & MAX7219 8-digit LED Display - Get Time and Date From the Internet

Arduino Ethernet Shield & MAX7219 8-digit LED Display - Get Time and Date From the Internet

In this tutorial we will learn how to get the date and time from NIST TIME server using Arduino Ethernet Shield and Display it on the MAX7219 8-digit LED Display.

Watch the video!

What You Will Need

Ethernet-Shield-Front1.jpg
FFU3BELKQCCHK6J.jpg
arduino.jpg
WEATHER (12).png
F5OFEUQJJ4ZYFKY.LARGE.jpg
  • Arduino UNO (or any other Arduino)
  • Jumper wires
  • Ethernet Shield for Arduino
  • Max7219 Led Dot Matrix 8-digit Digital Display Control Module
  • LAN Internet connection
  • Visuino program: Download Visuino



The Circuit

2023-08-16_22-11-29.png
  • Connect Internet LAN cable to the Arduino Ethernet Shield
  • Connect LED module pin[VCC] to Arduino Ethernet Shield pin[5V]
  • Connect LED module pin[GND] to Arduino Ethernet Shield pin[GND]
  • Connect LED module pin[DIN] to Arduino Ethernet Shield digital pin[11]
  • Connect LED module pin[CS] to Arduino Ethernet Shield digital pin[2]
  • Connect LED module pin[CLK] to Arduino Ethernet Shield digital pin[13]


In Visuino Add Ethernet Shield

2023-08-16_21-51-03.png
2023-08-16_21-51-27.png
2023-08-16_21-51-48.png
2023-08-16_21-52-26.png
2023-08-16_21-52-44.png
  • Right mouse click on the Arduino board and select "Add Shields"
  • In the "Shields" window drag "Ethernet Shield" to the left side and in the properties window select "Sockets" and click on the 3 dots button.
  • In the "Sockets" window drag "TCP/IP Client" to the left side and in the properties window set "Port" to 37 and "Host" to: time-c-g.nist.gov
  • Close the "Sockets" and "Shields" window

Note: You can find more Time servers here: https://tf.nist.gov/tf-cgi/servers.cgi

In Visuino Add Components

2023-08-16_20-33-18.png
2023-08-16_20-35-24.png
2023-08-16_20-35-56.png
2023-08-16_20-36-39.png
2023-08-16_20-37-35.png
  • Pulse Generator
  • Internet Time Protocol
  • Decode(Split) Date/Time
  • 2X "Split Integer Digits
  • Maxim LED Display Controller SPI MAX7219/MAX7221

In Visuino Set Components

2023-08-16_20-38-31.png
2023-08-16_20-39-33.png
2023-08-16_20-44-10.png
2023-08-16_20-47-28.png
2023-08-16_20-47-43.png
2023-08-16_20-48-05.png
2023-08-16_20-48-19.png


  • Double click on the "LedController1" and in the "PixelGroups window" drag "Integer Display 7 Segments" to the left side and in the properties window set "Count Digits" to 2, "Leading Zeroes" to True, "Reversed Order" to True
  • In the "PixelGroups window" drag "Value Section 7 Segments" to the left side and in the properties window set "Initial Decmal Point Value" to True
  • In the "PixelGroups window" drag another "Value Section 7 Segments" to the left side
  • In the "PixelGroups window" drag "Integer Display 7 Segments" to the left side and in the properties window set "Count Digits" to 2, "Leading Zeroes" to True, "Reversed Order" to True
  • In the "PixelGroups window" drag "Value Section 7 Segments" to the left side and in the properties window set "Initial Decmal Point Value" to True
  • In the "PixelGroups window" drag another "Value Section 7 Segments" to the left side
  • Close the "PixelGroups window"



In Visuino Connect Components

2023-08-16_20-53-48.png
ethernettime.png
  • Connect "PulseGenerator1" pin [Out] to "InternetTime1" pin [In]
  • Connect "InternetTime1" pin [Socket] to "Arduino Uno" >TCP Client1 pin [In]
  • Connect "InternetTime1" pin [Out] to "DecodeDateTime1" pin [In]
  • Connect "DecodeDateTime1" pin [Month] to "LedController1" > "Integer Display 7 Segments1"pin [In]
  • Connect "DecodeDateTime1" pin [Day] to "SplitIntegerDigits1" pin [In]
  • Connect "SplitIntegerDigits1" pin[0] to "LedController1" > "Value Section 7 Segments1"pin [In]

  • Connect "SplitIntegerDigits1" pin[1] to "LedController1" > "Value Section 7 Segments2"pin [In]
  • Connect "DecodeDateTime1" pin [Hour] to "SplitIntegerDigits2" pin [In]
  • Connect "SplitIntegerDigits2" pin[0] to "LedController1" > "Value Section 7 Segments3"pin [In]
  • Connect "SplitIntegerDigits2" pin[1] to "LedController1" > "Value Section 7 Segments4"pin [In]
  • Connect "DecodeDateTime1" pin [Minute] to "LedController1" > "Integer Display 7 Segments2"pin [In]
  • Connect "LedController1" pin Out SPI to Arduino Pin SPI [In]
  • Connect "LedController1" pin Chip Select to Arduino Digital Pin [2]


Generate, Compile, and Upload the Code

Visuino-Compile-UNO.jpg

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

If you power the Arduino, it will connect to the internet and the display should start showing the date and time from the NIST server.

You can also experiment with other servers that you can find here https://tf.nist.gov/tf-cgi/servers.cgi

Congratulations! You have completed your Internet Time project with Visuino. Also attached is the Visuino project, that I created for this Tutorial. You can download and open it in Visuino: https://www.visuino.eu