DSP, Micros & Memory


Digital countdown timer may never need battery replacement

5 October 2005 DSP, Micros & Memory

Comprising a microprocessor, an LCD, a 32,768 kHz crystal, and little else, the basic countdown-timer circuit shown in the figure 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.

A half-dozen components are all it takes to build a battery-thrifty countdown timer
A half-dozen components are all it takes to build a battery-thrifty countdown timer

Careful selection of the battery and diligent exploitation of the microprocessor's low-power modes help minimise power consumption and so maximise battery life. The coin-cell battery's size and flat form-factor encourage miniaturisation for portable-system applications. In addition, the lithium cell presents a flat voltage vs 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 is calculated 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 performs a one-digit subtraction. For example, 21+99 = 120; dropping the '1' in the '100's 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. As a final step, the main loop compares the countdown register's contents with zero to determine whether the pre-programmed 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 μs 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 x (100/1 million) = 0,025 μA.

Thus, the 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 non-replaceable 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 Kbyte 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 pre-programmed countdown interval. If the time interval expires without the customer being seated, the timer's display flashes to indicate that a guarantee of service went unmet.





Share this article:
Share via emailShare via LinkedInPrint this page

Further reading:

QuecPython live demonstration
Quectel Wireless Solutions DSP, Micros & Memory
QuecPython allows designers to adapt Quectel’s modules quickly, with a low-code approach to suit their precise requirements in less time and at reduced cost, while maintaining high security standards.

Read more...
Robust and customisable SBC
Altron Arrow DSP, Micros & Memory
Pairing the powerful i.MX8M Plus System on Module (SoM) from SolidRun, which features the i.MX 8M Plus SoC from NXP, this high-performance SBC is set to transform industrial environments.

Read more...
New family supports future cryptography
Altron Arrow DSP, Micros & Memory
NXP has introduced its new i.MX 94 family, which contains an i.MX MPU with an integrated time-sensitive networking (TSN) switch, enabling configurable, secure communications with rich protocol support in industrial and automotive environments.

Read more...
Fast and reliable 4G connectivity worldwide
TRX Electronics DSP, Micros & Memory
Powered by a powerful Quectel LTE Cat 4 modem, the Arduino Pro 4G module’s fast data throughput and high bandwidths ensure reliable and quick data download and upload, even in remote locations.

Read more...
NXP’s all-purpose microcontroller series
Altron Arrow DSP, Micros & Memory
NXP has released its MCX A14x and A15x series of all-purpose microcontrollers which are part of the larger MCX portfolio that shares a common Arm Cortex-M33 core platform.

Read more...
ESP32-P4 SoC
iCorp Technologies DSP, Micros & Memory
Espressif Systems announced its latest SoC, the ESP32-P4 which is powered by a RISC-V CPU, with an AI instructions extension, an advanced memory subsystem, and integrated high-speed peripherals.

Read more...
Microchip SoC FPGA
ASIC Design Services DSP, Micros & Memory
Microchip Technology introduced the RT PolarFire SoC FPGA, the first real-time Linux capable, RISC-V-based microprocessor subsystem on a proven RT PolarFire FPGA platform.

Read more...
QLC Flash memory using BiCS tech
EBV Electrolink DSP, Micros & Memory
KIOXIA announced it had started shipping its 2 Tb Quad-Level-Cell memory devices with its 8th-generation BiCS FLASH 3D flash memory technology.

Read more...
Low noise 3-axis MEMS accelerometers
Altron Arrow DSP, Micros & Memory
The ADXL357 and ADXL357B from Analog Devices are digital outputs, low noise density, low 0 g offset drift, low power, three-axis accelerometers with selectable measurement ranges.

Read more...
ST’s biosensing tech enables next-gen wearables
Future Electronics DSP, Micros & Memory
The highly integrated biosensor device combines an input channel for cardio and neurological sensing, with motion tracking and embedded AI core, for healthcare and fitness applications.

Read more...