DESIGN AND RELIZATION MICROCONTROLLER BASED ELECTRONIC STETHOSCOPE DOR HEART AND SOUND ANALYSIS TO SUPPORT TELEMEDICINE SYSTEM Desy Nurhayati 1), Soegijardjo Soegijoko 2) 1) Biomedical Engineering, School of Electrical Engineering and Informatics Institut Teknologi Bandung Jl. Ganesha 10 Labtek VIII lantai III Bandung Indonesia, e-mail: desynurhayati@yahoo.com 2) Biomedical Engineering, School of Electrical Engineering and Informatics Institut Teknologi Bandung Jl. Ganesha 10 Labtek VIII lantai III Bandung Indonesia, e-mail: soegi@ieee.org Abstract - This thesis describes the completed design and realization of a portable microcontroller-based electronic stethoscope prototype, for heart and lung sound analysis. The prototype has been designed to cover three auscultation modes: cardiac mode (in the range of 20 Hz to 660 Hz), lung mode (in the range of 150 Hz to 1600 Hz), and extended mode (20 Hz to 8000 Hz). It is expected that the prototype will have improved sound quality with respect to an ordinary acoustic stethoscope. Moreover, the electronic stethoscope has the following additional specifications: 40 times of voltage amplification, sound recording capability (in external EEPROM), heart rate computation and display (in beat per minute), volume (gain) control, and data transmit to PC. The objective of this thesis is to develop a relatively low cost and portable microcontroller-based electronic stethoscope that is expected to significantly contribute to the development telemedicine system and production of future biomedical engineering instruments in Indonesia. It is expected that the electronic stethoscope will be served as a diagnostic instrument and to support telemedicine system. Telemedicine, which uses computer technology to transmit information from primary health care services to referral hospital, is being explored to permit access to health care for patients in remote locations. A specialist in referral hospital can use telemedicine to receive information on a patient in a rural area and send back the necessary response for the specific patient. Since the electronic stethoscope has a sound recording capability, the recorded data can be sent to a PC for possible tele-consultation and tele-diagnosis applications. A series of hardware and software laboratory tests have been conducted and the encouraging results have been used for some hardware and software modification and improvements. Further laboratory measurements and tests using a signal generator, electronic measuring instrument and involving some limited patients have also been completed. The results obtained have indicated that the microcontrollerbased electronic stethoscope prototype has successfully performed its intended specifications. The prototype has also shown its performance during a number of laboratory tests with patients i.e.: body sound measurements, recording and retrieving patient data to/from the external EEPROM, heart rate measurement and display on LCD, and transmit data to PC. Battery life time is approximately 3 hours for continuous using. All of those functional tests have been successfully conducted in Biomedical Engineering Laboratory - ITB. In conclusion, a portable microcontrollerbased electronic stethoscope has been designed, realized and successfully tested. For further development, a number of improvements are still required. Microcontroller and/or PC sofware modules may be developed for further specific sound analysis, system integration, and telemedicine applications. Key words : electronic stethoscope, microcontroller, auscultation, heart sound, lung sound, heart rate, PC, telemedicine. 1. INTRODUCTION A medical doctor made patient diagnosis based on interview about patient disease, physical examination, and other supporting examination (laboratory, radiography, USG, etc). Physical examination consists of inspection, palpation, auscultation, and percussion. Auscultation is patient examination with stethoscope to hear body sound. [1] 1
Sound quality of conventional acoustic stethoscope is not clear, especially low intensity sound. The number of sounds could not detect with acoustic stethoscope. Its can make diagnosis error. 2.ELECTRONIC STETHOSCOPE Electronic stethoscope is like acoustic stethoscope, but it has electronic instrument for amplified body sound and make a better quality of body sound. Others function are record sound, mode sound, display heart rate, transmit data to PC and volume control. 3. SYSTEM DESIGN Electronic stethoscope specifications show on table 1. 3.1 Placement Design of Electret Condenser Microphone on Rubber Tube Electronic Stethoscope The electret condenser microphone is placed in a rubber tube connected to the electronic stethoscope prototype. Distance microphone from electronic stethoscope chest piece is 21,79 centimeters, like on the picture 1. A specific distance of microphone based on equation bellow : [2] L = V/4f L = Distance from microphone to chest piece. V = Sound speed on the air f = Sound resonance frequency Table 1. Technical and Functional Spesifications of Microcontroller Baseds Electronic Stethoscope Tecnical Spesifications Microcontroller ATMEGA8535 Power supply : 9 V battery Electret condenser microphone Preamplifier (TL082) Demultiplexer (4052) Wide band pass filter (TL082) Audio amplifier (LM386) External EEPROM (AT24C256) LCD MATRIX (M1632) Buzzer Earphone (Telebit) Serial communication (RS232) Fungtional Specifications Electronic stethoscope have 3 mode : Heart mode (20-660 Hz) Lung mode (150-1600 Hz) Extended range mode (20-8000Hz) Amplified sound 40 x Sound can be hear via earphone. Heart counting and display Transmit sound data to PC and display on PC The completed microcontrollerbased electronic stethoscope prototype consists of both hardware and software parts. The hardware part of the system consist of an electret condenser microphone, a pre-amplifier, a demultiplexer, three different band pass filters, an audio amplifier, and an earphone. Additionally, the system also includes: a microcontroller system, a 2 x 16 matrix LCD, a buzzer, 5 push-buttons, an external EEPROM, an RS- 232 converter, a volume control potentiometer, and an In-System Programming (ISP) port. Picture 1. Placement design of microphone on rubber tube electronic stethoscope This design uses electret condenser microphone with small size, it has 5 mm diameters and 3 mm thick, therefore can placed on rubber tube of electronic stethoscope which has 5 mm diameters. Microphone take from Geius headset HS- 02F. Technical specification of microphone are : sensitivity 58 db + 4 db, omnidirectional, 2,2 Kohm impendances, frequency 50-10.000 Hz. [3] 3.2 Microcontroller ATMEGA 8535 Electronic stethoscope design uses microcontroller ATMEGA8535. [4] Function of microcontroller is to control electronic stethoscope operation. Picture 2 display block diagram of microcontroller based electronic stethoscope. Picture 3 display circuit diagram of microcontroller based electronic stethoscope. The microcontroller software has been especially developed to provide the following functions: system s initialization, menu control, demultiplexer control to select one of the three existing filters (modes), ADC control, LCD display, data transmit control, record data control, buzzer control and functional control of the five push buttons 2
The heart sound or lung sound received by the microphone, will be first amplified two times by the pre-amplifier, and filtered by the selected filter. The three wide band pass filters have three different frequency bands: heart mode (in the range of 20 Hz to 660 Hz), lung mode (in the range of 150 Hz to 1600 Hz), and extended mode (20 Hz to 8000 Hz). Each of the wide band pass filter uses a TL082 chip consisting of two operational amplifiers. The next stage is the LM386-based audio amplifier, having an amplification of 20 times. The earphone serves as the transducer to produce the audible signal required by the user... menu filter, transmit data, save data or heart rate. Flow chart of program at picture 4. Picture 4. Flow chart of microcontroller software Picture 2. Block Diagram of Microcontroller Based Electronic Stethoscope. Picture 5 show flow chart of mode heart rate. When select this mode, software flow chart start with initialization selecting filter based on input from push button. Heart band pass filter must be activated first when heart mode selected. After band pass filter activated, analog to digital conversion started. Next process is to save data in external EEPROM or transmit data to PC. If selected heart rate mode, heart counting started from digital data heart sound. Heart rate counting can be displayed on LCD (beat per minute). Picture 3. Circuit Diagram of Microcontroller Based Electronic Stethoscope. 3.3 Software Module First step when microcontroller program started is variable initialization, LCD, RS-232, interrupt and menu default. Menu procedure is a menu which operation depend on input from push button. Input from push button to select active menu : 3
4.1 Result of band pass filter circuit testing (frequency 20-660Hz) Testing of circuit block, to examine is the circuit operates like technical specification of electronic stethoscope. Frequency cut off : V out = V out max testing : 2 = 1,47 V : 2 = 1,039 V Testing result : Frequency cut off V out = 1,04 V : Frequency cutoff low = 18,55 Hz Frequency cutoff high = 623,4 Hz Frequency response of band pass filter circuit show at picture 7. R e s p o n p e n gu a t a n ( k a li) t e r h a da p f r e k u e n s i r a n g k a ia n ba n dp a s s f ilt e r ( f r e k u e n s i 2 0-6 6 0 H z ) 1.2 1 0.8 0.6 0.4 0.2 0 F re k u e n si (H z) Picture 5. Flow Chart of Microcontroler Sofware 4. TESTING AND ANALYSIS After instrument realization, a number of testing has be done, testing of hardware mad software. Picture 6 show microcontroller based electronic stethoscope realization. Picture 6. Microcontroller Based Electronic Stethoscope Realization. Picture 7. Frequency response of band pass filter circuit (20-660 Hz) 4.2 Testing and Analysis of battery life time This testing to measure battery life time. Battery energy (E bat ) counting from voltage of battery and ampere hour of battery. The equation can find bellow : E bat = V Ah = V I t E bat = battery energy (Joule) V bat = battery voltage (Volt) Ah = Ampere-hour V = voltage circuit (Volt) I = current (ampere) t = battery half life (hours) Technical specification of battery : 9 volts 175 mah, energy of this battery is 5670 joule. Measurement of voltage and current electronic stethoscope circuit operates with 9V batteries show on table 2. Table 2. Measurement of voltage and current electronic stethoscope circuit Tegangan Rangkaian (Vdc rms) Arus Rangkaian (Idc rms) Catu (+) Catu (-) Catu (+) Catu (-) + 8,3 V - 8,7 V + 56 ma - 20,2 ma 4
Battery life time approximately : For positive supply : Ebat 5670Joule t = = = V I 8.3V 56mA 12198,95 seconds = 3,39 hours For negative supply: Ebat 5670Joule t = = = V I 8,7V 20,2mA 32263,57 seconds = 8,96 hours Based that equation battery life time approximately 3 hours for continuous using. Table 3. Comparing heart rate counted by electronic stethoscope and manual (Patient B) 4.3 Testing results of heart rate counting This testing to compare between manual and electronic stethoscope heart rate counting. Manual heart rate counting uses acoustic stethoscope to counting heart rate. Measurement heart rate to two patients, with assumption this patient on the rest. The results displayed on LCD show at picture 8. Patient A (Woman, 58 years old, with arhythmia cordis) Arithmia cordis is heart rhythm disorders. Heart rate counting with electronic stethoscope is 87-93 beat per minute, heart rate average 89,2 beat per minute, and deviation standard 2,394. With manual counting, heart rate 80-92 beat per minute, heart rate average 83,2 beat per minute, and deviation standard 6,746. Difference between measurement with electronic stethoscope and manual because patient with arhythmia cordis has different cardiac rhythm and different amplitude. Table 4. Comparing heart rate counted by electronic stethoscope and manual (Patient A) Picture 8. Heart rate displayed on LCD Patient B (Woman, 30 years old, without heart diesease). Result of heart rate counting with electronic stethoscope is 80-85 beat per minute, average heart rate 82,9 beat per minute, and deviation standard 2,44. Heart rate counting manual is 80-92 beat per minute, average heart rate 84 beat per minute, and deviation standard 5,66. Result of heart rate testing show on table 3. Testing show deviation standard of patient with arhytmia cordis bigger normal patient. Manual heart counting is subjective and depends on sensitivity and accuracy of a medical doctor. Electronic stethoscope heart rate counting is objective and accurate. 5
4.4 Testing Data Transmit to PC via Sound Card PC Transmit data to PC via sound card, and display sound signal on PC with Cool Edit 2.0 software. Sound signal of heart sound show at picture 9. Picture 11. Signal of heart sound (Mitral Valve) Picture 9. Sound signal of heart valve (mitral valve and tricuspidal valve) Picture 11 show that heart sound signal BJ I result from electrical activity and mechanical BJ IV of the heart on cardiac cycle. At that picture show four of BJ the II heart sound. Picture 12 show relationship between electrical and mechanical even BJ on III cardiac cycle 4.5 Testing Data Transmit to PC via Serial Communication RS232 Data transmit to PC via serial communication RS232, sound signal display on PC with Delphi software. Testing conducted to male patient 24 years old without heart disease. Picture 10 show heart sound data which transmit via serial communication RS232. Picture 12. Relationship Four Heart Sound and Electrical and Mechanical Even on Cardiac Cycle [21] Picture 10. Heart sound signal (mitral valve) which transmit via serial communication RS232 5. CONCLUSIONS 1. The results obtained have indicated that the microcontroller-based electronic stethoscope prototype has successfully performed its intended specifications. The prototype has also shown its performance during a number of laboratory tests with patients (six patients) 2. The microcontroller-based electronic stethoscope prototype can perform the following function: body sound measurements, recording and retrieving patient data to/from external EEPROM, 6
heart rate measurements, and transmit patient data to PC for further process. 3. Sound data transmit via serial communication or sound card PC, record this data file *.wav. 4. Data transmit via serial communication RS232 and display on PC, heart sound signal show first heart sound, second heart sound, third heart sound and fourth heart sound. 5. Sound signal transmit via sound card PC and display with Cool Edit 2.0 software. 6. Battery life time approximately 3 hours for continuous using 7. This electronic stethoscope specialty compare with another methods : recorded sound, transmit sound data to PC to support telemedicine system. Additional functions to select auscultation mode, display heart rate, portable, display sound signal on PC, and inexpensive. Easily operation and operator select menu from LCD. For further development, a number of improvements are still required. Microcontroller and/or PC sofware modules may be developed for further specific sound analysis, system integration, and telemedicine applications. REFERENCES [1] Bates Barbara, A Guide to Physical Examination and History Taking, JB Lipincot Company Philadelphian, 1991, Fifth Edition [2] Jocelyn Durand, Louis-Gilles Durand, Marie-Claude Grenien, Electronic Stethoscope, United States Patent No. 5.602.924, 11 Februari 1997, http://uspto.gov, (9 Maret 2006 jam 21.00) [3], Spesifikasi Teknis Headphone Genius Tipe HS-02F Foldable Headband Headset, www.geniusnet.com.tw [4], 8-bit AVR Microcontroller with 8 K bytes In- System Programmable Flash, Atmega 8535, www.atmel.com (tanggal 2 Januari 2007 jam 20.00) [5] Boylestad, Robert L., Introduction Circuit Analysis 10th Edition, Prentice Hall, New York, 2003 [6] Brown et al, Introduction to Biomedical Equipment Technology, Prentice Hall, 2001, Fourth edition [7] Coughlin Robert, Frederick F. Driscott, Operational Amplifiers & Linear Integrated Circuits, 5 th International Edition, Prentice-Hall International Inc., 1998 [8] Erickson Barbara, Auskultasi Bunyi dan Bising Jantung Pedoman Praktis,, Binarupa Aksara, 1988 [9] I Made Joni, Budi Raharjo, Pemrograman C dan Implementasinya, Penerbit Informatika, 2006 [10] Jogiyanto Hartono, Konsep Dasar Pemrogramanan Bahasa C, Penerbit Andi, 2003 [11] Ladjamudin Al Bahra, Rekayasa Perangkat Lunak, Penerbit Graha Ilmu, 2006 [12] Lingga Wardana, Mikrokontroler AVR Seri ATMega 8535, Penerbit Andi, 2006 [13]., TL082 Wide Bandwidth Dual JFET Input Operational Amplifier, April 1998, National Semiconductor Datasheet CD-ROM [14], RS 232 Interface with MAX 232, www.atmel.com\atmega/max232.htm (7 Januari 2007 jam 04.00) [15], Two-wire Serial EEPROM AT24512,, www.atmel.com (12 Januari 2007 jam 21.00) [13], LM386 Low Voltage Audio Power Amplifier, Januari 2000, National Semiconductor Datasheet CD-ROM [16], HD44780U (LCD II), http://web.mit.edu (1 Maret 2007 jam 05.00) [17], The Extended Concise LCD Data Sheet, www.stanford.edu (1 Maret 2007 jam 06.00) [18] Audioguru, Electronic Stethoscope 2, www.electronicslab.com/projects/science/019/index.html (24 April 2005 jam 15.00) [19] DesLauries et al, Combined Electronic Acoustical Stethoscope, www.uspto.gov (!% April 2005 jam 20.00) [20] Duran et al, Electronic Stethoscope, www.uspto.gov (11 April 2005 jam 20.00) [21] Webster, Medical Instrumentation Aplication and Design, John Wiley & Sons, Inc, 1988, Third Edition. 7