Minimal Arduino Clock

Making a clock with a common microcontroller like an Arduino isn’t very difficult. However, if you’ve tried it, you probably discovered that keeping track of wall time is difficult without some external hardware. [Barzok] has a very minimal clock build. It takes a handful of LED arrays with an integrated driver, an Arduino Nano, a real-time clock module, and a voltage regulator.

The software uses a custom 6×9 font and handles addressing the LEDs as one single display. Because the real time clock module is so accurate, there’s no provision for setting the time. [Barzok] says that twice a year he just hooks the Arduino up and reflashes the program with a new start time and that seems to be sufficient.

It wouldn’t be too hard, though, to add a few buttons to allow for setting the time or accepting other user input. Then again, this is a minimal build. It would be a good starter project for someone looking to get into building microcontroller projects.

If you want really minimal, you could go with a 4 LED clock (but you better know the resistor color code). Of course, an ESP8266 can serve as a simple clock and it gets set via NTP which is even better.

19 thoughts on “Minimal Arduino Clock

  1. I’ve been down this road, and it was an eye opening education. In my case, it was the Crazy Clock – a microcontroller lavet stepper motor driver driven by a crystal. To make a long story short, what I learned was that when they talk about crystals having a particular tolerance (like 10 ppm), that doesn’t mean that they’re going to be within 10 ppm of their labeled frequency. It means they’ll be within 10 ppm *of each other*. I had to try several values of loading caps to get close, and even then the result was a batch of boards that averaged 5 ppm fast, ± 10 ppm.

    This same thing applies to RTC chips with external crystals, like the DS1307. I’ve taken to using the Pericom PT7C4311WEX, since it has a trimming register.

    1. It means they are within +/-10ppm when they have their specified loading capacitance attached. Of course taking into account any pin and stray capacitance. If you need to be more accurate in a small batch you could just use trimmer capacitor. The caps do not have to be exactly equal to work.

    1. It can be perfectly fine, if you need a HF transmitter (CW only). :-) One time (20-30yr ago) I had an (east german) 7812 in TO3 case. I did not know about the caps. I connected wires and some voltage and niced a strange behavior of my soldering station: The bar-graph type temperature indication went completely down and the “heat” LED come on. After some seconds when I switched the 7812 off, the indicated temp was about 10-20°C higher than before.
      A closer look with the O’scope showed an oscillation of 2-3MHz and several Vpp. This caused RFI and knocked out the temperature measurement.

  2. Putting big caps on the output of linear regulators isn’t always a good thing. ST’s datasheet for their 7805 only recommends 0.1 uF on its output. ST says even that isn’t necessary, though it does improve transient response. Remember that a linear regulator is essentially a high-power op-amp, so capacitance across the output just makes it work harder. As for decoupling, I’m sure the Nano and the RTC board have enough. As for the INPUT to the 7805, that’s a different story. ST recommends 0.33 uF on the input, and that means RIGHT at the input, not at the other end of an inductive feed. In fact, they warn that you must use a capacitor with low impedance at high frequencies on the input to prevent instability.

    1. And for a TL431 100nF is the worst you can do. It’s right in the middle of the range of oscillation. You can use some nF or some µF but not 100nF. So it depends and you should read the datasheet.

  3. The age of the Arduino clocks comes to an end, when you can have ESP8266 boards for the same price, that can pull the accurate time from the Internet.

    On the wall behind my desk, there’s currently a Wemos D1 mini board with an oled shield and a BME260, that shows the time, temperature, humidity and air pressure.

    Why would I mess around with Arduinos and RTC modules anymore?

    OK, in case of a Zombie apocalypse, it could be handy to be able to still count the passed months even off the grid.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s