The White Clawck
Have you ever needed a discrete clock for a variety of purposes? Maybe a fun egg timer? Or a themed Happy hour clock? Introducing the White Clawck!
Supplies
28BYJ-48 Stepper Motor
ULN2003 Motor Driver
Arduino nano
Plywood
Can opener
Knife/scissors
Paper Towel
Empty the Can
Find a seltzer or celsius sized can, and empty the contents. Don't worry about drying it yet, as we will remove the top.
Remove the Top and Prep for the Motor
Use a can opener to open the top of the can and stuff with a paper towel, making sure to dry out completely. Use pair of scissors to open up the center of the top. Enough to fit the hub, but not too big to keep it discrete. Cut a slit in the tab, large enough to friction fit onto the motor hub.
Cut the Plywood
Use whatever means are at your disposal to cut two circular sections of plywood the circumference of the can. I used a drill press. Shave down the two sides of one circle to run wires behind. Trace your motor on the shaved wood circle to "mount" it. Try to alight the hub of the motor to the center of the wood circle.
Arduino Set Up
For this portion, I mixed two projects I had found prior.
The following has the setup of the arduino system and how it should be wired. I had bad connections on pins 8-11 for the motor so I switched to 4-7
https://www.instructables.com/3D-Printed-Arduino-Clock-With-28BYJ-48-Stepper-Mot/
This one has the code used for my clock, with certain edits.
https://projecthub.arduino.cc/garysat/arduino-nano-stepper-motor-clock-cf87c2
/*
Created 30 Nov. 2009
by Tom Igoe
*/
#include <Stepper.h>
const int stepsPerRevolution = 200;
\\I used pins 4,5,6,7 instead of 8,9,10,11
Stepper myStepper(stepsPerRevolution, 8,9,10,11);
int stepCount = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
// step one step:
myStepper.step(1);
Serial.print("steps:" );
Serial.println(stepCount);
stepCount++;
delay(1800);
}
This last delay variable is what determines the speed of the clock. 1800 is for hour intervals, 30 for minute, or 21600 for 12 hour intervals. I used it as a happy hour timer, so 1800 works for me. The pin correction is noted as well.
Filling the Can
I stuffed dry paper towel into the bottom of the can, and chased it with the full circle of wood. Setting the Arduino flat, I marked and cut a hole in the can to connect a cord. Note: This could do with an internal battery, but I chose to do a cord for simplicities sake.
Finishing Up
Finish putting the arduino bits in the can and top it with the motor mounted to the wood. Push in the can at the base of the top wood part to hold it in place (Or glue or screw or a more permanent way to secure the motor) Lay the lid on top and friction fit the tab to the motor. Plug in and done! This can run at minute, hour, half day, day intervals depending on what code is running. Credits to the original authors garysat on arduino hub and MertArduino here on instructables