Advertisement

Interfacing MCUs to medical sensors

Engineers continue to create new medical devices that ‘touch’ the user through some kind of sensor

BY STEVE KENNELLY 

Senior Manager

Microchip Technology

www.microchip.com  

Ever since René Laennec made the first stethoscope out of a wooden tube, engineers have been designing devices to help doctors evaluate their patients. Like nearly everything else, medical devices are turning to electronics to push the state of the art. The use of microcontrollers has been especially significant in making medical devices more intelligent (see Fig. 1 ). Adding smarts to a medical device can reduce or eliminate human error, cut treatment costs, and improve the usability of a device. In many cases, these devices measure some physical property of a patient's body, and that means using a sensor. The type of sensor that's employed will have a major impact on what kind of circuitry is used to connect it to the MCU.

FAJH_Microchip_1_Aug2013

Fig. 1:  An example of the microcontrollers that are transforming medical devices.

Sensing resistance

One of the simplest medical devices to consider is a common digital weight scale. Not surprisingly, it uses one of the simplest sensors. Typically, a scale has a small footprint containing a strain gauge at each corner of the weighing platform. When the patient stands on the scale, the strain gauges deform, and that deformation causes a change in the resistance of the gauges. The four gauges are electrically connected in a Wheatstone-bridge configuration and the output voltage is proportional to the weight on the scale. Since the output is a differential voltage, an instrumentation amplifier can be used to make the signal compatible with an MCU's A/D converter. If a differential input is available on the MCU's A/D, then a buffer differential amplifier can be substituted for the instrumentation amplifier. Depending on the strain gauge used, an overall gain of 100 or so is sufficient for the circuit. Because the gain is modest and the output is essentially constant during the time of measurement, op amps with fairly modest specifications are sufficient for the task. Such an IC is usually selected on the basis of commercial factors, rather than technical specs.

Sensing with light

Other non-invasive measurements can only be made with more sophisticated sensors. For example, a pulse oximeter measures the oxygen saturation of blood based on the red light (600 to 750 nm) and IR light (850 to 1,000 nm) absorption characteristics of oxygenated hemoglobin (HbO2 ) and deoxygenated hemoglobin (Hb). HbO2 absorbs more IR light and allows more red light to pass through. Hb absorbs more red light and allows more IR to pass through. The ratio of red to IR light transmitted is proportional to the oxygen saturation of the blood. The sensor for this system consists of a red LED and an IR LED on one side of the finger, and a photodiode on the other side. In operation, the red and IR LEDs are energized alternately. The output of the photodiode indicates the intensity of each wavelength, allowing a ratio to be calculated. What may not be immediately apparent is that the LEDs will not have the same output intensity, nor will the photodiode have the same sensitivity to both wavelengths. In addition, light-based sensors have to cope with a wide range of ambient lighting conditions. This is handled by giving the MCU closed-loop control over the forward current of each LED. To finely control the LED current/intensity, a multiple output 12-bit D/A converter is used to individually control the base currents of bipolar transistors in series with the LEDs. Separate MCU signal lines control an analog switch to select which LED is on. The system is shown in Fig. 2 .

 FAJH_Microchip_2_Aug2013

Fig. 2:  A pulse oximeter measures oxygen in blood with a light sensor.

Like the weight scale and most other sensor-based medical devices, the output will eventually be fed into the A/D on an MCU. The output of the photodiode is a current and needs to be converted to a voltage. A transimpedance amplifier converts the few microamps of current generated by the photodiode to a few millivolts. The signal is then sent through a high-pass filter to reduce the background light interference, before being boosted by a gain-amplifier stage. Any sensor connected to the body has myriad sources of noise interfering with its signal, so the noise characteristics of the op amps used in each of these stages should be a primary selection criterion. For the same reason, the best choice for an MCU is one that has a capability for digital signal processing, to allow additional filtering to be done after digital conversion. After all the signal processing is done, the ratio of the two wavelengths is calculated, and the result is used as the input of a lookup table to determine the oxygenation level.

Electrochemical sensors

An even more complicated example of a sensor can be found in the familiar blood glucose meter. The main sensor in this system is a highly specialized electrochemical cell contained in a disposable test strip. When a glucose-bearing solution is introduced to the cell, it reacts with reagents that are already in the cell. This electrochemical reaction results in the liberation of electrons. Since the volume of the cell and hence the volume of the sample are tightly controlled, the total number of electrons generated is directly proportional to the concentration of glucose in the sample. The means of counting the electrons can vary, and is largely dependent on the specific details of the chemistry, which are proprietary to each manufacturer. Figure 3 illustrates one of the most popular methods. In this system, a controlled voltage source provides the stimulus to move the generated electrons through the cell. Depending on the chemistry, this can be a constant voltage reference or a time-varying stimulus. In the latter case, a D/A converter with 10 to 12-bit resolution is typical and high speed is not usually required.

 FAJH_Microchip_3_Aug2013

 Fig. 3:  A glucose meter's electrochemical cell interfaced to an MCU.

 

Once the voltage stimulus is applied, current starts to flow through the strip. The magnitude of the current first rises as the blood sample mixes with the chemicals in the cell, and then falls as the glucose in the blood sample is depleted. It is the integration of this current over time that yields the glucose concentration. The integration can be performed by piecewise approximation, after the output current is converted to a varying voltage using a transimpedance amplifier. The electrical output of the reaction cell can contain a substantial noise component, because of physical irregularities in the chemicals. It is therefore necessary to apply a low-pass filter to the signal, before it is amplified and converted to digital. The number of digital samples that are used to approximate the integral also differs from one manufacturer to another, and the applied stimulus can be changed based on the value of each sample. Because of the output's low magnitude, and the rate of change, an A/D with at least 12-bit resolution is preferred for this application. The voltage reference, transimpedance amp and gain amplifier should all be chosen for low noise as well as low power. The stringent requirements for this signal chain have led some designers to resort to using expensive dedicated analog-front-end integrated circuits.

 FAJH_Microchip_4_Aug2013

 Fig. 4:  An alternative simplified glucose sensor interface.  

 

  The electrochemical reaction cell used in glucose meters is a good example of a sensor that can interface with an MCU in a number of ways. An example of a specialized function that can be very useful is the Charge Time Measurement Unit (CTMU) peripheral found on many MCUs from Microchip Technology. The PIC24F32KA304, shown in Fig. 1, provides the entire analog signal chain. As shown in Fig. 4 , this approach uses the MCU's current source to provide the stimulus. The resulting voltage output can be directly interfaced with the PIC MCU's A/D.

Advertisement



Learn more about Microchip Technology

Leave a Reply