This is a guide to building an Arduino-powered clock that uses LEDs to display a 24-hour clock (hours and minutes) as binary digits, an analog meter to display the seconds, a switch to toggle between time-display and time-setting mode, and 2 knobs for setting the hours and minutes. This was designed from scratch, but is an improvement over other Arduino binary clocks that miss milliseconds here and there. This clock is extremely accurate and can be used and trusted.
To clear things up right away, Cwik is my last name and it's pronounced "Swick". So no, it's not the Quick Clock, and no, it does not run quick.
We'll start by using the Arduino Uno for prototyping, then build our own Arduino circuit from scratch for the final product. While creating out own circuit from scratch at the end is completely optional, it will allow you to continue to use your Cwik Clock, while freeing up the Uno for your next project.
Goals
There are 3 main goals for this project:
1) Familiarizing yourself with basic circuitry components - My Dad inspired me to get into electronics and circuits. After fixing some old oscilloscope by determining a resistor had blown, I was amazed that he could actually fix something (rather than throw it out and replace it). I have very little experience with circuits, but am determined to be able to hold a conversation with my dad that involves more than batteries, buzzers and light bulbs. By the end of this guide, you should gain knowledge of LEDs (safely powering them, and controlling using the Arduino), understand potentiometers (what they are, and reading their values from the arduino board), how an analog ammeter works, and using Ohm's Law.
2) Striving for functional perfection - Go big or go home. We're building this to high standards, a clock you can actually use and trust.
3) Making this look damn good - Although most of the concepts are simple, it doesn't mean our product has to look it too. Some key themes in its appearance are compactness, retro styling, throwbacks to audio equipment, fit & finish, and feel. My Dad had a lot of electronic equipement laying around the basement, so some colors and elements are inspired by my vague memories. Using an analog meter on a digital clock and a potentiometer to set digital time seems backwards, but it's what builds the charm of the Cwik Clock and differentiates itself from the countless binary clocks on the market already.
Audience
This guide is ideal for anyone looking for their 1st start-to-finish Arduino project. Elementary knowledge of the arduino platform, circuitry, and programming would be helpful, but aren't absolutely essential.
Remove these ads by
Signing UpStep 1: Materials Needed
The Arduino Uno Based Circuit (used for the majority of the steps):
-1 x Arduino Uno
-14 x LEDs, 2Vf @ 20mA
-14 x 220 Ohm resistors
-2 x potentiometers (preferrably linear and can really be any resistance, but 10K or 100K Ohm will do well)
-1 x SPDT switch
-1 x 50 uA analog meter/ammeter
-1 x 100K Ohm resistor
The Final Circuit (re-uses everything from the above list, but now we're making an Arduino board rather than using the Uno):
-1 x ATmega328P-PU (or pull the one off of your Uno, but you'll want to replace it with this)
-1 x project box, paint if desired
-wire (I used 22 AWG wire)
-1 x 7805 voltage regulator (5V)
-1 x 10K Ohm resistor
-2 x 10 uF capacitor
-2 x 22 pF capacitor
-1 x 16 MHz clock crystal
-1 x momentary normally open ("off") button/switch
-2 x knobs, which fit on the potentiometers
-1 x 9V power supply
-1 x female jack for power supply
-perf board
-2 x LED (optional, these are completely unused, but form a 4x4 grid of LEDs along with 13 time LEDs, and the 1 time-setting mode LED)
-14 x LED mounting clip (or 16 if you use the 2 dummy LEDs mentioned directly above, but these mounting clips are completely optional)
-1 x 28-pin socket for mounting the microcontroller (optional, but highly recommended if you plan to adjust for error in the final step)















































Visit Our Store »
Go Pro Today »




Its pretty easy to take the front plastic off analog meters like that and print out your own scale at home. We do it all the time at work to convert 5v meters to Torr meters for vacuum equipment. Play with the design a little and use some nice paper and they look like you purchased them.
I am wanting to use LEDs for the seconds instead of an analog meter. However, I need 7 LEDs for such thing. How would I go about this? Some sort of shift register IC just for the seconds part? Multiplexing?
What would you recommend?
Also, do you think rotary encoders would be better for adjusting since you can keep turning them?
http://arduino.cc/en/Tutorial/ShiftOut
Another option is to use a column with 6 LEDs:
o <-- 32
o <-- 16
o <-- 8
o <-- 4
o <-- 2
o <-- 1
I actually didn't know about the rotary encoder, so thanks for bring that to my attention. I personally like the fact that the knobs stop at the minimum and maximum values using potentiometers, but one benefit of the rotary encoder is that you could set its current reading to the current time when going into time setting mode (ie, toggling the time setting switch wouldn't change the time to whatever you left the knobs at last).