LED clock
A clock made of glowing ping-pong balls. Each ball hides an addressable LED, and the time lights up in big, easy-to-read digits, with a knob for brightness and a button that cycles through themed color modes.
- Status
- Finished, and on my wall
- Based on
- The Instructables "Ping Pong Ball LED Clock", heavily modified
- Controller
- Arduino Nano
- Display
- 128 WS2812B LEDs, one behind each ping-pong ball
- Timekeeping
- DS3231 real-time clock module
- Controls
- Five buttons and a brightness dial
- Size
- About 80 cm (31.5 in) wide, frameless
- Programmed in
- C++ (Arduino) with the Adafruit NeoPixel library
- Skills
- Arduino and C++, addressable LEDs (WS2812B), real-time clock (I2C), soldering, debugging and refactoring code, AI-assisted development, CAD and 3D printing
The goal
I first built this during Covid, from an Instructables guide, the Ping Pong Ball LED Clock. I set out to follow the directions, and by the end I'd made it my own.
How it works
Behind 128 ping-pong balls sits a WS2812B LED strip, cut into short runs that snake back and forth behind the rows, one LED per ball. Each digit is drawn with 12 balls, with four digits and a colon across the middle. I left mine frameless. An Arduino Nano drives the LEDs, and a DS3231 real-time clock module keeps the time. A 5 V supply powers the LEDs directly, rather than through the Arduino.

The electronics live on two 5 × 7 cm boards: one for the Nano and the DS3231, and one for the buttons, joined by a pluggable cable. Both sit in an open-top box I designed and 3D printed, and a printed surface-mount box glued to the back holds the power plug.



The modes
One button cycles through the themes:
- A fade through every color, at three different speeds
- Red and green, for Christmas
- Orange, for Halloween or as a late-night lamp
- Plain white, for daytime office use
This was my first project coding with AI: I used Claude to add the modes, the buttons and the brightness control.
Key decisions
- Easier-to-read digits. I restyled the numbers to make them easier to read.
- Controls on the clock itself. Five buttons and a dial handle the time, the brightness and the modes, so I never have to take it off the wall again (see below).
- Printed mounts. A box I designed holds both circuit boards, and another keeps the power plug neat on the back.
Problems and fixes
- I wired the LED strips backward. The guide runs the first strip down, the next one up and so on, alternating. I wasn't paying attention and started with one going up, then down. Because the strips aren't all the same length, there was no quick and easy fix, so I rewrote most of the code to map each digit onto my wiring.
- A clock I couldn't adjust. Even after the digits worked, any change meant taking the whole thing off the wall and plugging it into my computer, even just for daylight saving time. It was also always too bright in the evening or too dim during the day. So it came down for a couple of years. When I came back to it, I added buttons to set the time and a dial for the brightness, and it's been on the wall ever since.
Results
It's finished and has been hanging on my wall for months. Daylight saving time is now a few button presses instead of a trip to my computer.
What's next
- Save the clock battery. The on/off switch sits on the power line before the power supply, so whenever the clock is off, the DS3231 runs on its backup battery. I've replaced several batteries so far, so I plan to move the switch to cut power to the LED strips instead.
- What I'd do differently: if I'd known from the start that I wanted five buttons and a dial, I'd have put everything on a single 7 × 9 cm board and built a case around it, instead of two boards and a cable.


