Build it step by step
0 of 8 donePlan the layout
Draw four digits with the segment letters and the wiring path.
Build the housings
Print or cut segment channels and put three pixels in each.
Wire the strip
Keep the order a to g in each digit.
Test a digit
Light segments one at a time to check the order.
Fill in Wi-Fi
Replace the placeholders.
Upload
Check the time shows correctly.
Check the colour change
Colours step each hour.
Mount
Hang it with a diffuser over each segment.
How do you build a giant 7-segment wall clock?
LED strip segments in 3D printed housings make a clock with digits 20 cm tall. You need ESP32 DevKit V1, WS2812B strip 5 m (30 LEDs/m), DS3231 RTC module, 5 V 2 A USB adapter, Resistor 330 Ω and Electrolytic capacitor 1000 µF. It takes 8 steps and about 360 minutes.
- Level
- Intermediate
- Time
- About 360 min
- Parts
- 6
Parts list
- Development BoardsBuyESP32 DevKit V1 × 1
- OptoelectronicsBuy
- SensorsBuy
- PowerBuyUse 5 V 3 A
- PassivesBuyResistor 330 Ω × 1
- PassivesBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| 5 V supply + | Strip + and the 1000 µF capacitor + | Strip power |
| 5 V supply - | Strip - and capacitor - and ESP32 GND | Common ground |
| 5 V supply + | ESP32 VIN | Power the ESP32 |
| ESP32 GPIO5 | 330 Ω resistor then strip DIN | Data line |
| DS3231 SDA and SCL | ESP32 GPIO21 and GPIO22 | Backup clock |
| DS3231 VCC and GND | ESP32 3V3 and GND | Power |
Code
Each digit is seven segments, and each segment has three pixels lit together. The wiring runs serially: digit 1, digit 2, the two colon pixels, digit 3, digit 4, with the segments in each digit ordered a (top), b (top right), c (bottom right), d (bottom), e (bottom left), f (top left), g (middle). If your strip snakes differently, change the order of the segment loop. The time comes from the internet, and the DS3231 is wired as a backup that you can read with the RTClib example if the network is down. At brightness 70 of 255 the 86 pixels draw under 2 A, within a 3 A supply. Feed power at both ends of the strip if colours fade to orange at the end. Arduino IDE with the ESP32 boards package, board "ESP32 Dev Module".
Runs on a virtual ESP32 Dev Module in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
// Library: Adafruit NeoPixel. 4 digits, 7 segments each, 3 LEDs per segment, plus 2 colon LEDs.
// Strip order: digit 1, digit 2, colon, digit 3, digit 4. Within a digit the segments run a, b, c, d, e, f, g.
#include <WiFi.h>
#include <time.h>
#include <Adafruit_NeoPixel.h>
const char* WIFI_SSID = "YOUR_WIFI_NAME";
const char* WIFI_PASS = "YOUR_WIFI_PASSWORD";
const byte PER_SEG = 3;
const int DIGIT_LEDS = 7 * PER_SEG; // 21
const int TOTAL = 4 * DIGIT_LEDS + 2; // 86
Adafruit_NeoPixel strip(TOTAL, 5, NEO_GRB + NEO_KHZ800);
// Segments on for each digit 0 to 9, as bits a to g (bit 0 is a)
const byte DIGITS[10] = {0b0111111, 0b0000110, 0b1011011, 0b1001111, 0b1100110, 0b1101101, 0b1111101, 0b0000111, 0b1111111, 0b1101111};
int digitStart(int d) { return (d < 2) ? d * DIGIT_LEDS : 2 * DIGIT_LEDS + 2 + (d - 2) * DIGIT_LEDS; }
void drawDigit(int d, int value, uint32_t colour) {
byte mask = DIGITS[value];
int base = digitStart(d);
for (byte seg = 0; seg < 7; seg++)
for (byte k = 0; k < PER_SEG; k++)
strip.setPixelColor(base + seg * PER_SEG + k, (mask >> seg) & 1 ? colour : 0);
}
void setup() {
strip.begin();
strip.setBrightness(70); // capped to keep the supply cool
WiFi.begin(WIFI_SSID, WIFI_PASS);
unsigned long t = millis();
while (WiFi.status() != WL_CONNECTED && millis() - t < 15000) delay(300);
configTime(19800, 0, "pool.ntp.org"); // India time, change for yours
}
void loop() {
time_t now = time(nullptr);
struct tm* tm = localtime(&now);
if (tm->tm_year > 100) {
uint32_t colour = strip.ColorHSV(tm->tm_hour * 2700, 255, 255); // a new colour each hour
int h = tm->tm_hour, m = tm->tm_min;
drawDigit(0, h / 10, colour); drawDigit(1, h % 10, colour);
drawDigit(2, m / 10, colour); drawDigit(3, m % 10, colour);
uint32_t dot = (tm->tm_sec % 2) ? colour : 0; // blinking colon
strip.setPixelColor(2 * DIGIT_LEDS, dot); strip.setPixelColor(2 * DIGIT_LEDS + 1, dot);
strip.show();
}
delay(200);
}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Each segment test | Lights in the order a to g |
| Time shown | Matches your phone |
| Colon | Blinks once a second |
| Hour changes | New colour |
If it does not work
Wrong segments light
Change the segment order or the DIGITS table.
Dim far end
Add power at the other end.
No time
Check Wi-Fi and NTP, or read the RTC.
Flicker
Check the capacitor and the ground connection.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the giant 7-segment wall clock?
ESP32 DevKit V1, WS2812B strip 5 m (30 LEDs/m), DS3231 RTC module, 5 V 2 A USB adapter, Resistor 330 Ω and Electrolytic capacitor 1000 µF. 5 V 2 A USB adapter: Use 5 V 3 A.
How long does the giant 7-segment wall clock take to build?
About 360 minutes for a intermediate maker, in 8 steps.
How do I know the giant 7-segment wall clock works?
Each segment test: Lights in the order a to g. Time shown: Matches your phone. Colon: Blinks once a second.
Wrong segments light: what should I check?
Change the segment order or the DIGITS table.
Dim far end: what should I check?
Add power at the other end.
No time: what should I check?
Check Wi-Fi and NTP, or read the RTC.
Flicker: what should I check?
Check the capacitor and the ground connection.
