Make a "hollow clock" with Arduino (only hands, no dial)
▲ For more exciting content, please click on the blue words above and follow us!
Let's see how to use Arduino to make a "hollow clock" with only hands but no dial.
It still looks pretty cool. Here are a few pictures made by netizens referring to the tutorial:
Step 0: Material Preparation
-
Stepper motor 28BYJ-48 and driver board included
-
A microcontroller (such as an Arduino nano) to control the stepper motors
-
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.
Step 1: Print the Parts
-
Printing Parts
-
Some parts need support
-
Deburr the gears well, especially the very small ones (the worm and pinion in the center of the clock)
Step 2: Assemble the Worm Drive System
-
Plastic welding with a soldering iron is useful for connecting plastics to each other.
gear.stl
axis.stl
worm-gear.stl
-
You can also use some safe glue, such as two-component epoxy glue.
-
Inject a little grease into the center gear. Not only will it reduce friction, but it will also reduce backlash.
-
The backlash of the central gear greatly affects the accuracy of the clock. h-gear1.1x.stl is a bit bigger than the original h-gear.stl to suppress the backlash. The backlash of the central gear greatly affects the accuracy of the clock. Choose the better pinion from the two candidates. A bit bigger than the original .
h-gear1.1x.stl
h-gear.stl
Step 3: Assemble the Motor Driver
-
If the head of the 2mm self-tapping screw is smaller than the hole for the stepper motor, use a washer or change to a larger screw.
Step 4: Meshing the Minute Rotator and the Body of the Clock
-
To prevent the gear from falling off, we can flip one side of the fuselage (the green part in the picture above) and hook the top hook.
-
Three self-tapping screws are required to install the minute cover.
Step 5: Install the Hour Hand
-
Be careful not to overtighten the self-tapping screws when installing the hour hand. It should slide when you adjust the clock.
-
Fix the other parts
Step 6: Prepare the Circuit
-
Connect ports 4, 5, 6, and 7 of the Nano to the stepper motor drivers
-
Connect VCC (+5V) and GND
If you want to enclose the entire circuit and put it in a box, you can print the parts to make a box (the relevant files are at the end of the article).
Then assemble it with two 2mm self-tapping screws.
Step 7: Procedure
Flash the code to the Arduino. Upload the code to the Arduino IDE.
If your motors are running in the wrong direction, change the order of the numbers in the code:
int port[4] = {4, 5, 6, 7};
Change to
int port[4] = {7, 6, 5, 4};
The numbers here correspond to the pins on 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: Testing and Adjusting
-
Since the gear train has a certain amount of backlash, the position of the hour hand will be offset to the left and right. To solve this problem, some soft material, such as felt or sponge, can be inserted there to provide a little friction.
-
Paint the pointer to improve visibility. Pigment-based paint is better than dye-based ink, which will have capillary diffusion phenomenon.
Step 9: Adjust the Time
-
Use the Nano's reset button to set the time one minute earlier
-
While the motor is rotating, use the reset button to make fine adjustments.
-
The hour hand can be adjusted directly by hand (by friction)
Step 10: Smaller Version (Optional)
-
For smaller 3D printers (such as Prusa mini, 180x180cm), the author also prepared an 85% scaled version.
Source: https://www.instructables.com/Hollow-Clock-3/ Author: shiura
Add WeChat and reply " join group"
Invite you to join the technical exchange group!
Domestic chips|Automotive electronics|Internet of Things|New energy|Power supply|Industry|Embedded...
Reply to any content you want to search in
the
official
, such as problem keywords, technical terms, bug codes, etc.,
and you can easily get relevant professional technical content feedback
. Go and try it!
If you want to see our articles more often, you can go to our homepage, click the "three dots" in the upper right corner of the screen, and click "Set as Star".
Welcome to scan the QR code to follow us
Featured Posts