Embedded processors advance portability

01 May 2007

Embedded processors have made it possible for designers to build compact, power-frugal devices in wide-ranging medical applications involving implanted devices, portable devices, home-use devices, and security devices

By their very nature, portable medical devices need to be user-friendly and must be able to operate in sterile environments, while occupying little space and consuming low power. Medical devices also need sufficient computing power to process the data and connect to either wireless or wired interfaces for logging and sending data. These requirements demand low-power microcontrollers (MCUs) and digital signal controllers (DSCs). Examples of medical devices range from over-the-counter blood-pressure testers to tiny, wireless cameras that photograph the inside of a patient’s intestines.

System designers face many challenges posed by compact and portable medical electronics. For instance, the resources available for the conditioning of medical signals have an important bearing on the final cost of the medical instrument. At the high end, consider the design of an electrocardiogram (ECG), a complex and expensive instrument. In principle, the ECG works by measuring the heart’s electrical signal as it activates each of the four heart chambers. Probes attached to the skin near the heart detect these electrical signals, which are then processed and presented graphically. As the probes are placed on the patient’s skin, the signal is subject to degradation. This is usually countered by deploying multiple probes on the skin near the heart to obtain better signals. Then, by using firmware-based digital filtering techniques, signal degradation may be estimated using spectral analysis software available in embedded FFT (fast fourier transform) libraries.

Digital design
The number of probes on an ECG is determined by the available ADC channels on a DSC that controls the instrument. For example, with the latest dsPIC DSCs from Microchip, which feature six to 32 ADC channels with other peripherals for processing medical signals, the cost of an ECG instrument can be substantially reduced. Chip designers have incorporated several power-saving features into their devices that give medical device designers control over power consumption. Examples include idle, sleep and doze modes, providing considerable flexibility when it comes to scaling power consumption. When used in medical applications, system controllers can remain in a low-power state most of the time, waking up periodically under a timer’s interrupt to run program code. Power saving can only be achieved in portable systems by having the MCU control power used by both internal and external peripherals. It is good practice to partition a design based on power consumption, during its operation. In the design of a portable medical device, the required operation states should be determined and the design should allow shutdown of unwanted circuitry. If a single peripheral consumes most of the power, reducing the MCU’s power will have no impact on the overall system power consumption.

Peripheral vision
Peripherals should be turned off when not needed. For example, the brown-out reset (BOR) feature is not necessary in battery- powered applications. On the other hand, the CPU can be turned off using an idle instruction, keeping the peripherals running, as in the case of Microchip’s PIC18F family of nanoWatt MCUs.

A further step in power saving is to invoke the sleep state. Power consumption can be reduced by as much as 96 per cent in this case. In a class of portable medical systems that comprise a sensor, a storage device and a battery, it might be the case that the storage device and the sensor are powered up all the time. This wastes power in the system. By shutting down these peripherals under MCU control and using the MCU’s I/O lines, the storage device and the sensor are powered when required.

Clock check
When it comes to low-power applications, the oscillator start-up time plays a crucial role in MCU power consumption. During start up, while the oscillator stabilises, the MCU although idle continues to consume power. The oscillator start-up time depends on many factors, including the crystal, loading capacitors, system environment, oscillator mode, and so on. At slower clock speeds, a low-frequency oscillator uses less power while running, but it requires more start-up time, which may significantly affect the system’s power consumption. Choosing an MCU that features an oscillator start timer helps to ensure proper start-up and allows for adequate time to build up the oscillations. The oscillator timer helps the MCU execute code accurately, ensuring a stable build-up of the oscillator. On the downside, the time required for each wake-up cycle is extended. The solution to the oscillator start-up time problem is the ability to deploy a two-speed oscillator start-up, where you can switch to a faster internal oscillator frequency during start-up. With advanced MCUs, two internal clock sources are available as choices: a software-configurable 8MHz oscillator for normal operation and a 31kHz oscillator for low power consumption. Using these MCUs, clock frequency can be switched on the fly, enabling transition between external clocks and internal oscillators with no delay in code execution, thus conserving valuable ‘up’ time in power-sensitive medical devices.

I/O line configuration
Observing that every signal line in a portable device consumes power, designers need to be creative in handling the bi-directional I/O pins on MCUs. This is because some of these I/O pins can handle analogue inputs. By paying close attention to the signals applied to these pins, designers can ensure that the least amount of power can be consumed. Since analogue inputs offer high impedance, they consume very little current. In particular, they will consume less current than a digital input when the applied voltage is centered between VDD and VSS. Where possible, configure the shared digital/ analogue pins as analogue inputs to save power by forcing the digital input to a low- power state. Driving the external circuits

through digital outputs means there is no additional current consumed by a digital output pin, other than the current being sourced to power the external circuit. Configuring unused port pins as an output pin driving to either state (high or low), or leaving them configured as inputs with an external resistor pulling it to VDD or VSS, also saves power. When configured as inputs, only the pin input leakage current will be drawn through the pin, the same current flows if the pin were to be connected directly to VDD or VSS. This allows for a degree of flexibility. The pin can be used for either input or output, without having to make extensive hardware changes.

Power budgeting is a technique that enables designers to calculate current consumption and estimate battery life in a portable application. Going through the system operation and visualising the states that comprise the overall function of the device is a good place to start. Then, simply by observing portable medical applications as data-acquisition operations, the following modes become evident in a system operation: sleep, acquire data, scale data and store. Now, it is possible to estimate the time spent in each mode by carefully studying the control programme. The manufacturers’ datasheet will detail the current consumed for each device in the system. Then, compute the amount of charge consumed in each state by multiplying the total current in each state by the duration of that state during each loop cycle. From this power budget, the required battery size can be calculated to meet the application’s requirements using the formula:

Average Current = Total Charge/Total Time

If too much power is being spent in a certain state, work toward lowering the power consumption in that state.

Safety mechanisms
Safety is a high priority in medical applications, which makes it necessary for system designers to provide for emergency situations where an appliance can suffer from loss of power or programme control. There could be instances where the loss of a clock source can trigger an erroneous execution of a product’s control program. Several mechanisms are available from MCU vendors that ensure the safe and predictable operation of an MCU in a system. In certain MCUs, designers can take advantage of a fail-safe clock monitor feature to detect the loss of a clock source. When a clock loss is detected, the MCU’s internal oscillator will supply system clock signals, thus helping the system toward either a gentle shutdown or a ‘stay-alive’ mode, if shutdown is not desired. By using the latest controllers, designers can implement power-management techniques and build cost-effective portable medical devices.

Minimising power consumption in medical devices enables the use of smaller batteries, reducing the overall form factor. Additionally, the use of low-cost controllers now makes it feasible to design medical appliances that can be discarded after a certain number of uses.

STEVE KENNELLY is senior manager, Medical Products Group, Microchip Technology





Contact Details and Archive...

Related Articles...

Most Viewed Articles...

Print this page | E-mail this page