กลับไปหน้ารวมไฟล์
32x8-led-matrix-ntp-clock-with-ds3231-rtc-esp01-22c8bd-en.md

I wanted to learn Arduino / RTC comms for another project. Came across Ratti3 LED Matrix and thought 'let's give this one a go!'

Ratti3's code failed to compile using the libraries specified on IDE 1.8.13. Consuming 32362 of 30720 bytes (105%) of program space

Not to be deterred, time to get serious about learning Arduino!!

Original idea was simply to get the code working, however over several months of learning, trial and error, managed to squeeze in a couple of additional features.

The Wi-Fi ID and password of the home are regularly changed. Puling the clock down, changing ID and password in code, upload, put it all back would become very annoying.

In came idea 1: to store Wi-Fi details in EEPROM and make it changeable via the menu system.

EEPROM - what a good idea, how about using the EEPROM on the DS3231 module to make it portable between boards.

Here in lies idea 2: detect the presence of 'external' EEPROM and use that, if none detected, use 'on-chip' EEPROM.

Didn't have BH1750 or BME280, but the DS3231 has temp sensor built in, changed code to map LDR sensor reading to brightness and use the DS3231 internal temperature sensor.

Is now mostly working and I think worthy of publishing in project hub, most the bugs are sorted, however still tweaking.

First project posting, hopefully can come back and update this page as things progress

Code is heavily commented, hopefully will help others that are also learning.

EXPANDED TECHNICAL DETAILS

High-Precision Hybrid Chronometry

This project combines local hardware timekeeping with global network synchronization to create a redundant and perfectly accurate LED matrix clock.

  • ESP-01 NTP Handshake: The ESP-01 module connects to WiFi and fetches the precise time from Network Time Protocol (NTP) servers once per day.
  • I2C DS3231 Synchronization: The precision fetched from the internet is "Burned" into a DS3231 RTC. This ensures the clock remains accurate within seconds even if the WiFi goes down for weeks.

Visualization

  • MAX7219 Matrix Driver Hub: The Arduino (management core) manages a 4-module MAX7219 LED matrix array. The firmware includes a "Smooth Scrolling" algorithm for Date/Temperature and a "Dot-Matrix" font for high-visibility time display.

ข้อมูล Frontmatter ดั้งเดิม

title: "32x8 LED Matrix NTP Clock with DS3231 RTC & ESP01"
description: "Yet another LED Matrix clock!"
author: "doodles2000"
category: "Screens & Displays"
tags:
  - "Clocks"
views: 3426
likes: 0
price: 2450
difficulty: "Intermediate"
components:
  - "1x Breadboard (generic)"
  - "1x MAX7219 32x8 LED Matrix"
  - "1x DS3231MPMB1 Peripheral Module"
  - "3x Pushbutton switch 12mm"
  - "1x Jumper wires (generic)"
  - "1x Capacitor 1000 µF"
  - "1x LDR, 5 Mohm"
  - "1x ESP8266 ESP-01"
  - "1x ESP-01 Adapter board"
  - "1x Arduino Nano R3"
tools: []
apps:
  - "1x Arduino IDE 2.0 (beta)"
downloadableFiles:
  - "https://create.arduino.cc/editor/doodles2000/f0012c6e-42e0-4398-a0a0-9c3e2df98bae/preview?embed"
  - "https://create.arduino.cc/editor/doodles2000/fb4b8a95-a096-494f-9b05-c9e2e978fe72/preview?embed"
documentationLinks: []
passwordHash: "9ae88c814ae1c56b9ac3311d88945902105bc1ec86f6fccc2145f35aa5adb3ad"
encryptedPayload: "U2FsdGVkX18WH87R2NhwPfrugE4+UgvsrYr2B87krEUuCsPUGEWqkn2xFafOag7RWRca73SMwoG8O/5fGX50mLTw2yFh3wq/qsBbmuL2ef8="
seoDescription: "Build a 32x8 LED Matrix NTP Clock using ESP01 and DS3231 RTC. Accurate time sync via WiFi. A fun and functional Arduino project."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/32x8-led-matrix-ntp-clock-with-ds3231-rtc-esp01-22c8bd_cover.jpg"
lang: "en"