Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

A Big Self-Setting Clock is an open-source 2021 maker project by Doug Domke that combines an ESP32, Wi-Fi time synchronization, a DS3231 real-time clock and a 32×8 WS2812B RGB LED matrix. It sets itself from an NTP time server over Wi-Fi, then uses the DS3231 to keep time locally when the network is unavailable.

Despite the name, this is not an atomic or WWVB clock. Its automatic time source is the Internet. That distinction matters: the original firmware is easy to understand and modify, but its fixed GMT offset does not automatically handle daylight-saving-time changes.

See the original Hackster project, source code, schematic and enclosure files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the finished clock does

The clock uses four large custom 6×8 bitmap digits to display hours and minutes across a 32×8 flexible RGB LED matrix. It does not display seconds numerically. Instead, the colon blinks at approximately half-second intervals, while the LEDs change hue during the minute—from green near the beginning, through blue, toward red near the end.

#1 Best Overall
ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA Compatible with Arduino IDE (3PCS)
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Support LWIP protocol, Freertos
  • SupportThree Modes: AP, STA, and AP+STA
  • Ultra-Low power consumption, Compatible with Arduino IDE
  • ESP32 is a safe, reliable, and scalable to a variety of applications

The display is therefore both a clock and a programmable light. The font, colors, brightness, enclosure and display behavior can all be changed in software.

How “self-setting” works

The ESP32 connects to Wi-Fi and asks an NTP server for the current Unix/Epoch time. The firmware converts that value to the epoch expected by the RTC library, writes it to the DS3231, and then reads the RTC for display updates.

unsigned long NTPtime =
    timeClient.getEpochTime() - 946684800UL;

The subtraction is required because Unix/NTP time counts from 1 January 1970, while the Rtc by Makuna interface used by the project counts from 1 January 2000. Changing this conversion without checking the library’s epoch convention can shift the clock by decades.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The DS3231 is local holdover, not the Internet connection itself. It can keep the clock running after Wi-Fi disappears, but its battery and accuracy requirements still matter. The original author considered a battery unnecessary because the RTC is reset from Internet time at startup. That assumption is unsuitable if the clock may reboot while Wi-Fi is unavailable; install a compatible backup cell when offline recovery matters.

Original hardware

Part Purpose
Adafruit HUZZAH32 ESP32 Feather Wi-Fi controller and firmware host
WS2812B 8×32 flexible RGB matrix 256-pixel clock display
DS3231 RTC module Local timekeeping between network synchronizations
LM2596 adjustable buck regulator Converts 5 V to 3.3 V for the ESP32 and RTC
5 V, 2 A wall charger Power source for the matrix and regulator
3D printer Optional enclosure and display-support parts

The author identifies the project as intermediate-level and estimates about four hours. Another ESP32 board may work, but it is not automatically drop-in compatible: verify its pin mapping, power input, USB behavior and Arduino library support before substituting it.

System architecture

NTP server
    │
  Wi-Fi
    │
ESP32 ─── I²C ─── DS3231 RTC
  │
  └── data ─── WS2812B 32×8 matrix
                 ▲
                 │ 5 V power
             5 V supply
                 │
              LM2596
                 │
             3.3 V rail
                 │
           ESP32 and RTC

Power and wiring

The documented arrangement uses two voltage rails:

  • 5 V: the WS2812B matrix.
  • 3.3 V: the ESP32 and DS3231, supplied by the LM2596.

The matrix data line is connected to ESP32 GPIO 21 in the original build. The DS3231 connects to the ESP32 through I²C. Connect common ground between the supply, controller, RTC and matrix.

Adjust the regulator before connecting electronics

  1. Connect the LM2596 input to the 5 V supply.
  2. Use a multimeter to adjust the regulator output to 3.3 V.
  3. Confirm the voltage again under the expected load.
  4. Only then connect the ESP32 and RTC.

An incorrectly adjusted LM2596 can put excessive voltage into the controller or RTC and destroy them. Leave reasonable access to the adjustment screw and provide strain relief for the incoming power cable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not generalize the original LED-power setup

The original firmware sets brightness to 15—approximately 6%—and normally illuminates fewer than half the pixels. In that particular low-brightness configuration, the author does not use the matrix’s separate power connections. This is not a recommendation for full-brightness operation.

Rank #2
ELEGOO 3PCS ESP-32 Dev Boards, ESP-WROOM-32, USB-C, WiFi Bluetooth 4.2
  • Dual-Core Performance Up to 240 MHz: Run sensor processing, wireless communication, automation logic and connected-device tasks on a 32-bit dual-core ESP32 platform designed for responsive embedded and IoT projects
  • Built-in Wi-Fi and Bluetooth 4.2: Connect to 2.4 GHz Wi-Fi networks or use Bluetooth Classic and BLE for wireless sensors, smart devices, remote controls, home automation and other connected projects
  • Flexible Power-Saving Modes: ESP32 power-management features support dynamic clock scaling and low-power operating modes, helping developers reduce energy use in compatible sensing, monitoring and connected-device applications, suitable for battery-powered Internet of Things (IoT) devices.
  • USB-C Programming with CP2102: Connect through USB-C for power, sketch uploads and serial monitoring, while GPIO, UART, SPI and I2C interfaces support sensors, displays, motor drivers and other modules (USB-C cable not included)
  • Over-the-Air Update Support: Configure OTA functionality through a compatible ESP-32 software framework to update deployed firmware over Wi-Fi without reconnecting the board by USB for every revision

Higher brightness, more illuminated pixels, longer wires or a larger panel can cause voltage drop, resets, corrupted colors and overheating. A more robust remake should use appropriately sized wiring, power injection where the panel requires it, and suitable protection such as a fuse.

Logic-level compatibility

The ESP32 outputs 3.3 V logic, while the matrix is powered at 5 V. A 3.3-to-5 V level shifter is the technically safer design. The author reports that the matrix accepted the ESP32 signal without one, but that is an observed result from this build—not a universal guarantee. Add a suitable level shifter if reliability matters or if your particular matrix does not recognize the data signal consistently.

Mechanical construction

The project includes a 3D-printed enclosure and an optional support part for the flexible LED matrix. The support is important because a flexible panel can sag, distort the digit spacing or put stress on solder joints.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When adapting the case, provide:

  • a rigid or evenly supported surface behind the matrix;
  • ventilation around the regulator and controller;
  • access to the USB connector and regulator adjustment;
  • strain relief for the power and data cables;
  • space for the RTC battery if you install one;
  • safe separation between low-voltage wiring and any mains-powered adapter connections.

Hot glue is useful for a prototype, but it should not be treated as the only structural or electrical safety measure in a permanent installation.

Software setup

The original source is Arduino code. The project includes these headers:

#include <NTPClient.h>
#include <WiFi.h>
#include <WiFiUdp.h>
#include <Wire.h>
#include <RtcDS3231.h>
#include "FastLED.h"

Install the ESP32 board support in the Arduino IDE, then install:

  • NTPClient
  • FastLED
  • Rtc by Makuna, which provides the RtcDS3231.h interface

The project comments identify NTPClient 3.2.1, Rtc by Makuna 2.3.5 and FastLED 3.6.0. Those are the versions shown in the example, not a statement that they are the latest compatible releases in 2026. If a current library produces compile errors, try the project’s documented versions or another compatible release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Edit the configuration

const char* ssid = "Your Network";
const char* password = "Your Password";
const int GMToffset = -7;
const int format = 12;
const char* ntpServer = "us.pool.ntp.org";

Replace the Wi-Fi placeholders and choose:

  • your network name and password;
  • a 12-hour or 24-hour display;
  • the required GMT-hour offset;
  • an appropriate NTP server hostname.

Never publish real Wi-Fi credentials in a sketch, screenshot or public repository.

Rank #3
ELEGOO ESP-32 Super Starter Kit with Tutorial Compatible with Arduino IDE
  • Powerful ESP-32 Board: Unlock the world of Internet of Things (IoT) and advanced electronics with the heart of this kit: the ESP-32 board. It features a powerful dual-core processor, integrated Wi-Fi and Bluetooth 4.2, making it perfect for building connected, smart devices that communicate with your phone or the cloud. It's fully compatible with the Arduino IDE for easy programming.
  • Super Starter Kit: This kit contains over 35 different modules and electronic components, including sensors, displays, motors, and input devices. From LEDs and buttons to an OLED screen, servo motor, and keypad, you have everything needed to explore a vast range of projects in one box.
  • Step by Step Online Tutorial: Jump right in with our detailed, beginner-friendly tutorial. Access 30+ projects with complete code, clear circuit diagrams, and step-by-step instructions. Learn the fundamentals of electronics, coding, and how to utilize the ESP-32's unique capabilities without any prior experience.
  • Hands-on Learning for All Skill Levels: Perfect for students, makers, engineers, and hobbyists. Start with basic circuits and coding, then progress to intermediate and advanced IoT applications. Build practical projects like weather stations, smart home controllers, remote-controlled devices, and interactive gadgets. The skills you learn are the foundation for real-world innovation.
  • Quality & Great Support: Elegoo is committed to quality. We provide a clear, detailed tutorial guide, refined code, and a well-organized component kit. All modules are carefully selected for reliability and ease of use. Our dedicated technical support team and active online community are ready to help you succeed in your learning journey.

The time-zone limitation

GMToffset is a fixed integer-hour offset. It is not a named regional time zone and does not include daylight-saving rules. For example, a configuration that is correct for Mountain Standard Time can be one hour wrong when a region changes to daylight time.

For a clock that must remain correct throughout seasonal changes, replace the fixed-offset approach with a daylight-saving-aware time-zone implementation, or provide a way to change the setting. Automatic DST handling is an improvement to the design, not a feature documented in the original firmware.

What the firmware does at startup

The original setup() follows this sequence:

  1. Calls WiFi.begin(ssid, password).
  2. Waits until the ESP32 reports WL_CONNECTED.
  3. Starts the NTP client.
  4. Waits two seconds and calls timeClient.update().
  5. Gets the NTP epoch value.
  6. Subtracts 946684800UL to convert to the RTC library’s epoch.
  7. Starts the DS3231 and writes the converted time.
  8. Initializes the LED matrix.
  9. Sets brightness using FastLED.setBrightness(15).
  10. Clears and displays the matrix.

The important weakness is that the documented Wi-Fi loop can block forever:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
while (WiFi.status() != WL_CONNECTED) {
  delay(500);
}

A wrong password, captive portal, unsupported network or weak signal can therefore prevent the clock from ever reaching display initialization. A better implementation uses a connection timeout, reports the failure over Serial or a status LED, and falls back to the DS3231.

How the display loop works

The loop reads the current time from the DS3231, converts the hour for 12-hour mode when selected, and renders four 6×8 digit glyphs into a 32×8 logical buffer. It then:

  • blinks the colon at roughly half-second intervals;
  • calculates a hue from the current seconds value;
  • maps the logical pixels to the physical LED order;
  • reverses alternating rows for the matrix’s serpentine wiring;
  • refreshes the display when the second changes.

The key display constants are:

#define NUM_LEDS 256
#define DATA_PIN 21
FastLED.setBrightness(15);

If the first hour digit appears as a leading zero or an unexpected blank, inspect the custom font and rendering logic. The source converts midnight to 12 with:

myhour = myhour % 12;
if (myhour == 0) myhour = 12;

The source indicates the conversion, but does not formally specify how every one-digit hour should look on the finished panel.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Matrix orientation: test it before installing the clock

A different data-entry corner or serpentine direction can make the digits mirrored, upside down or scrambled. Before uploading the complete application, run a small one-pixel test sketch that lights one logical position at a time.

Rank #4
ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA Compatible with Arduino IDE (1 PCS)
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Support LWIP protocol, Freertos;ESP32 is a safe, reliable, and scalable to a variety of applications
  • SupportThree Modes: AP, STA, and AP+STA
  • Ultra-Low power consumption, Compatible with Arduino IDE
  • 1PCS 30Pin ESP32 Development Board 2.4GHz WiFi Dual Cores Microcontroller Integrated with Antenna RF Low Noise Amplifiers Filters

Use that test to confirm:

  • which corner contains LED 0;
  • whether each row reverses direction;
  • whether the panel is vertically inverted;
  • which RGB color order the matrix uses.

Then adjust the refresh mapping or physically rotate the panel. The original refreshDisplay() routine assumes a particular zig-zag layout.

First boot and expected behavior

On a successful startup, the ESP32 connects to Wi-Fi, obtains NTP time, initializes the DS3231 and activates the LED matrix. You should see hours and minutes, a blinking colon and a color transition as seconds pass.

The original project does not document a complete user-facing error display. Add Serial logging or a status LED during development so you can distinguish Wi-Fi failure, NTP failure, RTC detection failure and matrix wiring problems.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

No display

  • Confirm 5 V reaches the matrix and that grounds are common.
  • Check the matrix’s data-in connector and GPIO 21 assignment.
  • Verify NUM_LEDS is 256.
  • Test the panel with a one-pixel sketch.
  • Check whether the regulator was accidentally used to power the 5 V matrix rail.

Scrambled, mirrored or upside-down digits

The physical orientation or serpentine mapping does not match the code. Rotate the panel or modify the row-reversal and coordinate mapping in the refresh routine.

Wrong colors

Check the matrix’s RGB color order in FastLED and test red, green and blue independently. Also inspect the data signal and ground connection.

ESP32 resets or the LEDs flicker

Suspect voltage drop, inadequate power wiring, insufficient current capacity or electrical noise. Reduce brightness, shorten or thicken power wiring, add power injection where appropriate, and confirm the 3.3 V regulator output under load.

The clock is one hour wrong

Check daylight-saving time first. A fixed GMToffset does not automatically change seasonally.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The clock is several hours wrong

Check the sign and value of the GMT offset, confirm the intended region, and verify that the NTP-to-RTC epoch conversion has not been changed incorrectly.

Best Value
HiLetgo ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA for Arduino IDE
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Ultra-Low power consumption, works perfectly with the Arduino IDE
  • Support LWIP protocol, Freertos
  • SupportThree Modes: AP, STA, and AP+STA
  • ESP32 is a safe, reliable, and scalable to a variety of applications

Wi-Fi never connects

Recheck the SSID and password, test the network with another device, move the clock closer to the access point and check whether the network requires a captive portal or enterprise authentication. The original blocking loop will wait indefinitely, so add a timeout while debugging.

NTP fails

Do not write an unverified value into the RTC. Check Wi-Fi status, DNS access and the NTP hostname. A robust revision should retry after a delay, set the RTC only after receiving usable time, and continue displaying the RTC if synchronization fails.

The RTC is not detected

Check SDA and SCL wiring, power, common ground, the module address and the installed Rtc by Makuna library. Also confirm that the regulator is actually producing 3.3 V.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The clock loses time after a power failure

Install a compatible DS3231 backup cell and confirm that the module can keep time without main power. Without network access at the next boot, the original startup design cannot depend solely on NTP to restore the time.

Faithful reproduction versus a better remake

Approach What it means
Faithful reproduction Use the HUZZAH32, 32×8 matrix, DS3231, LM2596, GPIO 21 and the original startup/display logic, while observing its low-brightness assumptions.
Recommended modernization Add a level shifter, dedicated and fused LED power distribution, Wi-Fi timeout, RTC fallback, periodic NTP retries, DST-aware time zones, configuration storage and clear status reporting.

The modernized version is more work, but it addresses the original design’s most important practical limitations. Periodic NTP synchronization is particularly useful because the documented firmware synchronizes during startup; it does not specify a recurring resynchronization schedule.

Should you build it or buy a clock?

Build this project if the goal is to learn ESP32 networking, NTP, I²C, RTC operation, addressable LEDs, bitmap fonts and 3D-printed fabrication. It is also a strong platform for custom colors, fonts, animations and enclosure designs.

A ready-made clock is better if the goal is simply reliable timekeeping without soldering, programming or troubleshooting. For example, BALDR’s Atomic Time Projection Alarm Clock is designed for North American WWVB synchronization and adds projection, temperature, calendar and alarm functions. Its product page showed a price of $32.95 and temporary out-of-stock status on 18 August 2026, so both availability and price should be checked at the official product page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That commercial clock is not equivalent to the ESP32 project: it is not an open programmable LED matrix, cannot use the custom firmware, and depends on regional WWVB reception. BALDR also lists Internet-synchronized products in its alarm-clock collection; some require a separate weather-station hub.

The DIY project is a customizable electronics build. The retail alternatives are appliances. Choose according to whether you need a clock, a learning exercise or a large programmable display.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.