Slide Clock

16,766

183

46

Introduction: Slide Clock

About: Board President at Maker Nexus a Maker Space in Sunnyvale, CA

I enjoy designing and building interesting clocks and am always looking at unique ways to display the time. This clock uses 4 vertical slides that contain the numbers. Four stepper motors position the slides so that correct time is shown in the display area of the clock.

The steppers are controlled using an Arduino Uno with a CNC Shield. It uses an Adafruit PCF8523 RTC board to keep the time. The case and mechanical aspects are all 3D printed and the slides displaying the numbers are made of wood with laser engraved numbers.

I used 3d printed rack and pinion gears mounted on the back of the wood slides to move the slides up and down. The rack and pinion system was derived from this linear motion device made by Trigubovich on Thingiverse.

Cryptic Version

I made two versions one using normal numerals and a cryptic version based up cfb70's Cryptic Calendar Instructable.

Supplies

  • Ardunio Uno
  • CNC Motor Shield
  • A4988 Motor Driver (qty 4)
  • Adafruit PCF8523 RTC
  • Steppers 28BYJ 5V (qty 4)
  • Power Connector - Barrel type
  • Pushbutton Switch (qty 2)
  • Power Supply 12v
  • Misc 3mm bolts and nuts
  • 2mm screws for RTC board (qty 2)
  • 1.5 board feet of 4/4 hardwood (I used Birdseye Maple)

Step 1: 3D Printed Parts

There are a total of 14 - 3D printed parts. I printed them using PLA on a Prusa i3 Mk3 printer.

  • Motor Carrier
  • Pinion Gears (qty 4)
  • Rack Gears (qty 7)
  • Back Cover
  • Bezel


The slide racks were too long to fit on my 3d printer bed so I broke them in half and used a dovetail joint to connect the two halves (A & B) together.

  • Rack Slide A - 500mm (qty 2)
  • Rack Slide B - 500mm (qty 2)
  • Rack Slide A - 300mm (qty 2)
  • Rack Slide B - 300mm

The STL files for the Slide Clock can be found at https://www.thingiverse.com/thing:4627764

Step 2: Preparing the CNC Stepper Motor Shield

Adding the A4988 Stepper Drivers

The CNC Stepper Motor Shield can use different kinds of stepper drivers. I'm using the Pololu A4988 Stepper Drivers. I'm driving the motors using full-steps.

Once installed be sure to set the Vref voltage to limit the current going to the motors. I set Vref to .15v

Setting the A Motor to Be Independent

The motor shield supports 4 motors, the "A" motor can be driven as a 2nd motor that mimics one of the primary X,Y, or Z motors or it can be an independent motor. For the Slide Clock it should be independent and will be controlled by D12 and D13 from the Arduino.

To make it be independent jumpers must be installed as shown in the photo above to connect the A.Stp and A.Dir pins to D12 and D13.

Stepper Motor Power

The 5V stepper motors are actually driven using 12V. This 12V supply is connected to the CNC Motor Shield motor power connector.

Powering the Arduino Uno

Power for the Arduino Uno is supplied by the 12v supply connected to the CNC Motor Shield. The Vin pin on the shield is open and not connected to a header on the shield. So a wire was connected going from the 12V positive terminal and soldered to the Vin pin on the shield as shown in the photo above.

Step 3: Stepper Motor Modifications

The 28BYJ Stepper motors are bipolar motors and have a 5-pin connector, the CNC Motor Shield is designed to drive unipolar motors and has 4-pin headers for connecting the motors. To attach the steppers directly to the shield I modified the wiring of the stepper connector. Specifically wires #2 (pink) and #3 (yellow) need to be swapped. To do so I used a small screw driver to push the tab holding the wire in the connector housing and pulled it out of the housing and swapped the two. I then put a mark on the connector to know that it had been modified.

When connecting the motor plug to the shield the red wire is not used, so I positioned the plug on the header so only pins 1-4 were connected and the red pin 5 was floating.

The Slide Clock motors are connected as follows:

X axis = Minutes Slider
Y axis = Tens of Minutes Slider
Z axis = Hours Slider
A axis = Tens of Hours Slider

Step 4: Adding RTC and Switches

Real Time Clock Connection

The Adafruit PFC8523 Real Time Clock uses I2C to communicate with the Arduino however the CNC Motor Shield does not connect to the I2C SDA and SCL pins on the Arduino. To solve for this I used two wire jumpers with pin connectors and inserted them into the SDA and SCL header positions on the Arduino board and then installed the shield on top.

Pushbutton Connections

The two pushbuttons are connected to A1 and A2 on the Arduino. The CNC Motor Shield brings these pins to a header on the edge of the shield and calls them Hold and Resume. The switches are plugged into this header.

Step 5: Schematic

Step 6: Preparing the Wood Slides

I purchased 4/4 Birdseye Maple for the slides. To get to the proper thickness I resawed the wood in half and then used a drum sander to create a uniform thickness of 3/8" (9.5mm) for all initial boards. I then did a finish sanding pass with 150 grit.

The boards where then ripped and crosscut to the dimensions below.

  • Minutes slide: 500mm x 40mm x 9.5mm
  • Tens of Minutes slide: 300mm x 40mm x 9.5mm
  • Hours slide: 500mm x 40mm x 9.5mm (same as minutes)
  • Tens of Hours slide: 150mm x 40mm x 9.5mm

Step 7: Laser Engraving the Numbers

Before laser engraving the slides I applied blue painters tape to the top surface of the board. This helps preventing scorching and residue on the edges of the numbers.

I used a 45W Epilog Helix Laser which has a bed size of 24" x 18". Since the minutes and hours slides are longer than 18" I rotated all of the slides 90* when engraving them. My laser settings were speed 13 and power 90.

I sanded the engraved slides with 150 and 180 grit sandpaper to prep for finishing.

A .dxf for the numbers can be found in the Github repository for this project
https://github.com/moose408/SlideClock

Finishing
After engraving I sanded the wood to 180 grit then applied Boiled Linseed Oil (BLO), waited 10 mins wiped it off and let it cure for 24 hours, I then sanded again with 180 grit and applied another coat of BLO and wiped, waited 24 hours, sanded to 180 and applied Clear Gloss Polyurethane . One it was cured I sanded through the grits from 180 to 600 to get a nice gloss finish.

Step 8: Adding Rack Gears to Wood Slides

The rack gears are added to the back of the wood slides, they are centered along the back both vertically and horizontally.

  • For the Minutes and Hours slide the two 500mm rack halves need to be connected together.
  • For the Tens of Minutes slide two of the 300mm rack halves are connected together.
  • For the Tens of Hours slide I use one of the two halves of the 300mm rack slide.

The gear teeth should be located on the right side when looking at the back of the slide.

Step 9: Assembling the Clock

Assembly is fairly straight forward. I used 3mm hex head bolts for all the assembly. The following lists the assembly steps

  1. Mount the steppers to the motor carrier
  2. Add the pinon gears to the motors, they are loose and will be held in place by the rack slide
  3. Install electronics in the back cover
    • Arduino is attached with bolts through the back and nuts to hold the board
    • RTC uses two 2mm screws into the plastic
    • Power connector is press-fit into the housing
    • Switches are installed in the two holes provided.
  4. The back cover has a dovetail joint that attaches to the back of the motor carrier, one side flexes to allow the both sides to engage with the dovetails. 3mm bolts are screwed in from the front to secure the back cover.
  5. Add the bezel
  6. The number slides are placed in the slots and rest on the edge of the spur gears. They will engage when power is applied to the clock.

There are keyhole slots on the back cover to hang the clock on a wall. The STL files include an optional L-bracket that can be used to attach the clock to a table or workbench for testing.

Step 10: Software

The source code is found on GitHub at https://github.com/moose408/SlideClock

Libraries

The Slide Clock uses the SpeedyStepper library by Stan Reifel which can be found at
https://github.com/Stan-Reifel/SpeedyStepper

I originally tried to use the AccelStepper library as it seems to be what a lot of people use. It worked fine for a single stepper but when I tried to move all four steppers at the same time it slowed to a crawl. So I switched to the SpeedyStepper library and was very pleased. I will be using this library for all my stepper needs going forward.

Startup

Upon startup the code looks for a keypress on the serial port.

  • If the user presses a key it will enable a debugging menu that allows manual control of all of the stepper motors.
  • If there is not activity on the serial port the software initializes the clock by homing the slides and then displays the current time.

Homing the Slides

When using stepper motors you need to initialize them to a "home position" so that the software knows the physical position of each slide. I originally was going to add hall effect sensors and a magnet to each slide to detect the home position. This was going to require additional electronics and after thinking about a little I realized I can just run the slide all the way to the top for the max number of steps. If the slide gets there before the max number of steps it will bounce on the spur gear and when the motors stop all the slides will be resting on the spur gear at the very top of their limit. It's a little noisy and over time might introduce wear on the spur gears, but it is infrequent enough that it should not be an issue.

Step 11: Operation

Starting the Clock

When the clock is first plugged in it will home all 4 slides and then display the current time.

Setting the Time

To set the time push and hold the blue Mode button on the bottom of the clock for 1 second. The tens of hours slider will move up and down 1/2" to indicate that it is selected. Push the yellow Select button to change the time, or push the Mode button to move to the next slide (hours). Repeat until the time has been set and then do one final push of the Mode button to start the clock.

Step 12: Conclusion

There are a lot of options that could be explored with this design. One idea is to replace the numbers with letters and use it to display 4 letter words that convey information like the weather, the stock market, or affirmations.

For example my wife wants to me to make a version that displays her work status; Busy, Free, Call, etc. This could easily be done just by swapping out the slides and changing a little software. The possibilities are endless.

Remix Contest

Second Prize in the
Remix Contest

Be the First to Share

    Recommendations

    • Sewing Challenge

      Sewing Challenge
    • Home Cooked Speed Challenge

      Home Cooked Speed Challenge
    • Audio Challenge

      Audio Challenge

    46 Comments

    0
    Knexified
    Knexified

    2 months ago

    Wow! Just wow! Very cool! How long did it take you to build this?

    0
    Moose408
    Moose408

    Reply 2 months ago

    About 2 weeks. Most of that was spent refining the 3D print designs. Coding and electronics took a day each.

    0
    Knexified
    Knexified

    Reply 2 months ago

    Wow! Could this have been done in military time as well?

    0
    Moose408
    Moose408

    Reply 2 months ago

    If you notice there is a 2 on the 10s of hours slide. You can set a flag in the software to make it use military time.

    0
    Knexified
    Knexified

    Reply 2 months ago

    Very cool! What software did you use?

    0
    mahmoudmhdali
    mahmoudmhdali

    Question 7 months ago

    Hello there i have another small question please. After multiple test, i found that my stepper motor stop when going to home position. The stepper motor turn a multiple steps the stops but keeps make the noise sound and without going to home position. The stepper was working perfectly but after multiple test he stopped and make this problem can you please help me find out what is going

    0
    Moose408
    Moose408

    Answer 7 months ago

    If it was working and then stopped it is typically not enough current on the 12v supply. If it never really worked (you had reported it going slow) then look at my answer to stephen.grattage on 3/9

    0
    mahmoudmhdali
    mahmoudmhdali

    Reply 7 months ago

    3. Confirm that there are no jumpers under the Stepper Driver boards on the CNC Motor Shield. This configures them for Full Step.

    That was my last problem btw when the steppers runs too slow but after that i faced the problem that my steppers stop after half way. I checked my power supply it gives 12V and i am using 5V steppers. When i putted the speed and acceleration to 1400 all is good now.

    0
    stephen.grattage
    stephen.grattage

    7 months ago

    Hi there I have a slide clock on build. I have set the Vref voltages to 0.15 and modified the motor connections but my motors only do a quarter turn in either direction. I can hear the drivers working but the motors won’t turn and more than a quarter, think it’s when there instructed to go full speed they stop. Have you got any ideas why this would happen? Thanks

    0
    Moose408
    Moose408

    Reply 7 months ago

    1. Check that you are using 5V steppers. This stepper is offered in both 5V and 12V versions. You want the 5V version even though there are driven at 12V.

    2. Confirm you are supplying 12V to the CNC Motor Shield.

    3. Confirm that there are no jumpers under the Stepper Driver boards on the CNC Motor Shield. This configures them for Full Step.

    4. Confirm you correctly rewired the stepper motors and that connector is plugged in so the 5th position (red wire) is not connected.

    5. There is code in SlideClock.ino that will allow you to individually control each motor and the number of steps using the serial terminal. Press a key on a the serial terminal during startup and select the 'k - keypad control' option. This may help you debug the issue.

    0
    stephen.grattage
    stephen.grattage

    Reply 7 months ago

    Thank you for your help my steppers are 12v everything else is ok I’ll order some 5v ones. Really appreciate your help thank you.

    0
    mahmoudmhdali
    mahmoudmhdali

    Reply 7 months ago

    I have the same problem i tried to go down with the speed configuration in stepper.h filei putted the
    MAXSPEED=1200
    ACCELERATION=1200
    try this and continue your work till Moose408 confirm this.

    0
    mahmoudmhdali
    mahmoudmhdali

    Question 7 months ago

    Hi dear,
    First of all excellent work and thank you for sharing it.
    I am currently working on this project.
    1- My stepper motor is too slow is it normal? Should i debug any variable to let the motor run faster?
    2- Should i debug the "Number of absolute steps from home" because it is not accurate at all.
    Thank you for you cooperation.

    0
    Moose408
    Moose408

    Answer 7 months ago

    My guess is you didn't correctly perform step #3 to convert the steppers from bipolar to unipolar. Incorrect wiring there or not plugging it correctly into the shield will result in missed steps that will cause it to run slow and not be accurate. So double check the wiring (note, the colors of your wires may be different than in the instructions, check with a meter to determine the correct wires). There are a lot of resources online for checking the wiring. Here's one https://hackaday.com/2019/07/25/deducing-stepper-motor-wiring/

    0
    mahmoudmhdali
    mahmoudmhdali

    Reply 7 months ago

    Thank you sooo much for your help. I will try them tomorrow. Thank you again for your cooperation.

    0
    AndyF47
    AndyF47

    Tip 10 months ago

    I'm in the process of building this clock right now - super excited! I found that the 2 halves of the 500mm racks don't quite fit on my Ender 3 Pro. If you print the parts at 99.64% (as sliced in Cura), they print just fine and still work with the gears and the board they slide in. It's such a slight size change, but just enough for it to fit on the bed (on a 45-degree angle). Thanks again for the awesome design!

    0
    Moose408
    Moose408

    Reply 10 months ago

    Good to know and glad to know that is still slides well. Let me know if you need any help.

    0
    AndyF47
    AndyF47

    Reply 10 months ago

    Thanks! I've got the clock up on the wall and its works really well overall. My calibration doesn't seem to be quite right as the slides get further and further off as the clock runs over time. I woke up one morning to the minute slider on the floor. Anyway, I've started a fork of the code which works to address this - I've added a "night mode" which stops the clock from running between 11pm - 9am, then it recalibrates the clock at 9am (and again at 4pm). We'll see if those 2 additional calibrations throughout the day resolve the issue.

    I also designed mine with printed numbers (instead of the laser engraving). I absolutely love it - thanks for the amazing design!

    IMG_2121.jpeg
    0
    mahmoudmhdali
    mahmoudmhdali

    Reply 8 months ago

    Hi can you please share stl files for the numbers or send them to me pleaseeee.
    Mahmoudmhdali@gmail.com
    Thank you for your cooperation. Excelent work.