
MICROCONTROLLERS
In the design of any electronic device, low power consumption is a goal. In the case of portable medical devices, meeting power targets can be critical for the product to be successful.
A recent surge in the development of portable electronic medical devices is being fueled by advances in semiconductors. Small device packages, reduced power consumption, and on-chip connectivity options in semiconductors are factors that have driven healthy market growth for therapeutic and diagnostic medical devices, along with the increase in home-based medical care. According to the Databeans report "2005 Semiconductors in Medical Electronics" (available at www.databeans.net), there is a 15% annual growth rate for consumer medical devices, making these products a significant growth segment in the $100-billion device market.
Advanced semiconductors that integrate more features on a single device have enabled designers to miniaturize medical devices and to extend device lifetimes by lowering power consumption. Medical applications taking advantage of this technology involve implanted devices, portable devices, home-use devices, and security devices. Examples range from the compact glucose meters that diabetics use to monitor their blood sugar to tiny microelectromechanical system (MEMS)based pressure sensors placed inside the aorta to monitor the outcome of heart surgery.
In light of this trend, this article discusses how designers can exploit the advanced power-management features of a microcontroller unit (MCU) to lower power consumption in medical electronic applications.
Power Reduction Design Issues
Compact and portable medical electronics pose many challenges for system designers. Designing power supplies for low-power devices can be very tricky, because designers need to take into consideration the system's voltage and current requirements.
Batteries are the principal power source in many low-power applications. With them, the designer faces challenges regarding their chemistry, performance, capacity, size and weight, and cost. The higher internal resistance of high-capacity batteries, for instance, makes them unsuitable for high-current applications. Batteries that are suitable for high-current applications have lower capacity or greater weight than a similarly sized high-internal-resistance battery. Also, primary batteries in discharge-only mode have a much higher capacity than rechargeable secondary batteries. Given such constraints as these, it is up to the medical device designer to fashion a strategy that yields the best results for a particular system in terms of cost and performance.
Static power consumption is an important figure of merit that indicates how well an MCU fares in low-power applications. Some MCUs featuring advanced processing technology draw less than 50 nA in sleep mode.
For an MCU to be able to handle a variety of low-powered designs, it is important that it operate with a wide range of power supplies. For instance, when a device uses alkaline batteries, 1.8-V operation is desirable because the end voltage on each cell is 0.9 V and the application typically employs two cells. Selecting an MCU that operates over a wide voltage range can extend the operating life of a portable device.
However, the MCU's operating voltage range is not the only deciding factor. The designer should consider the entire system's operating voltage range, including the peripherals on the MCU. If a single peripheral in the system will consume most of the power, then reducing the MCU's power will have little effect on total system power consumption.
As a rule, if a system uses an internal peripheral on the MCU, such as an analog-to-digital convertor or an electrically erasable programmable read-only memory (EEPROM), the designer should pay careful attention to its operating range. In cases where some internal peripheral cannot operate across the MCU's full operating range, the system's operating voltage range is determined by the peripheral's range. The same design rule holds for any external system peripherals.
Power Reduction Methods
Some MCU families now commercially available provide special features for power management. These generally involve controlling power consumption by peripherals, letting the MCU sleep periodically, or manipulating oscillator start-up.
Controlling Power to Peripherals. A cardinal principle of power management in portable embedded systems is to enable the MCU to control the power used by both internal and external peripherals. When designing a portable medical device, the engineer should determine the physical modes or states required and then partition the design so as to shut down unwanted circuitry. For example, a brownout-reset feature is not needed in battery-powered applications. A designer thus can save power by disabling it.
Selecting the optimal MCU from among those of many different vendors can help the design engineer to eliminate external components and reduce costs. And, as previously mentioned, an MCU that can operate over a wide range of voltages will add versatility to the system design.
![]() |
Figure 1. (click to enlarge) The I/O pins of an MCU can be used to power the EEPROM and teh sensor in this data-recorder application. The MCU in this diagram is the PIC16F819 from Microchip Technology Inc. (Chandler, AZ).
|
Consider the example of an MCU-based medical data recorder device that comprises a sensor, an EEPROM, and a battery (see Figure 1). The diagrammed medical device shows how a low-power embedded design typically takes a sensor reading, scales the sensor data, stores the data in EEPROM, and then awaits the next sensor reading. In a conventional system, the EEPROM, the sensor, and the bias circuit might all be powered up all the time. However, that approach is not an efficient use of the available power source. To save power in a system like this requires being able to shut down these peripherals under program control when they are not needed, as shown in the figure. In the system depicted, the designer can use the MCU's input/output (I/O) pins and a few bytes of code to power the EEPROM and the sensor only when required. Because the I/O pins can source up to 20 mA, there is no need to provide additional components to switch the power.
MCU Sleep Modes. A popular method of saving power in embedded applications is to put the MCU to sleep occasionallyspecifically, at times when the system's demand for the controller's resources is low. Then, to perform useful work, the sleeping MCU is awakened, either through an interrupt or when a set period on a watchdog timer has expired. The longer the MCU can be allowed to sleep, the lower the average power consumed by the application will be. The important thing is for the designer to make sure that the watchdog time-out duration is appropriate for the application. Typically, this works as follows: If the application requires the MCU to process a data sample at the end of each repeated time interval of fixed length, then the watchdog timer should wake up the MCU once during each interval. To take advantage of such a feature requires, of course, that the designer select an MCU that supports the watchdog period that is appropriate for the application.
Clock-Speed Selection. Another factor designers need to pay special attention to in low-power applications is the oscillator start-up time. This start-up event occurs while the MCU is idle (that is, not executing any code). During the start-up period, as the oscillator stabilizes, the MCU is not doing any work, yet it continues to consume power. The oscillator start-up time usually is not mentioned in the MCU's data sheet, because its duration will vary depending on the crystal, the loading capacitors, the system environment, the oscillator mode, and so on.
The effect of oscillator start-up time on power can be especially significant in designs that use slower clock speeds. In applications in which the system clock transitions into and out of sleep mode, this start-up time can make quite a difference. A low-frequency oscillator uses less power while running, but it also requires a longer start-up time, which may affect the system's power consumption considerably.
Most popular MCUs implement some kind of oscillator start timer to ensure proper start-up and to provide adequate time to build up the oscillations. The timer prevents the undesirable condition of the MCU executing code before the oscillator is stable. However, it also extends the time necessary to complete each wake-up cycle.
The solution to this problem is to use a two-speed oscillator start-up. In this design arrangement, the MCU immediately starts to execute code from a fast-starting secondary oscillator, such as a resistance-capacitance oscillator. Then, when the primary oscillator is ready, it is switched into the circuit to replace the secondary oscillator. Such a design is critical for applications in which a device cycles from sleep to waking and back frequently. Some MCUs even allow the designer to run code using the internal oscillator while waiting for the oscillator start-up timer to count down. This type of two-speed start-up featurewhere the MCU is clocked from the internal oscillator until the oscillator timer expirescan be enabled by means of a function-register configuration bit.
Multiclock Start-Up and Operation. It is also possible to switch to an internal oscillator frequency during start-up for a faster transition where necessary. PIC MCUs from Microchip Technology Inc. (Chandler, AZ) furnish an example. These feature a technology that supports up to nine oscillator modes. A system designer can select from two internal clock sourcesa software-configurable 8-MHz oscillator for normal operation and a 31-kHz oscillator for applications in which low power consumption is necessary. The clock frequency can be switched on the fly; that is, the system can transition between external clocks and internal oscillators with no delay in code execution. In actuality, this amounts to a two-speed start-up feature, where the MCU can be run from either of the internal oscillators while an external clock source stabilizes on start-up. Once the external oscillator stabilizes, the MCU can make a clock switch, thus saving uptime in power-frugal medical devices.
![]() |
Figure 2. (click to enlarge) Wake-up timing in stages of a wireless receiver incorporating an MCU that supports two-speed oscillator start-up. The MCU in this diagram is the PIC18F4620 from Microchip Technology Inc.
|
Several stages of the two-speed start-up feature can be achieved, for example, in a wireless receiver that is polling a number of transmitters in a portable application (see Figure 2). During normal operation of the diagrammed device, the receiver polls for messages every 37 milliseconds. Assuming a system current target of <2 mA, the receiver can afford to consume 500 µA of current (average) for radio-frequency (RF) polling. The number of frequency changes can be at the designer's discretion.
I/O Pins
Bidirectional I/O pins are common on MCUs, appearing on most of them, and some of these pins can accept analog inputs. Designers should be careful about the signals applied to these pins so that the amount of power consumed can be minimized. Unused port pins present one case. If a port pin is unused, the designer can leave it unconnected but configured as an output pin driving to either state, high or low. Or, it can be configured as an input with an external resistor pulling it to VDD (the supply voltage) or VSS (the ground). When the port pin is configured as an input, only the pin input leakage current will be drawn through it. The current flow would be the same if the pin were connected directly to VDD or VSS. In this way, the pin can be used later, for either input or output, without extensive hardware changes.
When the input voltage is near VDD or VSS, a digital input pin is the type that consumes the least power. Significantly, if the input voltage is at a midpoint between VDD and VSS, the transistors inside the digital input buffer are biased in a linear region, consuming much more current. When such a pin is configured as an analog input, the digital buffer is turned off, allowing reduction of both the pin current and the total controller current.
Because they offer high impedance, analog inputs consume very little current. They will consume less current than a digital input when the applied voltage is centered between VDD and VSS. Where possible, configuring shared digital/analog pins as analog inputs will save power by forcing the digital input to a low-power state. A designer can minimize current consumption while driving the external circuits through digital outputs, by taking advantage of the fact that a digital output pin consumes no additional current other than that being used to power the external circuit.
Safety and MCUs
Safety is a priority consideration in medical electronic device design. Several mechanisms are available from MCU vendors to ensure that the MCU in a system operates normally and predictably while executing code.
In certain MCUs, a fail-safe clock monitor can be deployed to detect the loss of a crystal- or resonator-type oscillator or other external clock source. This is an important feature for medical applications. When a crystal fails, the fail-safe clock monitor switches to an internal oscillator and either allows safe shutdown of the application or allows it to continue running in a reduced-function mode.
Calculating Power Consumption
Designers can use a technique called power budgeting to estimate total average current consumption and battery life in a portable medical electronic application. Considering the sequence of modes in the data-recorder application presented in Figure 1sleeping, sensor warm-up, sensing, scaling, and storingthe following explains how this is done.
Analysis of the process loop enables the designer to determine the time the recorder spends in each mode during each cycle. Then, current-consumption numbers for each device used in the design are taken from the component data sheets provided by the component manufacturers. Multiplying the total current required in each mode by the duration of that mode yields the amount of charge consumed in that mode during each loop cycle (see Table I). Each loop cycle of the data-recorder application in question can be seen to take 2000 milliseconds and to consume a total charge of 18.8 X 10–6 ampere-seconds (As). Manipulation of data from the table results in the derivation of an average current of 0.009 mA, as follows:
|
|
Table I. (click to enlarge) Power budgeting calculations for the application in Figure 1.
|
|
|
Table
II. (click to enlarge) Available battery types and their capacities, assuming an average current
consumption of 0.009 mA. (Months are calculated as 30-day periods.)
|
Conclusion
By incorporating the latest MCUs into their applications, designers can implement power-management strategies to reduce power consumption in their electronic medical device designs. Minimizing power consumption in medical devices cuts heat generation and makes possible the use of smaller batteries. This, in turn, improves device operating lifetime, boosts patient compliance, and reduces overall device size.




