John Bradnam
Published © GPL3+

Gear Clock

A 3D printed clock driven by a single stepper motor using gears to separate hours, minutes and seconds.

IntermediateFull instructions provided16 hours1,530
Gear Clock

Things used in this project

Hardware components

Microchip ATtiny1614
×1
AO3400 N-Channel MOSFET
SOT-23 package
×4
0805 Passive Components
3 x 1K OHM, 3 x 10K OHM, 1 x 0.1uF
×1
1N4148 – General Purpose Fast Switching
1N4148 – General Purpose Fast Switching
SOD-323 package
×4
Mini USB socket
Surface Mount
×1
Stepper Motor
Digilent Stepper Motor
28BYJ-48 (5V)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Custom parts and enclosures

STL Files

STL files for 3D Printer (0.2mm layer height, 20% infill)

Schematics

Schematic

PCB

Eagle Files

Schematic and PCB in Eagle format

Code

GearClockV1.ino

C/C++
/**
 * GEAR CLOCK V1
 * 
 * 2021-03-11 Software by Tokyo_Bird (https://www.thingiverse.com/thing:4790311)
 * 2021-03-16 John Bradnam (jbrad2089@gmail.com)
 *    - Changed hardware from Arduino Nano to ATtiny1614
 *    - Replaced ULN2003A wih 4 N-Channel MOSFETs
 * 
 * ATTiny1614 Pins mapped to Ardunio Pins
 *
 *             +--------+
 *         VCC + 1   14 + GND
 * (SS)  0 PA4 + 2   13 + PA3 10 (SCK)
 *       1 PA5 + 3   12 + PA2 9  (MISO)
 * (DAC) 2 PA6 + 4   11 + PA1 8  (MOSI)
 *       3 PA7 + 5   10 + PA0 11 (UPDI)
 * (RXD) 4 PB3 + 6    9 + PB0 7  (SCL)
 * (TXD) 5 PB2 + 7    8 + PB1 6  (SDA)
 *             +--------+
 *             
 * BOARD: ATtiny1614/1604/814/804/414/404/214/204
 * Chip: ATtiny1614
 * Clock Speed: 20MHz
 * Programmer: jtag2updi (megaTinyCore)
*/

#include <Stepper.h>

#define IN_1 0 //PA4
#define IN_2 1 //PA5
#define IN_3 2 //PA6
#define IN_4 3 //PA7

#define MOTOR_STEPS 2048 

Stepper myStepper(MOTOR_STEPS, IN_1, IN_3, IN_2, IN_4);

//---------------------------------------------------------------------
//Set up clock
void setup() 
{
  myStepper.setSpeed(1);
}

//---------------------------------------------------------------------
//Main program loop
void loop() 
{ 
  myStepper.step(2048);
}

Credits

John Bradnam

John Bradnam

141 projects • 167 followers
Thanks to Tokyo_Bird.

Comments