The first version of this project started in January 2018, and honestly, it wasn't very good. Earlier in the academic year, we were given Arduino kits as part of our course, and I figured doing a simple project like this would be a good learning opportunity.
Firstly, there was the issue of actually keeping time with an Arduino. To solve this I bought a DS1037 RTC (real time clock) module. This was the cheapest I could find (oh student life), and would later be an issue.
The second issue was the lack of available IO pins on the Arduino Uno. To display the time in binary, you need 6 bits for seconds, 6 bits for minutes, and 5 bits for hours, making a total of 17 bits/LEDs. For symmetry I went with a total 18. To run these from an Arduino I used shift registers, as this is what I had. This also ended being an issue later down the line. I also decided to add 2 buttons to set the time.
Once I got the initial prototype working, I purchased an Arduino Nano for compactness, and some blue LEDs for coolness. I then threw together a questionably fitting friction fit housing in Solidworks, and cut it out of MDF on the University laser cutter. As I didn't know any better, I had all the electronics on a breadboard, and the internals were generally a mess, but technically functioning.
To read it, the hours is the top row, minutes the middle row, and seconds the bottom row. LED on=1, LED off=0. Then just learn to read binary numbers, no big deal.
On first glance, version 1 seemed to work very well, the time was displayed correctly and could be adjusted, and seemed to keep time. However:
- The LEDs were far too bright, and blue light makes it hard to sleep (the clock was in my bedroom).
- The brightness of the LEDs was not consistent. The brightness of each LED depended on the total number of LEDs currently on, which made it appear to flicker.
- The RTC module was not temperature compensating, and so would drift by a few minutes every day.
3 Years and 4 house moves later, I found the old clock. We desparately needed some decoration in our living room so I figured it'd be a good chance to see how much I'd learned over the years. I kept the MDF housing, Arduino Nano, and the push buttons, but thats about all. The improvements were as follows:
- RTC module upgraded to a DS3231, which has temperature compensation, so it will hardly drift.
- Switched out the shift registers to DM13A constant current LED drivers.
- Added a potentiometer on the back to control brightness.
Most importantly, at 22:15:09, it looks like a turtle. It is generally quite hypnotic to watch, as various patterns emerge. Because of this, it's ended up being quite the conversation starter.