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.

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.

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.

Step 1: Materials Needed

This guide leads you through creating a prototype, and finally creating the finished product. As such, the materials needed are split into 2 secions as well.

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)
The analog second meter is beautiful. Great aesthetic on this thing, and great attention to detail. Well done.
<p>Hey Cwik, Here is a pic of my clock. The time set controls are on the back. I have also built a couple without the meter and installed them in deep picture frames. They all work beautifully. </p><p>Thanks for the great Instructable&gt; :)</p>
<p>This is the picture frame version, no seconds. Whole clock assembled on stripboard and mounted on a deep picture frame.</p>
<p>Heya Cwik. TY for posting this project. I have been looking for a binary clock to build, and while I have found many, this one is simply superb. The analog seconds readout is brilliant. This is now my new project.</p>
<p>hello. why it doesn&acute;t work with arduino pro mini?</p>
I've never used an arduino pro mini, but looking at the spec sheet it could theoretically work.<br><br>As far as I can tell, the pin assignments are the same, so there shouldn't be an issue with that.<br><br>However, it looks like there are 2 versions; one with an 8 MHz clock and runs at 3.3V, and one with 16MHz and 5V. The clock speed should make no difference, but the voltage certainly does.<br><br>If you have the 5V model, I don't see any reason why it shouldn't work with little to no modifications. <br><br>If you've got the 3.3V model, you'll have to modify the resistance for each LED (modify the calculations in Step 3: Powering the LEDs), as well as the voltage regulator. I suspect you can use the same capacitors around the voltage regulator (I got that from another website outlined in Step 10), but you may want to investigate it further. I think they're used only to smooth the output of the voltage regulator. You could (and probably should, for heat reasons) use a lower voltage power supply too.<br><br>I may be able to help more if you can pinpoint what specifically doesn't work. Go step by step and let me know where you get stuck, and good luck!
<p>in time-setting mode when i turn one of the knobs all the leds ( not only the hour also the minutes) changes.</p><p>many thanks.</p>
<p>Could anybody help? It's not working... my power cable has a light on it when its on and as soon as I plug this in it goes off so maybe its shorting? I have no idea but here's some pictures just in case there is anything glaringly obvious...</p>
<p>It's really hard to tell from pictures. I'd recommend trying 2 things.</p><p>First, try and see if you've accidentally shorted out 2 rows together. Either look for basically zero resistance between rows (if you don't have a volt meter, you can hook up an LED with a resistor and power source, and see if you can light up the LED by connecting it across 2 rows).</p><p>Next, make sure the chip is functioning properly. If you have spare supplies, build the same circuit on a bread board and make sure it still functions as expected. The biggest risk is having heat destroy the chip, so make sure all of your soldering is done with the chip off of the board.</p><p>If after these 2 things you're still having no luck, it's the painful process of figuring out where your circuit strays from the design.</p><p>Good luck!</p>
<p>Trying to find a similar enclosure but I don't know what I'm looking for, what was it originally? Love this clock btw! Have slowly mastered the circuit just trying to get hold of all the stuff and hopefully mine will turn out half as good as yours </p>
<p>Any store like a RadioShack or Fry's should have &quot;project boxes&quot; (just ask for enclosure for hobby circuitry), it's just a matter of what size and shapes they have. I really lucked out in terms of finding a compact box, and one with the angled front.</p><p>Glad to hear the circuit part went well, and good luck with finding the right box!</p>
<p>Hi again! slowly getting together all the stuff to get started (verrrryy slowly i know) gonna leave the enclosure till i know how big i'm going to make it! As for the analog meter, I'm finding that voltmeters are cheaper than uA ammeters for whatever reason, as the voltage of the circuit is alternating between 0 to 5V could I use a 5V voltmeter without the 100k ohm resistor? would that work? Thanks again! </p>
<p>Sorry for the late response. I'm not sure how a voltmeter reacts with no load. I haven't touched arduino in a while, but you'd probably have to set the pin to high impedence to make it work with just the volt meter. In theory it should work.</p><p>On the other hand, resistors are so cheap, you could throw a resistor with very high resistance (eg, 10K ohm or even larger if you want) on there so that current will be very low, thus reducing heat, and then hook up the voltmeter in parallel with the resistor.</p><p>The 5V voltmeter should work just fine. However, if for some reason the digital pin doesn't supply 5V (eg, maybe it only supplies 4.5V), you could get a smaller voltmeter, like 1V, use 2 resistors of appropriate resistance in series, and measure the voltage drop across one. For example, have the 2 resistors add up to 10K ohm, and together they drop the entire 4.5V. To drop 1V on one of the resistors, it must be (1V / 4.5V) * 10K ohm = 2.2K ohm. That means the other resistor must be 7.8K ohm (ie, 10K ohm - 2.2K ohm). Hook the 2 resistors up in series, and hook the voltmeter up in parallel with the 2.2K ohm resistor. If this isn't making any sense, do a quick search for &quot;voltage division series&quot;.</p>
<p>Had been sitting on these parts since the Instructable was posted. Finally got around to doing it. I used the extra Led to change the clock to an AM/PM 12 hour clock. Basically any time over 12 hours like 15:00 shows 3:00 with the PM light on. Also changed the hour &quot;0&quot; to display as 12. I really learned some things about programming using time. Very fun instructable. Had a heck of a time sourcing the meter, but got lucky on Ebay and found a domestic source, although its milliamps instead of microamps, was able to change the resistor to match the output.</p>
This is really nice work. I love how the analog meter makes it look like retro lab equipment.&nbsp; I am definitely going to make one.&nbsp; I just hope it comes out as nice as yours!&nbsp; I haven't read all of this yet so excuse me if you already mentioned this..<br> <br> 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 had considered printing my own scale and even painting the tip of the needle red or bright orange, but was afraid of making it look too amateur. The one I bought looked really clean. It also had a metal background, and the stripe that goes across is this unpainted silver finish that I really grew fond of. Although it is a bit weird that the scale only goes to 50.
The analog meter adds a real charm to it. I've thought about building a binary clock for a while, but I wanted something different. I'm going to go find an analog meter right now.
Thanks! I really feel the analog meter is the eye-catcher of the whole clock but wasn't as easy as I thought it would be to get. I bought one from a 3rd party seller on amazon and took many weeks to ship. In the meantime I really wanted to finish the project so I went to a local electronics shop where I found the meter I eventually used in the final product (the one in the pictures), however they only had a single unit in that current range. I hope you have better luck than I did finding an elegant meter!
Is the one led in the left column a dummy?
Yes, the top left LED indicates whether you're in time setting mode while the one below it is completely for show and is not wired up to anything. It'll never light up.
Simply great. I really enjoy the aesthetic of it; has that industrial appeal.
Where did you get this enclosure? I think it looks pretty cool and I would like to get one for a different kind of clock i'm making.
I got it at Fry's Electronics (in store, not online) for roughly $10. FYI, the holes for the screws are not pre-threaded so you've got to be a bit careful not to strip them or start them at a bad angle.
Cool, thanks
Hello <br> <br>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? <br> <br>What would you recommend? <br> <br>Also, do you think rotary encoders would be better for adjusting since you can keep turning them?
Oh, and in case it wasn't obvious, its because I havent got enough pins on my UNO R3. :)
I had bookmarked this page for later when I needed more pins as it details using a shift register: <br>http://arduino.cc/en/Tutorial/ShiftOut <br> <br>Another option is to use a column with 6 LEDs: <br>o &lt;-- 32 <br>o &lt;-- 16 <br>o &lt;-- 8 <br>o &lt;-- 4 <br>o &lt;-- 2 <br>o &lt;-- 1 <br> <br>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).
EXCELLENT! Nicely done!

About This Instructable




Bio: I'm a software development engineer by day, and a geek by night.
More by cwik:Cwik Clock v1.0 - An Arduino Binary Clock 
Add instructable to: