Guides · 9 min read

ESP32 Word Clock: Build One with WS2812B LEDs and NTP Time

Build an ESP32 word clock: WS2812B letter grid, NTP time, 5-minute steps, English, German and Turkish layouts, LED power calculation and night dimming.

An ESP32 word clock shows the time not with digits but by lighting the right words on a panel of letters. At a quarter past three the panel lights up "IT IS A QUARTER PAST THREE" while every other letter stays dark. Commercial versions are expensive, but with an ESP32, a length of WS2812B LED strip and a letter template you can build the same thing in a weekend. Because the ESP32 gets the time from the internet over NTP, you don't need setting buttons, a battery or an RTC module.

In this guide we'll build up, step by step, how a word clock works, the English, German and Turkish letter layouts, zigzag LED wiring, getting the time via NTP and lighting words in five-minute steps. The code supports all three languages; you pick one by changing a single line. You'll also find a power calculation based on LED count, night dimming, building the case and common mistakes. If you've never used WS2812B LEDs, have a look at How to Use WS2812B NeoPixel LEDs first.

WS2812B NeoPixel LED strip
WS2812B: the colour and brightness of each LED are controlled individually over a single data line; in a word clock there's one LED behind every letter.

How does a word clock work?

The panel is a letter grid of rows and columns: the English and German layouts have 11 × 10 = 110 letters, and our Turkish layout has 11 × 11 = 121. There's a WS2812B LED behind each letter, and a light-tight grid separates the letters so only the lit ones are visible. The software rounds the time down to five minutes and lights the letters of the matching words. At 14:07 the clock treats the time as 14:05 and lights "IT IS FIVE PAST TWO". Some designs add four small LEDs in the corners to show the extra 1–4 minutes.

PartJobNote
ESP32 development boardNTP time over Wi-Fi, driving the LEDsAny DevKit version works
WS2812B LED strip (60 LEDs/m)The light behind each letter110 LEDs for English and German, 121 for Turkish
5 V 2–3 A power adapterPowering the LEDs and the ESP32A USB port isn't enough
1000 µF capacitorSmoothing the inrush current at power-onAt the strip input, between 5 V and GND
330 Ω resistorProtecting the data lineBetween the ESP32 pin and the strip's DIN
74AHCT125 level shifterRaising the 3.3 V data to 5 VRecommended, though it often works without
Front panel and gridShowing the letters, separating the lightAcrylic, wood or 3D printed
LDR + 10 kΩ resistorMeasuring ambient lightOptional, for automatic brightness

Letter grid templates: Turkish, English and German

A Turkish word clock is harder to design than an English or German one, because the hour word takes a suffix depending on its place in the sentence: "SAAT ÜÇ" (three o'clock) but "ÜÇÜ BEŞ GEÇİYOR" (five past three) and "ÜÇE BEŞ VAR" (five to three). Writing every hour three times would make the grid needlessly large. In our layout the stem sits next to two suffix letters: BİR, İ and E are arranged as "BİRİE". For "BİRİ" the first four letters light up, for "BİRE" the stem plus the last letter; the unlit letter in between is almost invisible in the dark. Because DÖRT (four) becomes DÖRDÜ and DÖRDE with a suffix, that hour is written twice. ON BİR and ON İKİ (eleven and twelve) combine the stem ON with BİR and İKİ.

RowLetters (left to right)Words used
1SAATRONUAPLSAAT, ON / ONU / ONA (10, and the ON of 11–12)
2BİRİEİKİYİEBİR / BİRİ / BİRE, İKİ / İKİYİ / İKİYE
3ÜÇÜEDÖRDÜEZÜÇ / ÜÇÜ / ÜÇE, DÖRDÜ / DÖRDE
4DÖRTBEŞİEKADÖRT, BEŞ / BEŞİ / BEŞE (hour)
5ALTIYIAMSPFALTI / ALTIYI / ALTIYA
6YEDİYİECGLNYEDİ / YEDİYİ / YEDİYE
7SEKİZİETOHUSEKİZ / SEKİZİ / SEKİZE
8DOKUZUARONMDOKUZ / DOKUZU / DOKUZA, ON (minutes)
9ÇEYREKYİRMİÇEYREK, YİRMİ
10BEŞDBUÇUKSTBEŞ (minutes), BUÇUK
11GEÇİYORAVARGEÇİYOR, VAR

The English and German layouts are the classic 11 × 10 word clock templates. In English you build sentences like "IT IS TWENTY FIVE PAST THREE"; in German the half hours are said relative to the next hour, so 2:30 is "HALB DREI" and 2:25 is "FÜNF VOR HALB DREI". In Germany these clocks are called "Wortuhr", and in some regions 2:45 is "DREIVIERTEL DREI"; the template contains that word too, so a small code change switches to that style.

RowEnglish layoutGerman layout
1ITLISASAMPMESKISTAFÜNF
2ACQUARTERDCZEHNZWANZIG
3TWENTYFIVEXDREIVIERTEL
4HALFSTENFTOVORFUNKNACH
5PASTERUNINEHALBAELFÜNF
6ONESIXTHREEEINSXAMZWEI
7FOURFIVETWODREIPMJVIER
8EIGHTELEVENSECHSNLACHT
9SEVENTWELVESIEBENZWÖLF
10TENSEOCLOCKZEHNEUNKUHR
MinuteTurkish (for 3)EnglishGerman
:00SAAT ÜÇIT IS THREE O'CLOCKES IST DREI UHR
:05SAAT ÜÇÜ BEŞ GEÇİYORFIVE PAST THREEFÜNF NACH DREI
:15SAAT ÜÇÜ ÇEYREK GEÇİYORA QUARTER PAST THREEVIERTEL NACH DREI
:25SAAT ÜÇÜ YİRMİ BEŞ GEÇİYORTWENTY FIVE PAST THREEFÜNF VOR HALB VIER
:30SAAT ÜÇ BUÇUKHALF PAST THREEHALB VIER
:35SAAT DÖRDE YİRMİ BEŞ VARTWENTY FIVE TO FOURFÜNF NACH HALB VIER
:45SAAT DÖRDE ÇEYREK VARA QUARTER TO FOURVIERTEL VOR VIER
:55SAAT DÖRDE BEŞ VARFIVE TO FOURFÜNF VOR VIER

Wiring and LED layout

ConnectionFromTo
5 V supplyAdapter +Strip 5V input and the ESP32's 5V (VIN) pin
GNDAdapter −Strip GND and the ESP32's GND (common ground)
DataESP32 GPIO 13Strip DIN through a 330 Ω resistor
Capacitor1000 µF, 6.3 V or higherBetween 5 V and GND at the strip input
LDR (optional)3V3 – LDR – GPIO 34 – 10 kΩ – GNDVoltage divider on an ADC1 pin
Don't try to power the LEDs from the ESP32's 5V pin or a computer's USB port. If a bug lights all 110 LEDs full white, they can draw more than 6 A, which will burn out the diode on the board and the USB port. Feed the adapter's 5 V straight to the strip, power the ESP32 from the same adapter through VIN, and always join the grounds.

Cut the strip into 11-LED pieces and stick one piece on each row. To keep the wiring short, the strips are connected in a zigzag (serpentine) pattern: the top row runs left to right, the second right to left, the third left to right again. The ledIndex() function in the code converts row and column into an LED number for this pattern. The arrows on the strip show the data direction; each row's output (DOUT) must go to the next row's input (DIN). If your panel starts at the top right or at the bottom, you only need to change the formula in ledIndex().

The ESP32's data output is 3.3 V, while a WS2812B powered at 5 V wants about 3.5 V on its data input. Most strips work anyway, but if you see unstable colours or flickering LEDs, add a level shifter such as the 74AHCT125 to the data line. Details are in Logic Level Converters.

Step-by-step setup

  1. Install the ESP32 board package in the Arduino IDE and the Adafruit NeoPixel library from the Library Manager.
  2. Enter your Wi-Fi details in the WIFI_SSID and WIFI_PASS lines.
  3. Choose LANGUAGE: 0 Turkish, 1 English, 2 German; put your time zone in the TZ_INFO line.
  4. Test the strip on the desk before sticking it to the grid: upload the code and check that the right LEDs light up.
  5. Open the Serial Monitor at 115200 baud; it should print the time and brightness at every change.
  6. If everything is right, stick the strips to the back panel in a zigzag and fit the grid and front panel.
C++ (Arduino IDE)
1// ESP32 + WS2812B kelime saati: NTP ile saat, 5 dakikalık adımlar / word clock: NTP time, 5-minute steps
2// Kütüphane: Adafruit NeoPixel / Library: Adafruit NeoPixel
3// Dil seç: 0 = Türkçe (11x11), 1 = English (11x10), 2 = Deutsch (11x10) / pick a language
4#define LANGUAGE 0
5
6#include <WiFi.h>
7#include <time.h>
8#include <Adafruit_NeoPixel.h>
9
10const char* WIFI_SSID = "YOUR_WIFI_NAME";
11const char* WIFI_PASS = "YOUR_WIFI_PASSWORD";
12// POSIX saat dilimi / POSIX time zone: TR "<+03>-3", DE "CET-1CEST,M3.5.0,M10.5.0/3", UK "GMT0BST,M3.5.0/1,M10.5.0"
13const char* TZ_INFO = "<+03>-3";
14
15#define LED_PIN     13              // DIN, 330 ohm seri direnç ile / through a 330 ohm series resistor
16#define LDR_PIN     34              // isteğe bağlı LDR (ADC1) / optional LDR (ADC1)
17#define USE_LDR     0               // 1: parlaklığı LDR belirler / 1: brightness follows the LDR
18#define DAY_BRIGHT  120             // gündüz parlaklığı (0-255) / day brightness
19#define NIGHT_BRIGHT 12             // gece parlaklığı / night brightness
20#define NIGHT_START 22              // gece modu başlangıç saati / night mode starts
21#define NIGHT_END   7               // gece modu bitiş saati / night mode ends
22
23const uint8_t COLS = 11;
24#if LANGUAGE == 0
25const uint8_t ROWS = 11;
26#else
27const uint8_t ROWS = 10;
28#endif
29const uint16_t NUM_LEDS = ROWS * COLS;
30
31struct Word { uint8_t row, col, len; };   // harf matrisinde bir kelime / one word on the letter grid
32
33#if LANGUAGE == 0
34// SAATRONUAPL / BİRİEİKİYİE / ÜÇÜEDÖRDÜEZ / DÖRTBEŞİEKA / ALTIYIAMSPF / YEDİYİECGLN
35// SEKİZİETOHU / DOKUZUARONM / ÇEYREKYİRMİ / BEŞDBUÇUKST / GEÇİYORAVAR
36const Word W_SAAT = {0, 0, 4}, W_BES = {9, 0, 3}, W_ON = {7, 8, 2}, W_CEYREK = {8, 0, 6},
37           W_YIRMI = {8, 6, 5}, W_BUCUK = {9, 4, 5}, W_GECIYOR = {10, 0, 7}, W_VAR = {10, 8, 3};
38// Her saat için 3 biçim: yalın (üç), -i hâli (üçü), -e hâli (üçe); len 0 = boş
39// 3 forms per hour: plain (üç), accusative (üçü), dative (üçe); len 0 = unused
40const Word TR_HOUR[13][3][3] = {
41  {},
42  {{{1, 0, 3}}, {{1, 0, 4}}, {{1, 0, 3}, {1, 4, 1}}},                              // BİR  BİRİ  BİRE
43  {{{1, 5, 3}}, {{1, 5, 5}}, {{1, 5, 4}, {1, 10, 1}}},                             // İKİ  İKİYİ İKİYE
44  {{{2, 0, 2}}, {{2, 0, 3}}, {{2, 0, 2}, {2, 3, 1}}},                              // ÜÇ   ÜÇÜ   ÜÇE
45  {{{3, 0, 4}}, {{2, 4, 5}}, {{2, 4, 4}, {2, 9, 1}}},                              // DÖRT DÖRDÜ DÖRDE
46  {{{3, 4, 3}}, {{3, 4, 4}}, {{3, 4, 3}, {3, 8, 1}}},                              // BEŞ  BEŞİ  BEŞE
47  {{{4, 0, 4}}, {{4, 0, 6}}, {{4, 0, 5}, {4, 6, 1}}},                              // ALTI ALTIYI ALTIYA
48  {{{5, 0, 4}}, {{5, 0, 6}}, {{5, 0, 5}, {5, 6, 1}}},                              // YEDİ YEDİYİ YEDİYE
49  {{{6, 0, 5}}, {{6, 0, 6}}, {{6, 0, 5}, {6, 6, 1}}},                              // SEKİZ SEKİZİ SEKİZE
50  {{{7, 0, 5}}, {{7, 0, 6}}, {{7, 0, 5}, {7, 6, 1}}},                              // DOKUZ DOKUZU DOKUZA
51  {{{0, 5, 2}}, {{0, 5, 3}}, {{0, 5, 2}, {0, 8, 1}}},                              // ON   ONU   ONA
52  {{{0, 5, 2}, {1, 0, 3}}, {{0, 5, 2}, {1, 0, 4}}, {{0, 5, 2}, {1, 0, 3}, {1, 4, 1}}},   // ON BİR
53  {{{0, 5, 2}, {1, 5, 3}}, {{0, 5, 2}, {1, 5, 5}}, {{0, 5, 2}, {1, 5, 4}, {1, 10, 1}}},  // ON İKİ
54};
55#elif LANGUAGE == 1
56// ITLISASAMPM / ACQUARTERDC / TWENTYFIVEX / HALFSTENFTO / PASTERUNINE
57// ONESIXTHREE / FOURFIVETWO / EIGHTELEVEN / SEVENTWELVE / TENSEOCLOCK
58const Word W_IT = {0, 0, 2}, W_IS = {0, 3, 2}, W_A = {1, 0, 1}, W_QUARTER = {1, 2, 7},
59           W_TWENTY = {2, 0, 6}, W_FIVE_M = {2, 6, 4}, W_HALF = {3, 0, 4}, W_TEN_M = {3, 5, 3},
60           W_TO = {3, 9, 2}, W_PAST = {4, 0, 4}, W_OCLOCK = {9, 5, 6};
61const Word EN_HOUR[13] = {{0, 0, 0}, {5, 0, 3}, {6, 8, 3}, {5, 6, 5}, {6, 0, 4}, {6, 4, 4}, {5, 3, 3},
62                          {8, 0, 5}, {7, 0, 5}, {4, 7, 4}, {9, 0, 3}, {7, 5, 6}, {8, 5, 6}};
63#else
64// ESKISTAFÜNF / ZEHNZWANZIG / DREIVIERTEL / VORFUNKNACH / HALBAELFÜNF
65// EINSXAMZWEI / DREIPMJVIER / SECHSNLACHT / SIEBENZWÖLF / ZEHNEUNKUHR
66const Word W_ES = {0, 0, 2}, W_IST = {0, 3, 3}, W_FUENF_M = {0, 7, 4}, W_ZEHN_M = {1, 0, 4},
67           W_ZWANZIG = {1, 4, 7}, W_VIERTEL = {2, 4, 7}, W_VOR = {3, 0, 3}, W_NACH = {3, 7, 4},
68           W_HALB = {4, 0, 4}, W_EIN = {5, 0, 3}, W_UHR = {9, 8, 3};
69const Word DE_HOUR[13] = {{0, 0, 0}, {5, 0, 4}, {5, 7, 4}, {6, 0, 4}, {6, 7, 4}, {4, 7, 4}, {7, 0, 5},
70                          {8, 0, 6}, {7, 7, 4}, {9, 3, 4}, {9, 0, 4}, {4, 5, 3}, {8, 6, 5}};
71#endif
72
73Adafruit_NeoPixel strip(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
74bool lit[ROWS][COLS];
75int lastKey = -1;
76
77// Zikzak (yılan) kablolama: çift satırlar soldan sağa, tek satırlar sağdan sola
78// Zigzag wiring: even rows left to right, odd rows right to left
79uint16_t ledIndex(uint8_t r, uint8_t c) {
80  return r * COLS + ((r % 2 == 0) ? c : (COLS - 1 - c));
81}
82
83void light(const Word& w) {
84  for (uint8_t i = 0; i < w.len; i++) lit[w.row][w.col + i] = true;
85}
86
87// Saati ve 5'e yuvarlanmış dakikayı kelimelere çevir / turn the hour and 5-minute step into words
88void buildWords(int hour24, int minute) {
89  memset(lit, 0, sizeof(lit));
90  int m5 = (minute / 5) * 5;                     // aşağı yuvarla: 12:07 -> 12:05 / round down
91  int h = hour24 % 12; if (h == 0) h = 12;       // 1..12
92  int next = (h % 12) + 1;                       // bir sonraki saat / the next hour
93#if LANGUAGE == 0
94  light(W_SAAT);
95  int hh = (m5 <= 30) ? h : next;
96  int form = (m5 == 0 || m5 == 30) ? 0 : (m5 < 30 ? 1 : 2);   // yalın / -i / -e
97  for (const Word& w : TR_HOUR[hh][form]) light(w);
98  switch (m5) {
99    case 5:  light(W_BES); light(W_GECIYOR); break;
100    case 10: light(W_ON); light(W_GECIYOR); break;
101    case 15: light(W_CEYREK); light(W_GECIYOR); break;
102    case 20: light(W_YIRMI); light(W_GECIYOR); break;
103    case 25: light(W_YIRMI); light(W_BES); light(W_GECIYOR); break;
104    case 30: light(W_BUCUK); break;
105    case 35: light(W_YIRMI); light(W_BES); light(W_VAR); break;
106    case 40: light(W_YIRMI); light(W_VAR); break;
107    case 45: light(W_CEYREK); light(W_VAR); break;
108    case 50: light(W_ON); light(W_VAR); break;
109    case 55: light(W_BES); light(W_VAR); break;
110  }
111#elif LANGUAGE == 1
112  light(W_IT); light(W_IS);
113  switch (m5) {
114    case 0:  light(W_OCLOCK); break;
115    case 5:  case 55: light(W_FIVE_M); break;
116    case 10: case 50: light(W_TEN_M); break;
117    case 15: case 45: light(W_A); light(W_QUARTER); break;
118    case 20: case 40: light(W_TWENTY); break;
119    case 25: case 35: light(W_TWENTY); light(W_FIVE_M); break;
120    case 30: light(W_HALF); break;
121  }
122  if (m5 > 0 && m5 <= 30) light(W_PAST);
123  if (m5 > 30) light(W_TO);
124  light(EN_HOUR[m5 > 30 ? next : h]);
125#else
126  light(W_ES); light(W_IST);
127  switch (m5) {
128    case 0:  light(W_UHR); break;
129    case 5:  light(W_FUENF_M); light(W_NACH); break;
130    case 10: light(W_ZEHN_M); light(W_NACH); break;
131    case 15: light(W_VIERTEL); light(W_NACH); break;
132    case 20: light(W_ZWANZIG); light(W_NACH); break;
133    case 25: light(W_FUENF_M); light(W_VOR); light(W_HALB); break;
134    case 30: light(W_HALB); break;
135    case 35: light(W_FUENF_M); light(W_NACH); light(W_HALB); break;
136    case 40: light(W_ZWANZIG); light(W_VOR); break;
137    case 45: light(W_VIERTEL); light(W_VOR); break;
138    case 50: light(W_ZEHN_M); light(W_VOR); break;
139    case 55: light(W_FUENF_M); light(W_VOR); break;
140  }
141  int hh = (m5 >= 25) ? next : h;                // "halb drei" = 2:30
142  if (m5 == 0 && hh == 1) light(W_EIN);          // "ein Uhr", aksi hâlde "eins" / otherwise "eins"
143  else light(DE_HOUR[hh]);
144#endif
145}
146
147uint8_t pickBrightness(int hour24) {
148#if USE_LDR
149  int raw = analogRead(LDR_PIN);                 // 0 (karanlık) - 4095 (aydınlık), devreye göre / depends on the divider
150  return map(raw, 0, 4095, NIGHT_BRIGHT, DAY_BRIGHT);
151#else
152  bool night = (hour24 >= NIGHT_START || hour24 < NIGHT_END);
153  return night ? NIGHT_BRIGHT : DAY_BRIGHT;
154#endif
155}
156
157void show(uint8_t brightness) {
158  uint32_t color = strip.Color(255, 170, 90); // sıcak beyaz / warm white
159  strip.clear();
160  for (uint8_t r = 0; r < ROWS; r++)
161    for (uint8_t c = 0; c < COLS; c++)
162      if (lit[r][c]) strip.setPixelColor(ledIndex(r, c), color);
163  strip.setBrightness(brightness);
164  strip.show();
165}
166
167void setup() {
168  Serial.begin(115200);
169  strip.begin();
170  strip.setBrightness(30);
171  strip.setPixelColor(0, strip.Color(0, 0, 255));   // mavi nokta: Wi-Fi bekleniyor / blue dot: waiting for Wi-Fi
172  strip.show();
173  WiFi.begin(WIFI_SSID, WIFI_PASS);
174  while (WiFi.status() != WL_CONNECTED) delay(300);
175  configTzTime(TZ_INFO, "pool.ntp.org", "time.google.com");   // NTP + yaz saati kuralı / NTP + DST rule
176}
177
178void loop() {
179  struct tm t;
180  if (!getLocalTime(&t, 1000)) return;           // saat henüz gelmedi / time not synced yet
181  uint8_t b = pickBrightness(t.tm_hour);
182  int key = (t.tm_hour * 60 + (t.tm_min / 5) * 5) * 256 + b;   // değişince yeniden çiz / redraw on change
183  if (key != lastKey) {
184    lastKey = key;
185    buildWords(t.tm_hour, t.tm_min);
186    show(b);
187    Serial.printf("%02d:%02d parlaklik/brightness %d\n", t.tm_hour, t.tm_min, b);
188  }
189  delay(1000);
190}
PartWhat it does
LANGUAGEPicks the language before compiling; ROWS and the word tables change with it
struct WordHolds a word's row, starting column and letter count
TR_HOURLetter segments to light for each hour's plain, accusative and dative forms (Turkish)
buildWords()Turns the hour and the rounded minute into words and fills the lit array
ledIndex()Finds the LED number from row and column for zigzag wiring
pickBrightness()Chooses brightness from the time of day or the LDR
configTzTime()Gets the time from an NTP server and applies the daylight saving rule
key / lastKeyRedraws only when the five-minute step or the brightness changes

The most important part of the code is buildWords(). In English, after 30 minutes the clock switches to "TO" and the next hour: 3:35 is "TWENTY FIVE TO FOUR". In German the next hour is used from 25 minutes on, because "HALB VIER" means 3:30. In Turkish, the next hour with the dative suffix is used after 30 minutes, while at :00 and :30 the hour stays in its plain form. Every one of these rules was tested for every hour and every five-minute step.

NTP time and time zones

Once connected to Wi-Fi, the ESP32 uses configTzTime() to fetch the time from an NTP server such as pool.ntp.org and set its internal clock. The TZ_INFO string passed to this function defines the time zone and daylight saving rules in POSIX format. For the UK, "GMT0BST,M3.5.0/1,M10.5.0" switches the clock automatically on the last Sundays of March and October; for Germany use "CET-1CEST,M3.5.0,M10.5.0/3", and Turkey, which has no daylight saving, uses "<+03>-3". The internal clock keeps running even if Wi-Fi drops, and the ESP32 re-syncs with NTP at regular intervals. Details are in ESP32 NTP Time.

Power calculation by LED count

At full brightness each colour of a WS2812B draws about 20 mA, so white draws about 60 mA in total. Even when off, each LED uses about 1 mA. In a word clock no more than 20–26 letters are lit at once and the colour is warm white (255, 170, 90), so real consumption is low. In warm white an LED at full brightness draws about (255 + 170 + 90) / 255 × 20 mA ≈ 40 mA; at a brightness of 120/255 that falls to about 19 mA.

SituationCalculationApprox. current
All off (121 LEDs)121 × 1 mA0.12 A
Daytime, 26 letters, brightness 12026 × 19 mA + 0.12 A0.6 A
Night, 26 letters, brightness 1226 × 1.9 mA + 0.12 A0.17 A
All letters full white during a test121 × 60 mA7.3 A
ESP32 with Wi-Fi onAverage0.1–0.25 A

So a 5 V 2 A adapter is more than enough for normal use; if you add animations that light the whole panel, choose 3 A or more and cap the maximum brightness in software. Night mode isn't just easier on the eyes, it also cuts consumption to less than a third of the daytime figure. To try the calculation with different scenarios, use the Ohm's law calculator.

Dimming at night

The code offers two methods. The default looks at the time: between NIGHT_START (22) and NIGHT_END (7) the brightness drops to NIGHT_BRIGHT, which is 12. For the second method, set USE_LDR to 1; a voltage divider made of an LDR and a 10 kΩ resistor on GPIO 34 then measures ambient light, and map() sets the brightness between 12 and 120. The LDR method also reacts when you close the curtains or switch off the light. You can work out the divider values with the voltage divider calculator, and how an LDR works is explained in LDR Light Sensor.

At very low brightness the colours of a WS2812B can shift: below about 5 the blue channel of warm white may switch off completely and the letters turn orange. A night value between 8 and 15 gives a result that's readable and easy on the eyes. Fine-tune the values in a dark bedroom.

Building the case and front panel

On the front panel the letters must let light through while everything between them stays completely dark. The easiest method is to print the letters white on a black background on a transparency sheet and put a layer of tracing paper behind it. You can also use a laser-cut black acrylic or wooden panel. A grid that puts each LED in its own cell behind the letters is essential; without it the light spills into neighbouring letters and the words become unreadable. On a 60 LEDs/m strip the LED pitch is about 16.7 mm, so an 11-column panel is about 18.5 cm wide; with a 30 LEDs/m strip the same panel grows to about 37 cm.

16x16 NeoPixel LED matrix
16x16 NeoPixel matrix: if you'd rather not cut and stick strips, you can use an 11 × 11 area of a ready-made matrix and adapt ledIndex() to the matrix layout.

A ready-made 16 × 16 NeoPixel matrix is also a good shortcut: with an LED pitch of about 10 mm you get a small desk clock about 11 cm wide. In that case the calculation in ledIndex() must use the matrix's real width of 16 LEDs instead of the panel's 11 columns. For matrix layouts and usage, see NeoPixel Matrix.

Ideas to add to your word clock

  • Add four LEDs in the corners to show minutes 1–4 as dots, so the clock is accurate to the minute.
  • Add an RTC module so it also works without Wi-Fi, and use NTP only to correct the time.
  • Add a special-days mode that lights all the letters in a colourful animation on birthdays or New Year.
  • Put a touch sensor in a corner of the panel to cycle through colours and brightness levels.
  • Use the ESP32's web server to build a settings page where you can set the colour, night hours and language from your phone.

Common problems and fixes

SymptomCauseFix
No LEDs light upData connected to DOUT, or no common GNDFollow the arrow on the strip, connect data to DIN, join the grounds
Wrong letters light upDifferent zigzag direction or starting cornerChange the ledIndex() formula to match your panel
Time is off by one or two hoursWrong TZ_INFOCheck the POSIX time zone string for your country
First LED flickers in random colours3.3 V data signal is marginalAdd a 330 Ω resistor and a 74AHCT125 level shifter
ESP32 resets at power-onInrush current pulls the supply downAdd a 1000 µF capacitor, use a stronger adapter
Neighbouring letters glow tooNo grid, or the grid leaks lightSeparate cells with a black-painted grid, use a thicker diffuser
Before closing the panel, add a short test loop to loop() that moves the time forward five minutes every second; you'll see all 144 steps in about two and a half minutes. If one letter never lights, the problem isn't the table in the code but the solder joint of that LED or a break in the strip.

A word clock brings LED driving, internet time, power calculation and mechanical design together in one project, and when you finish you have something you'll actually hang on the wall and use. The ESP32 NTP internet time and ESP32 WS2812B NeoPixel strip control projects in the BlueGrays app show the two core parts of this clock with step-by-step wiring diagrams and code; building those first and then adding the word table from this article is the smoothest route.

Frequently asked questions

What is a word clock?

A word clock shows the time by lighting words on a panel of letters instead of showing digits. Sentences such as "IT IS A QUARTER PAST THREE" light up in five-minute steps. In German it's called a "Wortuhr", and it's easy to build with an ESP32 and WS2812B LEDs.

How many LEDs do I need for a word clock?

With one LED behind each letter, the classic English and German layouts need 110 LEDs, and the Turkish layout in this article needs 121. With a 60 LEDs/m strip that's about 2 metres of strip. If you want minute dots in the corners, add four more LEDs.

What power supply does a word clock need?

In normal use 20–26 letters are lit at once, so consumption stays under 1 A and a 5 V 2 A adapter is enough. If you plan animations that light every letter, choose 3 A or more. Don't power the LEDs from a computer's USB port or from an ESP32 pin.

Does a word clock work without internet?

Once the ESP32 has the time from NTP, it keeps running on its internal clock even if Wi-Fi drops, but it loses the time after a power cut. If you want it to work fully offline, add a DS3231 or DS1307 RTC module and read the time from there. You can then use NTP to correct the RTC now and then.

How accurate is a word clock?

Because the words change in five-minute steps, at 3:07 the clock shows "FIVE PAST THREE", so there's up to four minutes of rounding. If you add four corner LEDs that show the extra minutes as dots, you can read it to the minute. The underlying time is accurate to within seconds thanks to NTP.

Can I make a word clock in my own language?

Yes. Write down how the time is said in your language for every five-minute step, list the words you need and arrange them in reading order on the grid. Then add the word positions to the code as Word entries and write the rules in buildWords(). Languages where words change form, such as Turkish, need a few extra letters.

See all projects
Real-Time Clock from the Internet via ESP32 NTP
ES-26Advanced
Premium

Real-Time Clock from the Internet via ESP32 NTP

The ESP32 connects to Wi-Fi and fetches the real time from NTP (Network Time Protocol) servers with millisecond precision. configTzTime() applies the Turkey time zone (TRT, UTC+3) automatically, and in countries with daylight saving time the DST switch is handled by a POSIX TZ string. The time is printed both to the Serial Monitor and to an optional I2C LCD.

4.5(13)
22
ESP32 WS2812B NeoPixel Strip Control
ES-24Intermediate
Premium

ESP32 WS2812B NeoPixel Strip Control

WS2812B (NeoPixel) addressable LEDs are smart RGB LEDs that can be chained and controlled from a single data pin. In this project we drive an 8-LED WS2812B strip with the Adafruit_NeoPixel library and create a smooth rainbow animation. The ESP32's 3.3V logic works with most WS2812B batches; if it gets unstable, we show the fix with a 470Ω series resistor and a 1000µF capacitor. The animation shifts the hue in HSV color space.

4.9(19)
31
Digital Clock with ESP32 and DS1307 RTC (I2C + LCD)
ES-18Intermediate
Premium

Digital Clock with ESP32 and DS1307 RTC (I2C + LCD)

In this project, we display the time and date on a 16x2 I2C LCD screen using the DS1307 real-time clock (RTC) module. The DS1307 is a battery-backed RTC that maintains the time even if the ESP32 is powered off. Both modules share the same I2C bus (SDA/SCL), allowing us to learn how to control multiple devices using just two signal wires. Through this project, you will gain practical knowledge of the I2C communication protocol, RTC module operation, and dynamic data display on an LCD screen.

4.6(26)
40
ESP32 Wi-Fi STA Connection (with LCD Screen)
ES-25Advanced

ESP32 Wi-Fi STA Connection (with LCD Screen)

In this project, we connect the ESP32 to the home Wi-Fi network in Station (STA) mode in a secure, fault-tolerant manner. We store the SSID and password in a separate secrets.h file to prevent leaking to Git, set up an auto-reconnect mechanism, and display the RSSI signal level and IP address on an I2C LCD screen. The internal LED works as a status indicator. It is a production-grade connection manager.

4.4(21)
40
ESP32 Night Light with LDR
ES-10Beginner
Premium

ESP32 Night Light with LDR

Night light where the LED automatically turns on in the dark and off in the light. The D0 (digital out) pin of the LDR Sensor Module is used - the dark threshold is set with the small potentiometer on the module, the module itself generates the HIGH/LOW output. ESP32 just reads this signal with digitalRead(), the code is very simple.

4.7(18)
30
Using a WS2812B LED Strip
AR-69Intermediate
Premium

Using a WS2812B LED Strip

Meet a smart LED strip where you can colour every single light on its own. The Arduino first lights the first five LEDs red, a second later turns the other five blue, then switches them all off and…

4.8(54)
70
Dot Matrix Clock and Calendar (MAX7219, DS1307)
AR-84Intermediate
Premium

Dot Matrix Clock and Calendar (MAX7219, DS1307)

A glowing board for your desk or wall that shows the time and date in scrolling text.

5.0(37)
59
Digital Clock with 4-Digit 7-Segment Display
AR-48Intermediate
Premium

Digital Clock with 4-Digit 7-Segment Display

A four-digit glowing digital clock, much like the one on a kitchen oven. The DS1302 clock module keeps the time, and every second the Arduino reads the hours and minutes and shows them on the…

4.8(56)
73