Build it step by step
0 of 8 doneCut and test the strip
Light 60 pixels in a short test.
Build the frame
Make a ring frame with the mirror at the back.
Mount the pixels
Face them inward or forward, evenly spaced.
Add the front mirror
Fit the two-way film in front.
Fill in Wi-Fi
Replace the placeholders.
Upload and orient
Rotate the ring so pixel 0 is at the top.
Check the hands
Compare with your phone clock.
Dim at night
Check the brightness change at 22:00.
How do you build an infinity mirror clock?
A ring of LEDs between a mirror and a two-way mirror makes an endless tunnel, with hands shown in colour. You need ESP32 DevKit V1, WS2812B strip 5 m (30 LEDs/m), 5 V 2 A USB adapter, Resistor 330 Ω and Electrolytic capacitor 1000 µF. It takes 8 steps and about 240 minutes.
- Level
- Intermediate
- Time
- About 240 min
- Parts
- 5
Parts list
- Development BoardsBuyESP32 DevKit V1 × 1
- OptoelectronicsBuyCut 60 LEDs
- PowerBuy
- 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 |
Code
Cut 60 pixels from the strip and stick them in a ring just inside a frame with the LEDs facing forward. Behind the LEDs goes a normal mirror and in front a two-way (one-way) mirror film on glass or acrylic, spaced about 2 to 3 cm apart; the light bounces between them and seems to run into an endless tunnel. The hands are single coloured pixels: red for the hour, green for the minute and blue for the second, and where they overlap the later one wins. The code dims the ring at night, and it uses internet time so no hands need setting. At the 60 brightness cap the ring stays within a 2 A supply. Take care when cutting and bending acrylic and glass. 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. 60 LEDs in a ring, LED 0 at the 12 o'clock position.
#include <WiFi.h>
#include <time.h>
#include <Adafruit_NeoPixel.h>
const char* WIFI_SSID = "YOUR_WIFI_NAME";
const char* WIFI_PASS = "YOUR_WIFI_PASSWORD";
Adafruit_NeoPixel ring(60, 5, NEO_GRB + NEO_KHZ800);
void setup() {
ring.begin();
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) {
int h = tm->tm_hour, m = tm->tm_min, s = tm->tm_sec;
bool night = (h >= 22 || h < 6);
ring.setBrightness(night ? 8 : 60); // dim at night
ring.clear();
ring.setPixelColor((h % 12) * 5 + m / 12, ring.Color(255, 0, 0)); // hour hand, red
ring.setPixelColor(m, ring.Color(0, 255, 0)); // minute hand, green
uint32_t cs = ring.Color(0, 0, 120);
ring.setPixelColor(s, cs); // second dot, blue
ring.setPixelColor((s + 59) % 60, ring.Color(0, 0, 30)); // short tail
ring.show();
}
delay(100);
}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Hands in the right place | Match the phone time |
| Second dot | Moves once a second |
| At 22:00 | Ring dims |
| Tunnel effect | Several reflections look like an endless depth |
If it does not work
Time off by hours
Change the offset in configTime.
No tunnel
Check the mirror spacing and that the front is a two-way mirror.
Colours wrong
Try NEO_RGB.
Flicker
Check the ground and the capacitor.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the infinity mirror clock?
ESP32 DevKit V1, WS2812B strip 5 m (30 LEDs/m), 5 V 2 A USB adapter, Resistor 330 Ω and Electrolytic capacitor 1000 µF. WS2812B strip 5 m (30 LEDs/m): Cut 60 LEDs.
How long does the infinity mirror clock take to build?
About 240 minutes for a intermediate maker, in 8 steps.
How do I know the infinity mirror clock works?
Hands in the right place: Match the phone time. Second dot: Moves once a second. At 22:00: Ring dims.
Time off by hours: what should I check?
Change the offset in configTime.
No tunnel: what should I check?
Check the mirror spacing and that the front is a two-way mirror.
Colours wrong: what should I check?
Try NEO_RGB.
Flicker: what should I check?
Check the ground and the capacitor.
