Project uses a NANO ESP32 that controls 4 stepper motors to display internet time supplied by a NTP server.
Instructables: https://www.instructables.com/Sliding-Tile-Clock/
Project Overview
"Chrono-Slide" is a high-concept kinetic sculpture that bridges the gap between digital accuracy and mechanical tactility. While traditional clocks use hands or static LEDs, this device utilizes an Arduino Nano ESP32 to physically rearrange sliding tiles into digits. By fetching atomic time via Wi-Fi and translating it into precise angular steps, the clock creates an industrial, "moving-mechanism" aesthetic that is as reliable as it is visually arresting.
Technical Deep-Dive
- The ESP32-S3 & NTP Integration:
- Sub-Millisecond Accuracy: The Nano ESP32 connects to a global pool of NTP (Network Time Protocol) servers. It sends a UDP packet to port 123 and receives a 64-bit timestamp. The firmware adjusts this for local Time Zones and Daylight Savings, ensuring the mechanical display never requires manual setting.
- Asynchronous Processing: Leverage the dual-core Xtensa® LX7 to manage the Wi-Fi stack on one core while keeping the stepper pulse-timing jitter-free on the second core.
- Stepper Mechatronics (28BYJ-48):
- Discrete Positioning: The clock uses four stepper motors, each controlling an individual digit. With a 64:1 gear reduction ratio, these motors provide the high torque needed to slide the mechanical tiles smoothly.
- Open-Loop Forensics: To maintain sync without optical encoders, the software implements a "Homing Sequence" at startup, driving the tiles against a physical hard-stop to establish the absolute zero-coordinate for each digit.
- Kinematic Transformation:
- Rotation to Linear Slide: The 3D-printed chassis utilizes a rack-and-pinion or cam-based mechanism. The Arduino Calculates the exact number of steps needed (approx. 2048 steps per revolution) to shift a specific tile from hidden to visible states, creating the illusion of a digital 7-segment display made of physical plastic.
Engineering & Implementation
- The ULN2003 Driver Array:
- Stepper motors are high-current inductive loads. The ULN2003 Darlington array acts as the power stage, allowing the 3.3V logic signals from the ESP32 to switch the 5V power rail needed for the motor coils, protecting the MCU from back-EMF spikes. This is shown in the schematic above.
- Software Timing & Jitter:
- The firmware utilizes a non-blocking
millis()or timer-interrupt approach to step the motors. This ensures that all four digits can "Slide" simultaneously, creating a fluid, synchronized animation during every minute transition.
- The firmware utilizes a non-blocking
- Power Rail Isolation:
- Driving 4 steppers at once can draw over 1A of current. The project emphasizes a separate 5V power rail for the motors, with a shared Ground plain, ensuring that the ESP32’s Wi-Fi radio remains stable and free from voltage dips caused by motor actuation.
Conclusion
Chrono-Slide transforms time into a physical performance. It is a masterful example of how IoT connectivity (NTP) can be paired with classical mechatronics to create a timepiece that is both a modern tool and an artistic conversation piece.
Time in Motion: Synchronizing the physical world with the atomic clock.