# 6 Month Countdown Timer Circuit

I need to design a timing circuit. After a duration of 6 months a LED must come on. The LED can then be turned off at the press of a button and the 6 month count-down must begin again. Anyone have any idea where I would start? Is a 555 timer capable of doing something for a time of this duration or would I need somthing else? Any help would be greatly appreciated..

[added] it will be used as a reminder to change a water filter so it should be powered off a small battery..something small, easy to setup and with a low current consumption would also be handy..any help appreciated..thanks for the previous input..

• Does this have to be portable, or will it be connected to an AC supply? If so, you could count 60 (or 50) Hz crossings, which are very accurate over the long run. – tcrosley Oct 12 '10 at 15:28
• Don't try using the AC supply - you can't count on the power staying on for 6 months straight without taking extraordinary measures. – Michael Kohne Oct 12 '10 at 17:45
• I have seen this application used in water filters to alert you when the filter needs to be replaced. They can run for many years with out having to replace a battery so I assume they are able to do it very easily. – Kellenjb Oct 12 '10 at 18:03
• @Vincent Conlon: What precision do you need? In the water filter example, I am sure the precision is horrible, but I don't think anyone cares if you get alerted a week early or late. – Kellenjb Oct 12 '10 at 18:06

Based on this answer, I think a 555 won't work. You'd need a massive capacitor and a huge resistor, and the accuracy would be terrible.

I'd recommend using the simplest of 8-bit microcontrollers. You'd have to handle the numbers carefully, but a PIC16F84A (or an Arduino, or lots of other similar devices) could do it. I might set up a 1 second timer, and then count 15778463 timer expirations, storing the count in a 32-bit variable. (For Arduino 32-bit variables, see http://www.arduino.cc/en/Reference/Double)

• Um...double? Wrong. You mean long, or preferably int32_t. – Nick T Oct 12 '10 at 20:16
• AH, you're right. Rude, but right. – pingswept Oct 12 '10 at 21:09
• Um... int32_t? Wrong. You mean uint32_t, unless you're expecting time to go backwards too. – Toby Jaffey Oct 13 '10 at 8:18
• @Nick while technically true most implementations of C on 8 bit micro-controllers do not follow ansi defined type promotion. They often just use the largest type in the statement. – Mark Oct 23 '10 at 18:35
• Bear in mind that without an RTC or an external oscillator, the accuracy here will be fairly awful, especially over such a long time period. And don't forget to periodically write the current count to EEPROM! – Nick Johnson Aug 10 '11 at 4:33

Like pingswept, I'd recommend a cheap microcontroller. The TI Launchpad MSP430 comes with a 32.768KHz crystal and supports very low power operation.

This project is not far off what you want: http://kennethfinnegan.blogspot.com/2010/08/msp430-bicolor-led-clock.html

First off, it's an interesting little project, but you're using the wrong tool really. This is something which has been solved since centuries using a tool known as an agenda.

Let's do it electronically anyway, just for the fun of it. You don't seem to need a very high accuracy; it won't matter if the filter is replaced a day earlier or later (a day in 6 months is 0.5% accuracy). I make a note that it has to run off a battery, so it has to be real low-power.

I'm going to start with changing the requirements. You want a LED as indicator, but your device would have to be rather prominently present in the living room if you want to be sure to see the lit LED, even when flashing. (Let's note that flashing may be necessary to avoid that the battery is drained before the LED gets noticed; after all the LED may go on just after you went to bed.)
I would use a buzzer instead of a LED. And to prevent that the buzzer sounds in the middle of the night we'll need accurate time-keeping which will also tell us the time of day. That means a 555 is out, and we'll have to rely on a microcontroller. A small microcontroller costs less than 50 cent, and running on a 32.768kHz crystal doesn't consume much (for one project I used an MSP430F1101 which consumed less than 4$\mu$A), and has minutes accuracy over months.
But that would mean you have to be careful of the moment you start your timer, and that's not very user friendly.
Enter the atomic clock receiver. DCF77 in Europe and WWVB in North-America broadcast time as 1 second pulses. The microcontroller can run on an internal RC clock (doesn't have to be that accurate) and keep time based on the received time code. To save power you could have the atomic clock receiver wake-up the microcontroller on every 1 second pulse, so that the controller can update time and date, and go back to sleep. You could program the microcontroller to give a signal at 14:00 on the first saturday following the timeout, for example.

Then there's the power supply. The microcontroller solution needs only a few $\mu$A, so a CR3032 lithium cell (good for 500mAh) may last several years. But the time between events is so long that eventually the battery will give up halfway a 6-month period, and the filter-replacement-due-time will pass unnoticed.
I would suggest a mains powered device, using a small transformer; I have a bunch of 6V, 0.35VA transformers for this kind of small products. Since a long period like 6 months doesn't guarantee that there won't be a power outage you'll need a battery/capacitor backup. Here in Belgium we have less than 1 power outage in 2 years on average, the longest I experienced lasted 2 hours. I wouldn't use a battery, at least not a primary cell. A rechargeable will do, but let's use a supercap instead. A 0.1F cap will keep a 10$\mu$A device running for more than 24 hours. The microcontroller may monitor the mains power, so that, if the 6 months timeout would occur during a power outage, the microcontroller can postpone the signal until power is restored.

For an application which requires so little user interaction it's still useful to have some kind of feedback. You could flash a LED once every second to indicate the timer is running, and if you care to make it a luxury version could display the remaining day count on a three digit LCD or LED display.

edit (re Ben's comment)
In the past I used these small DCF77 receiver modules from Conrad.

I live in Europe, hence DCF77, for WWVB (North-America) similar modules exist.
Connections are simply power supply (1.2V to 15V) and 2 DCF77 outputs, one non-inverted, one inverted. The outputs are open collector, so with the right pull-up suitable for whatever voltage the microcontroller run on.

• Nice approach, but there's a huge glaring omission when it comes to the hardware you'd use to receive the timestamp broadcasts. – Ben Voigt Aug 9 '11 at 15:05
• @Ben - fair enough. Added to my answer. – stevenvh Aug 9 '11 at 15:28

Arduino (or other microcontroller) with a DS3231 super accurate real-time clock IC. When the button is pressed, the time and date is stored in memory - the MCU can loop around checking the date and time and turn off when ready; or when button pressed it restarts etc.

• +1 RTC for sure. DS3234 if you'd rather use SPI instead of I2C. – Craig Oct 3 '11 at 1:04
• That is a great chip. Let it keep track of all of the tedious counting and timing for you. Much easier than counting pulses and doing all the conversions to real time. – captncraig Oct 3 '11 at 4:25
• 2 ppm surely is nice, but overkill. A 20 ppm standard crystal will do here: I don't think the exact minute to change the water filter is important (as long as it's not in the middle of the night). – stevenvh Jul 5 '12 at 9:41

The tricky part would be precision over such a large time interval.

You may want to consider a crystal oscillator combined with a cascade of binary counters. See 4060 datasheet for examples.

I think you should use a 555 timer to time for 16 minute intervals, and then feed that into a counter circuit of some sort to divide it. A 14-bit counter would make the interval about 6.06 months.

• You shouldn't use a 555 with a period of 16 minutes; better to cascade two counters and run the 555 at a more-sane frequency (kHz or so). Better to not use a 555 at all if you care about tolerance much. – Nick T Oct 12 '10 at 20:13
• A CMOS 555 will easily run for hours. The OP seemed to suggest accuracy was not an issue. – Thomas O Oct 12 '10 at 20:29
• Even if accuracy was not an issue a 555 running over such a long time span will be so wildly inaccurate as to make it essentially an arbitrary time. I like the MSP430 solution much better, cheap and the supplied crystal will be reasonably accurate over the required timespan. – ttt Oct 14 '10 at 12:28