Introduction: Time Slider
A digital clock using sliding grids to show or hide the segments of the digits.
Each minute the sliders move in a synchronized manner to show the current time.
The clock is powered by an Arduino Mega and it uses a DS3231 RTC to keep the time. Each digit has two sliding grids which are affected by small stepper motors.
I designed it with Autodesk Fusion 360 and 3D printed it on a Prusa MK3S.
Step 1: Parts List
- Arduino Mega
- DS3231 Real Time Clock Module
- Eight stepper motors 28BYJ-48 with ULN2003 Driver
- 82 cm Wooden strip 19x19mm
- Steel Wire 1m
- 46 Washer head screw 4.2 x 14 mm
- 16 Button head screw and nut M4 x 10
- 18 self tapping screws M3 x 5
- Dupont Wires
- 5V power cable with DC plug 5.5x2.1mm
- Power supply 5V/2A
- Power supply for the Arduino Mega
Step 2: 3D Printed Parts
3d Printed Parts:
- One A1 - A8
- Three B1 and B2
- Two C1
- Four Digit
- Two Dot
- Four Grid
- Eight Gear
- Four L1 - L4
- Four R1 - R3
- Twenty Rackjoin
- Twenty-eight Thinjoin
- One ArduinoMount
- One DS3231Mount
- Two ULN2003Mount
I printed it in PLA. Layer height: 0.2mm, Infill 15%
I used Brim on parts A, L and R to avoid warping.
I used approximatey 2kg black, and 350g red PLA.
Attachments
Step 3: Electronic Schematics
Step 4: Assembly
- Attach the plates B1 and B2 on the body A1 - A8. Use Washer head screws.
- Attach C1 onto A1+A5 and A4+A8. Use Washer head screws.
- Install the wooden strip with Washer head screws.
- Fasten the steel wire to the wooden strip with Washer head screws. Adjust the length of the steel wire so that the clock hangs flat to the wall and does not tilt outwards.
- Glue Digit, Dot and Grid.
- Assemble L1-L4. Apply some glue to the L-pieces and attach the Rackjoin. Make sure it alligns with the rack.
- Glue on Thinjoin. Make sure the rack is perfectly straight so it will slide well in the tracks.
- Repeat above steps with R1-R3.
- Test the sliders in the tracks. Make sure they slides well. If not, fix it by sanding it. And maybe lubricate with silicone spray.
- Attach the stepper motors with M4 screws.
- Attach the gears.
- Glue Arduinomount. It is higher on one side - the Arduino Mega is mounted tilted so that the usb connector will be accessible. Place the lowest side towards the center of the clock.
- Glue ULN2003Mount and DS3231Mount.
- Mount the Arduino Mega and the ULN2003 drivers with small M3 screws.
- Attach DS3231 (snap fit).
- Connect the wires from the motors to the ULN2003 drivers.
- Connect Dupont cables between the ULN2003 drivers and the Arduino Mega as defined in the source code.
- Make a harness connector, connecting all the + pins on the ULN2003 drivers to the positive DC connector power cable. GND on the Arduino Mega and all the - pins on the ULN2003 drivers to the negative DC connector power cable.
- Connect DS3231 SDA, SCL, 5V and GND to SDA, SCL, 5V and GND on the Arduino Mega.
Step 5: Software
Arduino libraries:
If you want a 12 hour display (why would anyone want that on a digital clock) set the variable twelve_hour_mode to true
Attachments
Step 6: Operation
- Slide the grids into the tracks so that the gears engage.
- Turn on the power.
- Enjoy the show.
![Clocks Contest](https://content.instructables.com/F5O/JG85/LBQIUOIJ/F5OJG85LBQIUOIJ.jpg?auto=webp&crop=1240%2C600&frame=1&width=320)
Judges Prize in the
Clocks Contest
79 Comments
Question 18 days ago on Introduction
for me the problem is: there is to much friction, is it posible to sand some bits down
2 months ago
I can't download the library file of ds3231! Does anyone know why?
Reply 2 months ago
Have you used this link:
http://www.rinkydinkelectronics.com/download.php?f...
It is different than the library in the Arduino library manager.
Reply 2 months ago
Can I get your contact information, such as email address? I want to ask you a question! ! thank youMy connectionwweemmllg@gmail.com
Question 2 months ago on Step 4
Hallo miteinander, ich bekomme die Programme nicht auf den Arduino Mega2560 R3, bin leider totaler Laie, kann mir da jemand helfen?
LG Steffen aus CH
Answer 2 months ago
Welche Fehlermeldungen bekommst Du denn ?
Question 5 months ago
Is there anyway to add pin 13 to have it blinking every one second - I could not add it to the sketch, it will not blink!!!
I would be very grateful!
Erik hoffman
Answer 4 months ago
Any reply??????????????????????????????????????????????
Reply 3 months ago
In timeslider.ino in Setup() set pin 13 as output:
pinMode(13, OUTPUT); // sets the digital pin 13 as output
Then in class Clock introduce a variable e.g.
bool blink13 = false; // whether to light pin 13
Then in displayTime() right after "old_ms = millis();", add
blink13 = !blink13; // flip display of pin 13
digitalWrite( 13, blink13);
If things are still not working then add some Serial.print() statements, and monitor with the Arduino IDE serial monitor. N.B. I have not actually tried this.
Reply 3 months ago
Thanks for you help
I followed your instructions and now I do not have an error
I uploaded it and pin 13 LED lights up but stays on
It does not blink!
Regards
Erik
Reply 3 months ago
Thanks so much but as soon as I add
bool blink13 = false; // whether to light pin 13
I get an error
Regards
Erik
Reply 3 months ago
class Clock
unsigned long old_ms = 0;
int current_min;
bool blink13 = false; // whether to light pin 13
public:
3 months ago on Introduction
This is a fabulous design and build. Congratulations
Question 5 months ago
Can you add a pulse every second from the RTC to pin 13 please?
That would be very helpfull and surely will be appreciate!
Thanks, Erik
Answer 3 months ago
Are you sure you want to use pin 13 as an input? For most boards that is the built-in LED.
Be that how it may: Set pin 13 to input maybe in class Clock::setup():
pinmode( 13, INPUT ); // or maybe INPUT_PULLUP
In class Clock::setup() after "rtc.begin();" add
rtc.setOutput( OUTPUT_SQW );
rtc.setSQWRate( SQW_RATE_1 ); // Sets the rate for SQW to 1 Hz
In class Clock::displayTime() after "old_ms = millis();" add
Serial.print( "input pin 13 is: " );
Serial.println( digitalRead(13) );
Obviously wire the INT/SQW pin to pin 13.
Again I have not tried this partly because I don't have a DS3231.
Now if you want to get fancy, take the call to clock::loop() out of the main loop() at the bottom of the file, and set up an interrupt handler for pin 13 which would trigger on level changes, and call clock.loop() which would no longer need to keep checking millis() thousands of times a second.
7 months ago
Hans, your clock project is an impressive example of functional art! I'm adding this to my "Make It" queue. I have an Arduino Mega 2560 reserved for it. I'll print and gather up the rest of the BOM and get to it. I have the will I just need the time.
Reply 5 months ago
I pushed the sketch out to the Arduino. One more step done.
I printed two parts today. I'm excited to get this fun clock built.
Reply 4 months ago
I made a parts manifest spreadsheet for this project. I'll put it in my github and share the link here for anyone interested.
Question 5 months ago
Can someone please tell me the motors sequence while powering up - Thank you so much!
Answer 5 months ago
The motors are driven up in sequence from Left to Right for a pre-determined time and they come to rest on a dead-stop. After all eight motors are 'homed' the correct time will be shown by the sliders moving down to their correct positions. I hope this helps.