Saturday, November 5, 2011

Arduino based Big Countdown Timer for New Year

The finished project at 11:39.

Background: 
I spent last new year at a relative's apartment at the beach, where hundreds of people gathered in the street right next to it so they could see the fireworks launched from a nearby raft at the sea.

This is what it looks like an hour before. 
This gets so crowded at midnight that you can't see the asphalt.


It's hard to synchronize a countdown when you have hundreds of people with individual wristwatches, so what usually happens is that many of them count in groups and while a group is hugging after the new year and watching at the skies waiting for the fireworks, others are yelling "nine!... eight!... seven!... six!..."

Happy new year!

Solution:
Inspired in Sparkfun's GPS clock, I decided to help all these folks to count in unison by building my own version of a big clock: hopefully simpler and designed to countdown for the new year.

1) The concept
So we don't need a 24h clock. A partial clock will suffice, say... something that tells the time from 11:00p to 11:58p and turns into a countdown timer for the last minute (11 turns off and the countdown starts from second 59 to 00).
The idea of starting at 11:00 is to let everyone know that the clock is actually there.

This design at saved me 6 segments and some space too.

2) The clock itself:
Go big, readable. I used super-bright LEDs (not ultra-bright) and some transistors. I do like Ben Krasnow's way of dealing with transistors.



3) Controlling the clock:
I used an Arduino and shift registers to control the segments, you can also use two Arduinos via I2C.

4) Time accuracy:
I want this thing to be accurate. The Atmega chip keeps track of time but they are not very accurate, reason why I added a RealTime Clock Module.
Now, in order to have the RTC set at the right time, I added NTP Atomic Clock Synchronization capabilities through an Ethernet Shield.

5) The Design:
I couldn't think of a simpler design: Before the shift registers, I used a two-arduino approach with served me well while shift registers were not available at the local store.








I considered an LCD serial display for monitoring status as well as a button for set-up purposes :



6) The building:

This design calls for portable and lightweight, so let's use these convenient cardboard box lid.












I had these boxes in my storage room. I borrowed 3 lids.



Design of the digits. I drew them proportional to a small 7 segment display, under the assumption that it will increase readability.

Good, let's add some LEDs to this then:


8 segments in place. Each segment consists of 3 LEDs

Cool. Time to solder some wire, add current limiting resistors, some transistors and more resistors for their base. In other words, let's follow the original design!



Wiring at the back. The chip at the center is a resistor array.

How about testing the code from the Arduino?




First digit is complete and code sends number 3.

Voilá! We have the first digit.

And then another instance of the same digit plus a third that only does number 11, to get the project complete.

Front of the completed project, the three digits can be easily separated and piled up for easy transportation.


Back of the unit

Test scenario: balcony. View from ground, 8 floors below:

Photo Enhanced ASA800 (Canon S3IS)

Normal Photo (ASA 100)

7) Power:

When all of the LEDs are on, consumption of the whole circuit is very low.
This allows me to power the entire system with a 2000[mAh] 11.1[V] Lithium Polymer battery, making the clock 100% autonomous.