You can use a microcontroller to build a clock. After all, a clock is just something that counts the passage of time. The only problem is that microcontrollers can’t track time very accurately. They need some kind of external timing source that doesn’t drift as much as the microcontroller’s primary clock oscillator. To that end, [Josh] wanted to try using a rather famous IC with his Arduino to build a viable timepiece.
[Josh]’s idea was straightforward—employ a 555 timer IC to generate a square wave at 1 Hz. He set up an Arduino Uno to count the pulses using edge detection. This allowed for a reliable count which would serve as the timebase for a simple 24-hour clock. The time was then displayed on an OLED display attached over I2C, while raw pulses from the 555 were counted on a 7-segment display as a useful debugging measure. Setting the time is easy, with a few pushbuttons hooked up to the Arduino for this purpose.
[Josh] claims a drift of “only ~0.5 seconds” but does not state over what time period this drift occurs. In any case, 555s are not really used for timekeeping purposes in this way, because timers based on resistor-capacitor circuits tend to drift a lot and are highly susceptible to temperature changes. However, [Josh] could easily turn this into a highly accurate clock merely by replacing the 555 square wave input with a 1PPS clock source from another type of timer or GPS device.
We’ve had quite a few clocks entered into the One Hertz Competition already, including this hilariously easy Nixie clock build. You’ve got until August 19 to get your own entry in, so wow us with your project that does something once a second!
Please be kind and respectful to help make the comments section excellent. (Comment Policy)