Yard Display - Countdown Timer to "The Big Event"

Greetings, I'm looking for a "how to", kit, or other on building a count down clock to put in my yard for Halloween and Christmas. I need DD:HH:MM:SS (Days, Hours, Minutes, Seconds) to count down. I would really like to be able to use individual LEDs and arrange them in the shape of a 7 segment display, this way I could build a good size display at a reasonable cost (each segment 4" to 6" tall for high visibility).

--- a | | f b | | f b --- g | | e c | | e c --- d

Example: each segment (A-G) could be any where from 5 to 15 LEDs wired in series to make a very long segment. This would increase visibility in my yard from the road.

I also need to be able to program or pick what I wish to count down to (Christmas, Halloween, July 4, etc.). I have an Arduino Duemilanove for this project and was thinking, as it will be just one special day to countdown to at a time that the 'special date', remember DD:HH:MM:SS, could be put in the program as a hard date/time and when I wanted a different event I just change that line of the program.

My thought would look something like this:

// Put your target date here. byte EVENT-YY = 12; // NOT Used but programmed to keep things straight. byte EVENT-MM = 12; // NOT Used but programmed to keep things straight. byte EVENT-DD = 25; byte EVENT-HH = 0; byte EVENT-MM = 0; byte EVENT-SS = 0;

I would also prefer that the unit run off of 5, 9, or 12 VDC for safety purposes.

Does anyone know of anything like this in the works somewhere with diagrams and program help? I've never done anything like this and of all of the counters I have found none use 8 (DD/HH/MM/SS) total segments. Thanks.

you could use a BCD to 7-segment decoder somthing like a 7446A it can take up to 15V and place the led's per segment in a serial-parrallel combination according to the voltage and current of the led's you use.

So 8 seven-segment digits plus the colons. The Arduino can do the BCD to 7-segment decoding. You could treat it as an 8X8 matrix: each row is one digit and (and one bit left over you can use to control one of the colon lights). For each row you’ll need a “high side driver” that can source enough current and voltage to light a full digit. For each column you’ll need a “low side driver” to sink enough current and voltage to drive a single segment.

How many per segment, what kind of LED, and how they are wired together in the segment will determine the voltage and current requirements and how many current limiting resistors you might need.

For a count-down of more than a week you will probably want a Realtime Clock (RTC) chip to keep track of date and time. That Arduino resonator is not very precise and will be off by several minutes a day.

For a REALLY big display you can use a 4' fluorescent fixture per segment and a set of relays to turn them on and off. Might not switch on fast enough to count seconds properly.

Hi there and thanks for your inputs.

I was actually going to “hard wire” 2 LEDs for the colons, between sets, as they would never change.
So a “direct power tap” for 6 LEDs would cover that. DD:HH:MM:SS. I have seen projects where people have used the RTC but none
have covered this many segments, and they are all LCD or don’t have this many numbers in use.

I assumed that this project would have already been done by someone before with the large
number of Christmas displays all over the country. My thought process was to try and find
someone who has done this experiment and, using their plans, convert it to use the LEDs vs
7 segment displays.

I have an image, with LED calculations, on a test segment but I can’t seem to get it in this post.
UPDATE: ok, after the save it shows on the bottom of the reply. “Smack to the head - OK, I get it.”
This image is really larger than what I will do, I was just drawing things out to scale and doing
the math.

And using a “4’ fluorescent fixture per segment” :astonished: might just totally drown out my
Christmas programs

This is the best I can show you due to DRM and Copyright issues over music put on youtube.

Another way would be to make the segments from LED strips. The bottom board at my signature link uses TPIC6B595 to sink current from 12V sources to turn on strips that use 9 LEDs per segment. The same approach could be used with 8 driver chips instead. Or you could use a MAX7221, and add extra transistors per an application note that for the MAX7221 to drive the higher volages.

I think the TPIC6B595s would be a lot easier to implement. String them all together, 8 SPI.transfer's to send the digit data out. Add an RTC/battery to keep the in case of power loss.

I don't know much about LED strips, though I do know they are out there. Cool stuff on your link BTW, you must really know your way around this stuff. {I have never heard of a: TPIC6B595 so I need to do some research.} And that is my problem, I don't know my way around this stuff. Which is why I was hoping, knowing the popularity of both the Arduino and Christmas, someone already had I "how to" up to share like the other forums I'm on and I would have a nice project to work on to get ready for 12/2012.

So, as I have not found anything nor anyone who knows of a ready made 'how to' I'm gathering data to try this myself.

I did find this link: http://www.john.geek.nz/2010/11/stag-hat-with-a-difference/ and that is the format I would like to copy to put into my Christmas Countdown Sign.

Looking at this link: http://www.arduino.cc/playground/Main/LedControl I'm thinking the MAX7221 would be the way to go with a RTC component like this: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=48.

So if you, or anyone you know, knows how to do all this I'd really appreciate some input on putting it all together.

Thanks for looking over my post and giving me your input.

A board like this, with 8 TPIC6B595 shift registers, can sink current from 12V sources for LED strips.
MAX7221 will need a bunch of transistors added to support the higher voltage. This is simpler.
Uses SPI to drive shift register like your hat link.

Well folks, I’m back. I have not been able to find what I want on the web so here I go.
I’ve got some parts now that I can start testing with as I build this project from the ground up. Because I am learning the Arduino Duemilanove as I go I thought I would share my project in the hopes that others might learn too. I’ll post my projects as I go.

Here are the current references I am using:
Arduino Cookbook by Michael Margolis, from O’Reilly publishing
In the Arduino Playground under Interfacing with Hardware goto Seven segment displays
http://www.arduino.cc/playground/Main/InterfacingWithHardware

My plan of attack is something like this:

  1. get the parts necessary to experiment with
  2. learn to print the data on screen so when my programs don’t work correctly I can trouble shoot
  3. build a sketch that I can understand to control a 7 segment display
  4. learn arrays to make segment control easier
  5. figure out how to build a ‘clock’ without a RTC
  6. figure out how to build a ‘clock’ with a RTC
  7. figure out how to make a clock count backwards
  8. build a custom display

Below you will find my first project; 7 segment and screen output.
This program:
-explains the Seven Segment Display (SSD) pinout to LEDs and to Arduino
-lets me figure out how to control a SSD
-lets me figure out how to put data on the monitor screen
-‘counts’ the SSD from 0 to 9 in a closed loop

sev-seg-01.txt (12 KB)

"I have not been able to find what I want on the web "

All of those have been discussed numerous times here in the forum, more info is found in the Learning section, and in the Playground.

For example, look at this code to keep track of 4 digits of data in a count down timer.

 void loop()
{
  // check if time needs updating
  if ((time_running == 1))  // time is counting down
  {
    unsigned long currentMillis = millis();  // see how long its been

    if (currentMillis - previousMillis >= interval) // more than our [s]quarter[/s] tenth second interval?
    {
      // save the last time we okayed time updates 
      previousMillis = currentMillis; 
      tenths = tenths+1;

      if (tenth_interval == 10) // we hit the one second update time
      {
        update_time = 1;   //  enable time display to be updated
        tenth_interval = 0;
        // update the time digits
        // cases: 
        // 0:01, final second - stop time
        // Tens of seconds rollover: time = x:50, x:40, x:30, x:20, x:10: decrement tens of seconds, rollover seconds to 9
        // Minutes rollover: time = 9:00, 8:00, etc. 2:00, 1:00: decrement ones of minutes, rollover tens of 
        // seconds to 5, ones of seconds to 9
          // 10:00: Roll all the digits over
        // otherwise: just roll over the seconds

        // Case: Final Second
        if ((minutes_ones == 0) && (seconds_tens == 0) && (seconds_ones == 1)) // don't need minutes_tens, can't have 10:01
        {
          time_running = 0;  // stop time running
          seconds_ones = 0;  // clear the last second
          updated = 1;  // fake a Case complete flag
          buzzer = 1;                     // add a buzzer for this: end of time buzzer sounds       

        }  // end of  if final second

        // Case: x:50, x:40, x:30, x:20, x:10
        if ((seconds_tens >0) && (seconds_ones == 0))  // case for the last tens of seconds 
        {
          seconds_tens = seconds_tens - 1;  // decrement the tens
          seconds_ones = 9;  // rollover the ones
          updated = 1;
        }  // end of if 10 of seconds rollover

        // Case: 9:00, 8:00, etc 2:00, 1:00
        if ((minutes_ones > 0) && (seconds_tens == 0) && (seconds_ones == 0)) // case for the last ones of minutes
        { 
          minutes_tens = 0x00;  //
          minutes_ones = minutes_ones - 1;  // decrement the minutes
          seconds_tens = 5;  // rollover the tens of seconds;
          seconds_ones = 9;  // rollover the ones of seconds;
          updated = 1;
        } // end of if minutes rollover

        // Case: starting from 10:00
        if (minutes_tens == 0x01)  // roll over all digits
        {
          minutes_tens = 0x00;  // rollover the tens of minutes
          minutes_ones = 9;  // rollover the ones of mints;
          seconds_tens = 5;  // rollover the tens of seconds;
          seconds_ones = 9;  // rollover the ones of seconds; 
          updated = 1;
        } // end of if 10:00 rollover

        // General Case: just decrement the seconds
        if (updated == 0)  // nothing else updated - but don't decrement if = 0.
        {
          seconds_ones = seconds_ones - 1;
        }
        updated = 0;  // reset for next pass thru
      } // end of if [s]quarter[/s]tenth_interval
    } // end of reaching our interval
  } // end of if time_running

Flesh out the variables, add some code to read start/stop button and set time_running to 0 or 1, reset button to set the starting time you want (10:00, 3:0 etc), create an 10 element array to hold your digit definitions, displayArray[] = {B101111111, etc. for 1,2,3,4,5,6,7,8,9}; where each byte represents decimal point, g,f,d,e,c,b,a, in this case 1 = on, could also use 0 = on depending on your hardware setup and segments are set up thus: a f b g e c d and shift out the data to 4 shift registers to drive the 7 segment display when you set the flag saying display_update is needed. if (updated == 1){ updated = 0; // clear flag digitalWrite (SlaveSelect, LOW); SPI.transfer (digit0); SPI.transfer (digit1); SPI.transfer (digit2); SPI.transfer (digit3); digitalWrite (SlaveSelect, HIGH); }

Greetings to those following this post.

Todays update: I found a nice little bit of code here: http://www.hacktronics.com/Tutorials/arduino-and-7-segment-led.html Which provides a nice 9-0 countdown sequence via arrays and bit patterns. I'll be working on this for a bit trying to arrange a multi-segment display. I've posted the link for those who wish to do the same. Stay tuned....

Whatever floats your boat.