Digital countdown timer may never need battery replacement

By Mark E Buccini, Texas Instruments, Houston, TX; Edited by Brad Thompson and Fran Granville -- 6/23/2005

Comprising a microprocessor, an LCD, a 32.768-kHz crystal, and little else, the basic countdown-timer circuit in Figure 1 operates from a commonly available CR2032 lithium-coin-cell battery. Based on the circuit's calculated current drain, the battery may never need replacement over a projected 10-year operational life. Careful selection of the battery and diligent exploitation of the microprocessor's low-power modes help minimize power consumption and thus maximize battery life. The coin-cell battery's size and flat form factor encourage miniaturization for portable-system applications. In addition, the lithium cell presents a flat voltage-versus-time discharge curve that allows direct drive of the LCD's segments to produce high contrast without additional compensation circuitry.

A typical CR2032 cell delivers approximately 200 mAhr of rated energy capacity. To achieve the design goal of 10 years of continuous operation, the system's average current consumption must not exceed 2.28 µA, which you calculate by dividing the battery's energy capacity by the system's operational life: 200 mAhr/10 years/365 days/24 hours=2.28 µA. A microprocessor from Texas Instruments' MSP430 family presents a low-standby-current demand of only 0.8 µA, which includes current drawn by its crystal oscillator, integrated LCD driver, and interrupt-driven wake-up timer. The 3½-digit LCD, a Varitronix model VI-302-DP, consumes an additional 1 µA. The total standby-current consumption for all active countdown-timer components is thus 1.80 µA.

In normal (standby) operation, the microprocessor's 32-kHz external-crystal clock drives an internal counter that generates an interrupt once per second. The interrupt awakens the processor, which executes an active main-software loop that decrements a countdown register via direct BCD (binary-coded-decimal) subtraction. Adding a value of 99 (decimal) to the countdown register and discarding the leftmost digit perform a one-digit subtraction. For example, 21+99=120; dropping the one in the 100s place yields a value of 20. As a bonus, this method directly displays the countdown register's contents on the LCD without requiring current-hungry binary-to-BCD conversions. (Click here to download the timer software's assembly-language)

ADVERTISEMENT
As a final step, the main loop compares the countdown register's contents with zero to determine whether the preprogrammed time interval has expired. If so, the display flashes the time-out message. The main loop activates the CPU and its on-chip high-speed oscillator, which consume a total of 250 µA. Writing the software to execute 100 or fewer clock cycles—equivalent to 100 µsec at the default 1-MHz CPU clock frequency—reduces current demand. With such a short active period, the main loop's total current consumption is virtually negligible: Main loop=250 mA×(100/1 million)=0.025 µA.

Thus, total current consumption for the digital countdown timer is the sum of the standby- and main-loop currents: 1.8+0.025 1.8 µA.

At approximately 1.8-µA average current consumption, the countdown timer easily meets the 2.28-µA design goal and ensures more than 10 years of continuous operation. Given the device's low current drain, a designer could reduce the timer's cost and complexity by packaging the circuitry along with a nonreplaceable battery. Many of the microprocessor's functions and I/O pins remain unused and available for additional features, and the compact firmware for implementing the counter occupies less than 250 bytes of 8 kbytes of available flash memory.

Applications for the circuit range from exercise-routine timing to a restaurant-service-guarantee timer. In such an application, the restaurant's greeter presses the timer's reset switch to reset the processor and start a preprogrammed countdown interval. If the time interval expires without the customer's being seated, the timer's display flashes to indicate that a guarantee of service went unmet.

Click here for more Design Ideas!

 

 

 

 


© 2009, Reed Business Information, a division of Reed Elsevier Inc. All Rights Reserved.