Build A Hollow Clock With Arduino

【Click on the above「Blue Text」 to follow DF Maker Community and become a tech aesthetics enthusiast】

Build A Hollow Clock With Arduino

Build A Hollow Clock With Arduino

Happy Dragon Boat Festival to everyone!

This week we will look at how to make a “hollow clock” with only hands and no dial using Arduino.

It looks pretty cool. Let’s enjoy a few pictures shared by netizens who followed this tutorial:

Build A Hollow Clock With Arduino
Build A Hollow Clock With Arduino
▲ Video Demonstration

Materials Preparation

  • 28BYJ-48 stepper motor and driver board
  • Microcontroller to control the stepper motor (like Arduino Nano)
  • 2mm x 10mm self-tapping screws * 8
  • Grease (high viscosity)

This clock can be printed with most common 200 x 200mm printers, except for the decorative part (index.stl, 203 x 203mm).

There is also a smaller version (85%) at the end of the article.

All relevant STL files can be downloaded at the end of the article.

Step 1: Print Parts

Build A Hollow Clock With Arduino
  • Print the parts
  • Some parts require support
  • Deburr carefully, especially the very small gears (the worm gear and small gear at the center of the clock)

Related STL files can be downloaded at the end of the article.

Step 2: Assemble the Worm Gear Drive System

Build A Hollow Clock With Arduino
  • Use a soldering iron for plastic welding to connect<span>gear.stl</span>, <span>axis.stl</span>, and <span>worm-gear.stl</span> together.
  • You can also use some safe glue, such as two-component epoxy.
  • Inject a little grease into the central gear. It not only reduces friction but also minimizes backlash.
  • The backlash of the central gear greatly affects the clock’s accuracy. <span>h-gear1.1x.stl</span> is slightly larger than the original <span>h-gear.stl</span> to suppress backlash. Choose the better small gear from the two candidates.

Step 3: Assemble the Motor Driver

Build A Hollow Clock With Arduino
  • If the head of the 2mm self-tapping screw is smaller than the hole of the stepper motor, please use a washer or replace it with a larger screw.

Step 4: Engage the Minute Rotor and the Clock Body

Build A Hollow Clock With Arduino
  • To prevent gears from falling off, we can flip one side of the body (the green part in the above image) and hook the top.
  • Three self-tapping screws are needed to install the minute cover.

Step 5: Install the Hour Hand

Build A Hollow Clock With Arduino
  • Be careful not to tighten the self-tapping screws too much when installing the hour hand; it should be able to slide when you adjust the clock.
  • Secure the other parts.

Step 6: Prepare the Circuit

Build A Hollow Clock With Arduino
Build A Hollow Clock With Arduino
Build A Hollow Clock With Arduino
Build A Hollow Clock With Arduino
  • Connect ports 4, 5, 6, and 7 of the Nano to the stepper motor driver.
  • Connect VCC (+5V) and GND.

If you want to enclose the entire circuit in a box, you can print parts to make a box (relevant files are at the end).

Then assemble it with two 2mm self-tapping screws.

Step 7: Program

Flash the code onto the Arduino. Upload the code to the Arduino IDE.

If your motor runs in the wrong direction, modify the order of the numbers in the code:

int port[4] = {4, 5, 6, 7};

Change it to

int port[4] = {7, 6, 5, 4};

The above numbers are related to the pins of the Arduino Nano (D4-D7).

The complete code is as follows:

// Please tune the following value if the clock gains or loses.
// Theoretically, standard of this value is 60000.
#define MILLIS_PER_MIN 60000 // milliseconds per a minute

// Motor and clock parameters
// 4096 * 110 / 8 = 56320
#define STEPS_PER_ROTATION 56320 // steps for a full turn of minute rotor

// wait for a single step of stepper
int delaytime = 2;

// ports used to control the stepper motor
// if your motor rotate to the opposite direction, 
// change the order as {4, 5, 6, 7};
int port[4] = {4, 5, 6, 7};

// sequence of stepper motor control
int seq[8][4] = {
  {  LOW, HIGH, HIGH,  LOW},
  {  LOW,  LOW, HIGH,  LOW},
  {  LOW,  LOW, HIGH, HIGH},
  {  LOW,  LOW,  LOW, HIGH},
  { HIGH,  LOW,  LOW, HIGH},
  { HIGH,  LOW,  LOW,  LOW},
  { HIGH, HIGH,  LOW,  LOW},
  {  LOW, HIGH,  LOW,  LOW}
};

void rotate(int step) {
  static int phase = 0;
  int i, j;
  int delta = (step > 0) ? 1 : 7;
  int dt = 20;

  step = (step > 0) ? step : -step;
  for(j = 0; j < step; j++) {
    phase = (phase + delta) % 8;
    for(i = 0; i < 4; i++) {
      digitalWrite(port[i], seq[phase][i]);
    }
    delay(dt);
    if(dt > delaytime) dt--;
  }
  // power cut
  for(i = 0; i < 4; i++) {
    digitalWrite(port[i], LOW);
  }
}
void setup() {
  pinMode(port[0], OUTPUT);
  pinMode(port[1], OUTPUT);
  pinMode(port[2], OUTPUT);
  pinMode(port[3], OUTPUT);
  rotate(-20); // for approach run
  rotate(20); // approach run without heavy load
  rotate(STEPS_PER_ROTATION / 60);
}

void loop() {
  static long prev_min = 0, prev_pos = 0;
  long min;
  static long pos;
  
  min = millis() / MILLIS_PER_MIN;
  if(prev_min == min) {
    return;
  }
  prev_min = min;
  pos = (STEPS_PER_ROTATION * min) / 60;
  rotate(-20); // for approach run
  rotate(20); // approach run without heavy load
  rotate(pos - prev_pos);
  prev_pos = pos;
}

Step 8: Test and Adjust

Build A Hollow Clock With Arduino
  • Due to the backlash of the gear set, the position of the hour hand may deviate to the left or right. To solve this problem, you can insert some soft material, like felt or sponge, to provide some friction.
  • Painting the hands can improve visibility. Pigment-based paint is better than dye-based inks, which tend to have capillary diffusion.

You can also find some useful information in the comments at<span>https://www.thingiverse.com/thing:5142739</span>.

Step 9: Adjust Time

  • Use the reset button on the Nano to set the time ahead by one minute
  • While the motor is rotating, use the reset button for fine-tuning
  • The hour hand can be adjusted directly by hand (by friction)

Step 10: Smaller Version (Optional)

Build A Hollow Clock With Arduino
  • For smaller 3D printers (like Prusa mini, 180x180cm), the author has also prepared an 85% scaled version.

The STL files are also packaged and placed in the link below.

Original link: https://www.instructables.com/Hollow-Clock-3/

Original project author: shiura

Translation first published: DF Maker Community

Open source project, please be sure to indicate the project source and original author information when reprinting

Hardware Arsenal

Click to learn more👆

If you have anything to say or corrections regarding the article translation, please feel free to leave a message below!

All materials related to the project can be downloaded in the following ways:

1. You can click on “Read the Original” to download in the community forum!

2. You can reply in the public account backend withHollow Clock” to obtain the download file!

(Note: For previous projects, if the link is invalid, you can also search for the relevant project name in our community forummc.dfrobot.com.cnfor free download)

Clock Series Review

▼ Replica of Casio F-91W! But I’m bigger.

Build A Hollow Clock With Arduino

Click to read👆

▼ Use ESP32 with VFD display to make a simple network clock

Build A Hollow Clock With Arduino

Click to read👆

▼ ESPnixie – An ESP32-based Nixie Clock

Build A Hollow Clock With Arduino

Click to read👆

▼ Kindle “Same Model”! An ESP32-based E-ink Calendar

Build A Hollow Clock With Arduino

Click to read👆

Leave a Comment