View Full Version : Circut for a countdown timer
D4rknessxkilla
09-04-2010, 05:10 PM
OK so I built a HUGE countdown timer (approx. 200 LED's) ANd i need a stand alone circut to subtract a day everyday. Is this possible with just pic chips or will a computer need to be used? Thanks for all your help. The countdown timer has been built for several months just never got the main circut built for it...
n1ist
09-04-2010, 07:52 PM
It's possible with a single-chip micro (PIC, Atmel, or any other); I would add a real-time clock chip so it wouldn't lose time if the power goes out. In any case, I'd use a crystal instead of any internal oscillator in the processor for accuracy.
/mike
D4rknessxkilla
09-04-2010, 11:30 PM
It's possible with a single-chip micro (PIC, Atmel, or any other); I would add a real-time clock chip so it wouldn't lose time if the power goes out. In any case, I'd use a crystal instead of any internal oscillator in the processor for accuracy.
/mike
ok thanks for your advice, now to try and figure out the schematics... :rolleyes:
budude
09-04-2010, 11:37 PM
Can you describe the interface to this clock? That will help to determine what can be used to drive it.
D4rknessxkilla
09-05-2010, 12:20 AM
Can you describe the interface to this clock? That will help to determine what can be used to drive it.
No real interface yet... just a ton of LED's in the peg board... It says 888 (8 makes any number) days until x-mas... i still need to get them all soldered together and everything...
n1ist
09-05-2010, 03:02 PM
You seem to be approaching this backwards; you should do a bit more of the design before you possibly paint yourself in the corner. How many LEDs do you have in each segment, and what color? That will tell you what power supply you may need, what kind of driver, and whether you can wire all LEDs in a segment in series, or whether you need to split them. Once you know that, pick out a driver; common choices include the TLC5490, the TLC5916, the TLC59116 (all constant current drivers from TI; others like Allegro and On Semi have similar parts), a power shift register like the TPIC6B595, a low-side darlington driver like the ULN2803, or discrete FETs (all of which need series resistors to limit LED current). At this point, I wouldn't bother multiplexing the display as that tends to complicate things, and for 3 digits, the additional drivers aren't too bad.
For the micro, choose one you are familiar with; around here, most common are the offerings from Microchip (the PIC family) and Atmel (the AVR line). This isn't an overly demaning application, so clock rate isn't critical. If you have a choice, pick one that has both on-chip I2C and SPI ports; the real-time clock is usually an I2C peripheral, and many of the LED drivers are SPI or are shift registers that come close enough to SPI.
Here's a schematic I just tossed together that can work as a starting point. It currently will drive strings of LEDs with up to an 18V or so forward drop (the TLC5916 has a maximum output voltage of 20V) at 20mA each.
/mike
D4rknessxkilla
09-05-2010, 04:24 PM
You seem to be approaching this backwards; you should do a bit more of the design before you possibly paint yourself in the corner. How many LEDs do you have in each segment, and what color? That will tell you what power supply you may need, what kind of driver, and whether you can wire all LEDs in a segment in series, or whether you need to split them. Once you know that, pick out a driver; common choices include the TLC5490, the TLC5916, the TLC59116 (all constant current drivers from TI; others like Allegro and On Semi have similar parts), a power shift register like the TPIC6B595, a low-side darlington driver like the ULN2803, or discrete FETs (all of which need series resistors to limit LED current). At this point, I wouldn't bother multiplexing the display as that tends to complicate things, and for 3 digits, the additional drivers aren't too bad.
For the micro, choose one you are familiar with; around here, most common are the offerings from Microchip (the PIC family) and Atmel (the AVR line). This isn't an overly demaning application, so clock rate isn't critical. If you have a choice, pick one that has both on-chip I2C and SPI ports; the real-time clock is usually an I2C peripheral, and many of the LED drivers are SPI or are shift registers that come close enough to SPI.
Here's a schematic I just tossed together that can work as a starting point. It currently will drive strings of LEDs with up to an 18V or so forward drop (the TLC5916 has a maximum output voltage of 20V) at 20mA each.
/mike
There all red. and i know they have to be divided into segments, i've got it all almost done. the power supply is no biggie. thats taken care of. just need some sore of an idea on a circut to keep up with the days and subtract a day everyday, sorry for being unclear.
P. Short
09-05-2010, 08:10 PM
If you are doing it with a micro, the main issue as far as I'm concerned is the program (at least if you've never done it before). The hardware is pretty trivial, along the lines of n1ist's comments.
If I were doing it, I'd use the following hardware:
1) Several of the chips that n1ist mentioned.
2) A PIC12F629
3) A 32.768KHz crystal and caps
4) An H11AA1 for AC frequency detection
5) A pair of switches and diodes
6) A watch battery and some diodes for p/s switching.
Also, I would go for at least 7 digits, rather than just 3, because it would make setting the countdown time easier (unless you want to set the time at exactly midnight).
The reason for using both a crystal and a zero-crossing circuit is that I think that it would be a good idea for it to continue keeping time even when power is lost, but it's hard with just a cheap crystal DIY circuit to keep really accurate time.
n1ist
09-05-2010, 08:44 PM
You can set the date with three digits, similarly to what you do on a watch. The "select" button steps through the fields to change (year, month, day, etc) and the increment button increments that value. The first digit can indicate which field it is changing, and the remaining two the current value. It may be a bit more code, but it isn't too hard to implement.
OK on using AC for the timebase if you have it; crystals (and the associated caps, if any) do wander about with temperature. PIC vs. AVR, that's a holy war :-)
Red LEDs have a drop of about 1.7 volts; up to 8 in series would work nicely for a segment with the TLC5916 with a 15 volt rail.
/mike
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.