Hacked Gadgets Forum

October 21, 2009

Gear Clock – PIC 16F628A Based

at 4:46 am. Filed under Cool Gadgets, DIY Hacks, Electronic Hacks, What Were They Thinking


Here is my latest creation, it’s a Gear Clock. It consists of a bunch of wooden gears, a PIC microcontroller and a stepper motor. The heart of the clock is a PIC 16f628A microcontroller. This microcontroller has an internal oscillator however an external 20MHz crystal oscillator is being used since it will have to accurately keep track of time for weeks and months. The microcontroller is interfaced to two buttons and one motor.

The gear arrangement is as follows:

  • 9 tooth motor gear
  • 72 tooth minute gear with a 24 tooth secondary
  • 72 tooth intermediate gear with a 18 tooth secondary
  • 72 tooth hour gear

To achieve the correct timing the 9 tooth motor gear is advanced 4 steps every 9 seconds. By moving 4 steps at a time the motor routines can be simple since the motor is always at rest with the same coil energized.

Read more about the gear clock here.