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