holter basado en microp 2

Upload: piolin82

Post on 17-Oct-2015

7 views

Category:

Documents


0 download

TRANSCRIPT

  • A MICROCONTROLLER-BASED PORTABLE ELECTROCARDIOGRAPH SYSTEM

    J. J.Segura-Jucirez, D. Cuesta-Frau and LSamblas-Pena

    Department of Computer Science, Polytechnic University of Valencia (EPSA), Alcoi, Spain, EU

    ABSTRACT

    The ambulatory acquisition and monitorization of electro- cardiograms (ECG) under not controlled conditions, is a practice of paramount importance in cardilogy diagnosis nowadays. The ECGs are acquired while patients develop their normal life, using a portable device. The storage ca- pacity of such devices usually ranges from 24 to 48 hours.

    The systems used to perform this task are the so-called Holter systems. In this paper we describe a low cost sin- gle channel Holter system, based on a microcontroller, to register the ECG signal continuosly during up to 48 hours. This microcontroller system runs off batteries, and includes many peripherals such as a display, keyboard, se- rial interface, solid-state memory, and some electronic cir- cuits.

    1. INTRODUCTION

    Electrocardiography is a non-invasive technique to ascer- tain the state of the heart, based on the electrical potential generated by it and measured on the body surface using, in its basic configuration, two electrodes and a galvanome- ter. This technique is widely known and nearly a cen- tury old already. Nevertheless, in the last decades mainly, due to the availability of powerful and low cost comput- ers, electrocardiography has witnessed the development of new systems and applications, such as the ambulatory ac- quisition of ECGs using the so-called Holter systems [l]. These systems are used to register the signal during a long period of time, between 24 and 48 hours, in order to detect some heart malfunctions difficult to find using a simple electrocardiogram.

    In this paper we present the development of a com- plete Holler system based on microcontroller. ?he cir- cuit uses standard integrated circuits and components, and therefore, it is a low cost set easy to build. It can be used in clinical practice, since it fulfils all the required speci- fications, and in microcontroller and electronics teaching purposes, as it covers a wide range of topics related to mi- crocontrollers and signal conditioning. Many other similar circuits have been repotted so far in the technical litera- ture, as those described in [Z], [31, and [41, hut, as far as we know, none of them describes a portable and affordable device with the performance of a commercial Holter.

    Computational power of a simple microcontroller is enough to implement a Holter system, since the most com-

    Figure 1. Main blocks of the system. For the sake of sim- plicity, some block interconnections have been omitted.

    plex and time consuming tasks are usually carried out off- line, in a personal computer. Moreover, the sampling fre- quency required to obtain a good quality ECG is fairly low, of some 100Hz. Therefore, the microcontrollercan devote more time to the rest of tasks, such as error generation, memory card operations, etc.

    The organization of this paper is as follows. In the next section, Methodology, all the stages of the process will be described Acquisition, probe, amplifier, analog to digital conversion, processing, storage, visualization, serial inter- face, and power source. In the last section, Conclusion, we will summarize the main points of this paper and the future work.

    2. METHODOLOGY

    The system description will he performed according to the logical order of the stages. We will first address the ac- quisition stage, follow the signal path through the probe, amplifier and analog to digital converter, and finish with the data storage in memory and the power source. Fig. 1 is a schematic diagram of the system main blocks.

    2.1. Acquisition

    The ECG signal acquisition is obviously the first stage of the process. Three electrodes are used, placed at different points on the patients body surface. The exact position depends on the type of analysis required or the lead de- sired. Two of the electrodes are the differential input, and the third is used to reduce the noise due to the power line

    0-7803-8163-7/03/$17.00 0 2003 IEEE ICECS-2003 922

  • interference, and to provide a return way for the polariza- tion currents [51.

    2.2. Probe

    The probe is the electrical connection between the elec- trodes and the amplifier, the system input. It consists of three wires, which are shielded and twined in order to re- duce as much as possible the induced electrical noise. In the amplifier end, the probe has a shielded tripolar connec- tor and a fastening system to prevent the accidental uncou- ple due to sudden jerks or patient movement during their usual activities.

    The probe shield is connected to the common mode voltage of the differential amplifier through a voltage fo- llower, which derives the interference currents induced in the wire towards ground. This connection allows us to reduce the parasitic capacitance that appears between the wires and the ground when it is connected to ground, and therefore avoids input impedance reduction.

    2.3. Amplifier

    The first block of the system is the differential instrumen- tation amplifier. Since the level of the electrocardiograph signal is only of some p V , it is necessary to amplify it to match the levels of the analog to digital converter, avoi- ding saturation either in the amplifier or the converter. A precise amplifier has been designed with very low pola- risation currents and small offset voltages to fulfil these requirements. A high common mode rejection of around 120dB is also achieved.

    This amplifier includes a high pass filter, formed by a quadruple precision operational amplifier, to filter out the base line wandering. The amplifier also creates a virtual ground, applies the common mode voltage to the probe shield, and reduces the third electrode impedance to mini- mize the power line interference. This amplifier satisfies the American Heart Association specifications about the bandwidth of the amplifier, O.lHz-Il"z, in order not to lose i m p o m t information of the signal. This margin is the minimum required to avoid a distortion greater than 10% in the signals.

    In Fig. 2, the different electrocardiographic amplifier stages are shown. It is basicaly composed of a first stage of an instrumentation amplifier and four more stages based on different configurations using operational amplifiers. Following the probe connected to the human body surface, it can be noticed that the derivation enters directly to the instrumentation amplifier, and then the baseline wander is filtered out using an operational amplifier with adjustable gain. The rest of the stages are support stages for the previ- ous ones with the following rationale: the operational am- plifier AO(U1C) is used to create a virtual ground with a voltage level half that of the power supply. The stage with the OA(U1A) is a voltage follower whose ouput is connected to the probe shield. Therefore, the loses due to parasitic capacitances are reduced, and moreover, the lead is protected against the electrical noise of the circuit

    ..

    Figure 2. Differential instrumentation amplifier.

    environment. The last stage with the OA(U1D) is an in- verter amplifier. The third electrode impedance is reduced using this configuration, and a high impedance is applied to prevent the ground-fault h,uard. Nevertheless, electri- cal shock is very unlikely since the system only mns off batteries.

    2.4. A/D Conversion

    Once the ECG signal has been amplified and filtered, it must be digitized. The analog to digital converter utilised is the AD7888 [SI. This converter has 12 bits of resolu- tion, and 8 input ports, although in this application only two are used. The amplifier is software controlled and the conversion takes place during the error calculation of each memory sector. Each sample converted is stored in the cor- responding memory area, which, after completing a whole data page, will be written in memory alongside error cal- culations computed in parallel with the analog to digital conversion.

    The AD7888 is capable of a 125KSPS rate. The input track and hold acquires a signal in 50011s and this circuit operates with a power supply voltage from 2.7 V to 5.25 V. CMOS construction ensures low power dissipation, tipi- cally 2mW for normal operation and 3pW in power-down mode. The DC accuracy of th,: AD7888 is tipicaly 1 LSB of integral nonlinearity, -U+] .5 LSB differential nonlin- earity, and an offset error of & 6 LSB.

    Communication with the AD converter is perfomed through the SPI port of the microcontroller, and by means of an enable signal also controlled by the processor. Am other converter input is used to measure the power source voltage and thus monitorize the battery charge level. This level can also be checked by the user using the interac- tive menu shown on the display. All its features regarding the low power consumption, power source voltage require- ments, control, and communications, make it a very suit- able choice for this application.

    2.5. Processing

    This is the most important stage of the system. On one hand, it is devoted to interact with the user through a nav- igating menu shown on the I.CD display. On the other hand, it stores the data obtained from the analog to digital converter in memory, using a suitahle format in order to be read by the operating system properly. It also has the

    923

  • serial port control through which data can be transmitted in real time if desired. The LCD control where the interac- tive menu is shown is included. The display contrast level can be adjusted by means of a microcontroller pin. It also controls the calendar and power failure protection circuit which will be described in section 2.9. The user can also interact with the system using a simple keyboard.

    The CPU of the system is the ATMEL microcontroller T89C51RC2 [IO], compatible with the Intel family of mi- crocontrollers MCS5 l . This microcontroller has embed- ded peripherals such as:

    Two timers of 16 hits.

    One UART with the possibility of using masks

    A watchdog clock.

    Six bidirectional parallel ports.

    Power saving modes,

    A matrix of programmable counters.

    A keyboard interface.

    F-rlP# p,*r f . > r n " / . U C - 1 *S"CUI

    Figure 3. Schematic diagram of the memory card. In this device, a SmartMedia memory card is used.

    crihed, as well as the data format needed to assure com- patibility. The memory capacities available cover a fairly wide range, from 2MB to 128MB, and they can he powe- red using two voltages: 5 and 3.3 volts. This card model is cheaper and easier to use than others with similar perfor- mance, and the reliability of the data storage is very high, making it appropriate for this medical application. In Fig 3 the schematic of this card is depicted.

    The parallel pan, aw used to chaw data amung thv periph- cralr. sXcsDt the LCD the S , , , d v d i n card. which

    The system prrvcntsthc uscrIromutiliJing invalidcard\. For instance, i f it is detscvd that the card intormatim sys-

    are memory mapped. The microcontroller ports 0 and 2 are used as data and addresses ports respectively, for the devices directly memory mapped. Port 1 is used for com- munications through the integrated SPI interface, which can be put in shutdown mode to reduce the power con- sumption. Port 3 hits are used for different tasks: serial communications through the embedded UART, write and read signals of the memory mapped devices, external in- terrupts, some other peripherals control, etc.

    The system is programmed to perform a wide range of operations such as memory card formatting, activate po- wer saving functions, sample frequency adjustment, ac- quire and store the electrocardiographic signal, data and time set, alarms programming, LCD contrast adjustment, etc. Programming language used has been C.

    The computational burden of the microcontroller is ma- inly due to the error calculations. This process takes around 2 seconds for each sector, which is a delay unaccetably large for the sampling process. In order to obtain a uni- form sampling, the data acquisition is embedded in the er- ror calculation algorithm.

    Regarding the memory card, the control is canied out on a hardware level by means of the ports, as mentioned before. The software to control this card checks if the card inserted is valid, and its capacity, whether it is formatted or not, the free memory available, writes the data files, etc. This p a t is transparent to the user.

    2.6. Storage

    The storage system chosen for this device is a solid state memory, based on the SmartMedia model [9], whose for- mat is regulated by the SSFDC [ I I , 121, where the ope- ration, hardware and software of this kind of cards is des-

    tem (CIS) is damaged or missing, a warning message will be issued. On the other band, if the blocks are present, but the format is invalid, another warning will be shown. The system suppolts all the cards powered with 3.3 volts, which are the ones with the highest capacities, whereas those powered with 5 volts are of low capacity and not supported.

    2.7. Visualization

    For menu visualization, warning messages, process infor- mation, etc, the system has a E D . It is controlled through ports 4 and 5. The display has a character matrix of 2 rows per 16 columns, whose size is 84x44 mm. The display data bus width can be configured to work with 4 or 8 bits. This feature allows the display to be used either with 8 or 4 bit microcontrollers. Asserting its busy line, the data flow can be controlled.

    2.8. Serial Interface

    The microcontroller can share data with a personal com- puter through a RS-232 serial interface or directly by me- ans of the memory card, which is the usual case. Never- theless, in order to have the possibility of real time data transmission, this serial interface has been added to the system. In Fig. 4 a visualization example is shown.

    The serial interface needs 3.3 volts, with a consump- tion of 1.3mA during normal operating mode, and 0.01pA in shutdown mode. The connector is a typical male DB9 for printed circuits.

    924

  • Figure 4. ECG data visualization and editing in a personal computer.

    2.9. Power Source

    This portable Holter system tuns off two AA batteries se- rial connected, which can he rechargeables, yielding a vol- tage of 3V. Since the system needs 3.3 volts, the voltage must be increased. Moreover, due to the fact that the ha- tteries voltage is not constant with the use, an extra protec- tion against voltage level drops is needed, using a control loop. This two objectives are achieved using the circuits M A X 8 5 6 [I41 and DS1305 [151.

    The integrated circuit M A X 8 5 6 is a step-up DC-DC converter used to increase the power source voltage. This circuit also has a control loop to keep the ouput voltage at the level desired. This level is indicated by an input of the circuit, with two possibilities, 3.3 volts in case it its con- nected to Vcc, or 5 volts if connected to ground. There is also an internal circuit to assert a signal in case the out- put falls below the desired level. This signal is used to request an intermpt. The integrated circuit DS1305 con- sists of a calendar, two programmable alarms (for only once, every day, every hour, every minute), communica- tions using port SPI and 96 bytes of non-volatile RAM. One of the main features of this circuit is that it can switch the power source to an auxiliary battery in case of power failure. This battery can he rechargeable or not. In the first case, it can he recharged in the circuit itself. When the po- wer level goes under the level of the auxiliary battery, this circuit COMEIS the auxiliary battery to the system and as- serts a signal. This is implemented in order to have an non-intemptable power system in the circuit. If the batte- ries are about to be exhausted, the system raises an alarm to wam the user. After ten minutes, if the batteries have not been replaced, the data is stored in the memory card, and the whole system shuts down.

    3. CONCLUSION

    In this paper, a low cost, microcontroller-based Holler sys- tem has been presented. Unlike other similar circuits des- cribed in the technical literature, this system is fully por- table, and only uses standard components easily available. Nevertheless, the performance qualities of the system are comparable to those available in professional systems.

    Acknowledgment The authors would like to thank the department of cardiol- ogy of the Verge dels Lliris :Hospital of Alcoi (Spain) for their clinical tests and advice. The authors also wish to acknowledge the support of the INNOVA project, of the Polytechnic University of Valencia (Spain).

    4. REFERENCES

    [ I ] N.J. Holter, New methods for heart studies, Science, no. 134, pp. 1214,1961.

    [2] E. Jovanov et al., Real Time Holter Monitoring of Biomedical Signals, DSP Technology and Education Conference. DSPS-99, Houston, Texas (USA), August 4-6, 1999.

    [3] Massachusetts Institute of Technology, Bioelectron- ics Project Laboratory, Illectrocardiogram Amplifier, November 2002.

    [4] C.M. Tenedero, M.A.D. Raya, L.G. Sison, Design and implementation of a single-channel ECG a n - plifier with DSP post-processing in Matlab, Third National Electronics a i d Engineering Conference, Philippines, November 27-29,2002.

    [SI Jose M. Ferrero Corral, Bioelectrdnica, senyales bioelictricas (in Spanish). Valencia: SPUPV, 1994.

    [6] S. Franco, Design with operational amplifiers and analog integrated circuiis, McGraw-Hill, New York, 1997.

    [7] Berson A.S., Lau F.Y., Wojick J.M., Pipberger H.V., Distortions in infant electrocardiograms caused by inadecuate high-frecuency response. American Heat7 J o u m l , no.93, pp. 730-734, 1977.

    [SI AD7888 Analog Devices, 2.7 to 5.25, Micmp- owe6 8-Channel, IZSKSPS, 12-Bit ADC datasheet, www.analog.com

    tion, Memory Product & Technology Division, 1999.

    [IO] T89C5 IRB21RC2 Atmal Micmcontrollerdatasheet ,

    [l 11 SmartMedia, Logical Amur Specifications, Techni-

    [I21 SmarlMedia, Physical F o m t Specifications, Tech-

    [I31 MAX749 MAXIM Digitally adjustable LCD bias

    [I41 MAX8561859 MAXIM Step-up DC-DC converters

    [I51 DS1305 MAXIM Serial Alarm Real-lime Clock

    [9] Samsung Electronics, SrlanMedia Format Intmduc-

    www.atmel.com

    cal committee of the SSFDC Forum, 1999.

    nical committee of the SSFDC Forum, 1998.

    supply datasheet, wwwmaxim-ic.com

    datasheet, wwwmaxim-ic.com

    datasheet, www.maxim-ic.com

    925