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!

STEP 1
What You Will Need
  • 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

Ā 

What You Will Need

What You Will Need photo 2

What You Will Need photo 3

What You Will Need photo 4

What You Will Need photo 5

STEP 2
The Circuit
  • 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]

Ā 

The Circuit

STEP 3
In Visuino Add Ethernet Shield
  • 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 Ethernet Shield

In Visuino Add Ethernet Shield photo 2

In Visuino Add Ethernet Shield photo 3

In Visuino Add Ethernet Shield photo 4

In Visuino Add Ethernet Shield photo 5

STEP 4
In Visuino Add Components
  • Pulse Generator
  • Internet Time Protocol
  • Decode(Split) Date/Time
  • 2X "Split Integer Digits
  • Maxim LED Display Controller SPI MAX7219/MAX7221

In Visuino Add Components

In Visuino Add Components photo 2

In Visuino Add Components photo 3

In Visuino Add Components photo 4

In Visuino Add Components photo 5

STEP 5
In Visuino Set Components

Ā 

  • 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 Set Components

In Visuino Set Components photo 2

In Visuino Set Components photo 3

In Visuino Set Components photo 4

In Visuino Set Components photo 5

In Visuino Set Components photo 6

In Visuino Set Components photo 7

STEP 6
In Visuino Connect Components
  • 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]

Ā 

In Visuino Connect Components

In Visuino Connect Components photo 2

STEP 7
Generate, Compile, and Upload the Code

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.

Generate, Compile, and Upload the Code

STEP 8
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

icon UNO-internet-time-eu.zip 15KB Download(0)
icon UNO-internet-time-us.zip 17KB Download(0)
License
All Rights
Reserved
licensBg
0