Design and Implementation of Digital Stethoscope using TFT Module and Matlab Visualisation Tool

Similar documents
Assist Lecturer: Marwa Maki. Active Filters

WIRELESS ELECTRONIC STETHOSCOPE USING ZIGBEE

STM32 microcontroller core ECG acquisition Conditioning System. LIU Jia-ming, LI Zhi

ME 461 Laboratory #3 Analog-to-Digital Conversion

When input, output and feedback voltages are all symmetric bipolar signals with respect to ground, no biasing is required.

ECE 6770 FINAL PROJECT

ELG3336 Design of Mechatronics System

Application Note 160 Using the DS1808 in Audio Applications

CHARACTERIZATION OF OP-AMP

Electronic Instrumentation ENGR-4300 Fall 2002 Project 2: Optical Communications Link

LINEAR IC APPLICATIONS

Capacitive Touch Sensing Tone Generator. Corey Cleveland and Eric Ponce

OPERATIONAL AMPLIFIER PREPARED BY, PROF. CHIRAG H. RAVAL ASSISTANT PROFESSOR NIRMA UNIVRSITY

Intruder Alarm Name Mohamed Alsubaie MMU ID Supervisor Pr. Nicholas Bowring Subject Electronic Engineering Unit code 64ET3516

GOVERNMENT OF KARNATAKA KARNATAKA STATE PRE-UNIVERSITY EDUCATION EXAMINATION BOARD II YEAR PUC EXAMINATION JULY-2012 SCHEME OF VALUATION

Infrared Communications Lab

Lecture 14 Interface Electronics (Part 2) ECE 5900/6900 Fundamentals of Sensor Design

PHYSIOLOGICAL SIGNALS AND VEHICLE PARAMETERS MONITORING SYSTEM FOR EMERGENCY PATIENT TRANSPORTATION

ECE 3400 Project. By: Josh Skow and Bryan Cheung

Advanced Measurements

ECEN Network Analysis Section 3. Laboratory Manual

GSM BASED PATIENT MONITORING SYSTEM

Underwater Signal Processing Using ARM Cortex Processor

EMG Sensor Shirt. Senior Project Written Hardware Description April 28, 2015 ETEC 474. By: Dylan Kleist Joshua Goertz

UNIVERSITY OF PENNSYLVANIA EE 206

Pre-Lab. Introduction

Massachusetts Institute of Technology MIT

Heart & Breath Sound Amplifier

Low Cost Screening Audiometer

ECE3204 D2015 Lab 1. See suggested breadboard configuration on following page!

Analog Electronics. Lecture Pearson Education. Upper Saddle River, NJ, All rights reserved.

EE 3305 Lab I Revised July 18, 2003

Sampling and Reconstruction

Week 8 AM Modulation and the AM Receiver

PULSE OXIMETRY MODULE TO IMPLEMENT IN TEAM MONITOR OF VITAL SIGNS

Data acquisition and instrumentation. Data acquisition

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Linear Integrated Circuits Applications

OPERATIONAL AMPLIFIERS and FEEDBACK

Study of Directivity and Sensitivity Of A Clap Only On-Off Switch

XR FSK Modem Filter FUNCTIONAL BLOCK DIAGRAM GENERAL DESCRIPTION FEATURES ORDERING INFORMATION APPLICATIONS SYSTEM DESCRIPTION

AD8232 EVALUATION BOARD DOCUMENTATION

Sensor Interfacing and Operational Amplifiers Lab 3

Chapter 6. Development of DPOAE Acquisition System for. Hearing Screening

Low Pass Filter Introduction

Experiments #7. Operational Amplifier part 1

Learning Objectives:

Homework Assignment 07

ECE4902 C Lab 5 MOSFET Common Source Amplifier with Active Load Bandwidth of MOSFET Common Source Amplifier: Resistive Load / Active Load

Fill in the following worksheet-style pages. A colored pen or pencil works best. The procedure is:

Laboratory Activities Handbook

Lab 4 Digital Scope and Spectrum Analyzer

Draw in the space below a possible arrangement for the resistor and capacitor. encapsulated components

GATE SOLVED PAPER - IN

E84 Lab 3: Transistor

LM13600 Dual Operational Transconductance Amplifiers with Linearizing Diodes and Buffers

PHYSICS 330 LAB Operational Amplifier Frequency Response

Internal Sound Denoising for Traditional Stethoscope Using Inverse Chebyshev IIR Bandstop Filter

I1 19u 5V R11 1MEG IDC Q7 Q2N3904 Q2N3904. Figure 3.1 A scaled down 741 op amp used in this lab

Project 1 Final System Design and Performance Report. Class D Amplifier

EE 332 Design Project

Pulse Sensor Individual Progress Report

Laboratory Assignment 1 Sampling Phenomena

1 Overview. 2 Design. Simultaneous 12-Lead EKG Recording and Display. 2.1 Analog Processing / Frontend. 2.2 System Controller

ECE 363 FINAL (F16) 6 problems for 100 pts Problem #1: Fuel Pump Controller (18 pts)

6.101 Introductory Analog Electronics Laboratory

Advantages of Analog Representation. Varies continuously, like the property being measured. Represents continuous values. See Figure 12.

CONDUCTIVITY sensors are required in many application

Homework Assignment 07

EXPERIMENT 2.2 NON-LINEAR OP-AMP CIRCUITS

Lab 7: DELTA AND SIGMA-DELTA A/D CONVERTERS

MAS.836 HOW TO BIAS AN OP-AMP

Homework Assignment 06

ECEN 474/704 Lab 6: Differential Pairs

Two stage Cascade BJT Amplifier

UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering And Computer Sciences MULTIFREQUENCY CELL IMPEDENCE MEASUREMENT

CHAPTER 14. Introduction to Frequency Selective Circuits

ETEK TECHNOLOGY CO., LTD.

Document Name: Electronic Circuits Lab. Facebook: Twitter:

CHAPTER 3. Instrumentation Amplifier (IA) Background. 3.1 Introduction. 3.2 Instrumentation Amplifier Architecture and Configurations

Operational Amplifiers

Emulation of junction field-effect transistors for real-time audio applications

AN-1106 Custom Instrumentation Amplifier Design Author: Craig Cary Date: January 16, 2017

A Simple Notch Type Harmonic Distortion Analyzer

AN-742 APPLICATION NOTE

55:041 Electronic Circuits The University of Iowa Fall Exam 3. Question 1 Unless stated otherwise, each question below is 1 point.

Problem 1. Final Exam Spring 2018 (Reposted 11p.m. on April 30)

Design of Low-Cost Multi- Waveforms Signal Generator Using Operational Amplifier

EK307 Active Filters and Steady State Frequency Response

An Automatic Voice-Controlled Audio Amplifier

Analog Circuits and Systems

Op-Amp Simulation Part II

Special-Purpose Operational Amplifier Circuits

Module 5. DC to AC Converters. Version 2 EE IIT, Kharagpur 1

Instrumentation Amplifiers Filters Integrators Differentiators Frequency-Gain Relation Non-Linear Op-Amp Applications DC Imperfections

Electronic Instrumentation

ActiveLowPassFilter -- Overview

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

Chapter 2 Analog-to-Digital Conversion...

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2017 Lecture #5

UNIVERSITY OF NORTH CAROLINA AT CHARLOTTE Department of Electrical and Computer Engineering

Transcription:

World Journal of Technology, Engineering and Research, Volume 3, Issue 1 (2018) 297-304 Contents available at WJTER World Journal of Technology, Engineering and Research Journal Homepage: www.wjter.com Design and Implementation of Digital Stethoscope using TFT Module and Matlab Visualisation Tool Aishwarya R Shivani a* a Electronics and Communication Engineering, R.V. College of Engineering, Mysuru Road, R. V. Vidyanikethan Post, Bengaluru, Karnataka-560059, India Keywords Heart murmurs MATLAB Visualization Tool TFT Module Acoustic sensor Microcontroller A B S T R A C T Sometimes we hear whooshing sounds also known as heart murmurs. These are caused due to irregular flow of blood to the heart. These sounds can be loud or faint, which is scarcely audible to human ear. Heart murmurs may be harmless for many people indicating that they do not have any health issues. But, sometimes a heart murmur can be a sign of serious heart problem. Stethoscope is an electronic medical instrument that the doctors use to capture the interior sounds of human body mostly lungs and heart. Based on the captured sounds, the doctors can analyze the condition of the patient. The traditional stethoscope available to consumers has low sensitivity and is susceptible to noise. In order to resolve this problem, an advanced technology is used where the captured sounds from the body are amplified and digitized. Such a stethoscope converts the captured audio signals to electrical signals by using a sensor. It is then amplified, filtered and converted to digital from analog by using ADC circuit. A digital stethoscope helps the physicians to detect the cardiac murmurs and reduces the errors occurring during the analysis of patient s heart. 2018 WJTER All rights reserved

I. INTRODUCTION The need for Stethoscope has been dominating for their high popularity persistently in the market. A digital stethoscope helps in overcoming the low levels of sound captured from the body by amplifying and filtering the unwanted noise [2]. Keeping in mind these facts, in this project, we implement a low cost digital stethoscope system that detects the cardiac murmurs [1]. Sometimes cardiac murmurs go unnoticed during the check-ups [3]. Therefore, a digital stethoscope can be used to assists the physicians to analyze and monitor the cardiac signals in real time during the process of accessing the cardiac sounds. This design consists of an acoustic stethoscopic sensor that converts captured heart signals to electrical signals which is processed by ARM microcontroller for intensifying and strengthening. These signals are further filtered and converted to digital data from analog data. The system uses TFT module to display the real time cardiac waveforms for user interface. A program is written using the MATLAB visualization that calculates the average heart rate of the patient in beats per minute. Overall this design consists of an amplifying circuit, digital filter, an interfacing circuit and graphical user interface. The robustness and cost-effectiveness makes this design reliable for monitoring the real time cardiac signals. II. BACKGROUND 1. Introduction 2. Background 3. Methods and equation 3.1 System Architecture 3.2 Hardware Implementation 3.3 Software Design and Implementation 3.3.1 Signal Acquisition 3.3.2 Transfer of Serial Data and PWM Generation 3.3.3 TFT Module 3.3.4 MATLAB Visualization tool 4. Figures and Tables 5. Conclusion 6. Future Work 7. Acknowledgements III. METHOD AND EQUATIONS 3.1 System Architecture The complete architecture of this design is centered on ARM 7 microcontroller. The acoustic sensor is an input to the microcontroller while, the TFT module and the MATLAB visualization tool are the outputs. Figure 1 shows the block diagram of this high level design. The microcontroller acts a platform for various interfaces and supports many features of stethoscope design. The signal acquisition interface uses ADC to sample the signal at sensor at 8 KHz. By using this sampled value, a pulse width modulation is done. The outputs are passed to a low-pass filter to eliminate all the high frequency component. This data is sent to UART protocol through microcontroller. Additionally this system displays real time output cardiac waveform and calculates the average BPM. 298

3.2 Hardware Implementation The frequency of heart beat ranges from 10Hz to 250Hz. Usually, there are two kinds of heart sounds that occur in sequence with the heart beat known as lub and dub. The primary heart sound (S1) occurs due to closing of AV valve while the secondary heart sound (S2) occurs due to closing of semilunar valves. S1 has a frequency range of 10-200Hz while S2 has a frequency range of 50-300Hz. The acoustic sensor which is the basic and integral component in the system has a range of frequency from 20Hz to 20 KHz. The quality of real time output cardiac waveforms imparts directly on the nature and quality of this sensor. A rubber tubing covers the microphone which acts like a base of chest piece. The microphone within acoustic sensor should be biased for proper operation. Moreover, the microphone output is relatively small which is in order of few millivolts. This makes it hard and challenging for microcontroller to detect the variations in input signal. To address this problem, bias as well as amplification circuit is designed. Figure 2 shows the schematic of bias and amplification circuit. Fig. 3. Bias and amplification circuit The microphone has a typical operating voltage of 2V while that of the microcontroller is 5V. By using a simple voltage divider circuit with identical 1k resistors, the voltage can be pared down to 2.5V in order to bias the microphone. DC offset is removed by passing the output of microphone through a capacitor of a large value to ensure that low frequencies are not filtered out. The AC signal is connected to Vin+ which is the positive input pin of an operational

amplifier to strengthen the amplitude of the signal. Since the microcontroller requires an operating voltage from 0-5V, the Vin+ is biased to 2.5V in order to capture the largest voltage swings. In addition to this, another voltage divider circuit is used for biasing with identical 20k resistors. The resistors in this circuit is kept much higher to prevent equivalent output impedance of preceding stage. For signal boosting, a non-inverting op amp has been used. The gain can be given as: Av= 1 + (1) For 20 Hz-2 KHz frequency range, the resistors are selected to get a gain of 150. This gain is selected on the basis of bandwidth which has been taken as 300 KHz. To get a unity gain with DC voltage inputs, a capacitor is used in series with R6 resistor. This unity gain is very significant to avoid amplification of 2.5V at Vin+ pin. The amplifier output saturates to 5V when microphone does not detect any sound without the use of this additional capacitor. To achieve a high cut-off of 2 Hz, a 10uF capacitor is chosen for C1. While to achieve a low cutoff of 300 Hz, 500pF capacitor is chosen for C5 which is in parallel with 1M resistor. The output frequency range is between 40-300 Hz after filtering process. In order to check the response of frequency of the circuit, the input is connected to a functional generator and the frequencies are swept to verify the response of frequency. The results are provided in table 1 which shows the response of frequency of the design. The figure 4 shows a plot of frequency response of microphone circuit. Fig. 4. Frequency response of Microphone circuit TABLE 1: Results of Frequency response of the circuit Input frequency Peak to peak Peak to peak Gain (db) (Hz) input (mv) output (mv) 20 2.08 272 42.33 50 2.08 272 42.33 100 2.08 264 42.07 150 2.08 248 41.53 200 2.08 232 40.95 250 2.08 216 40.32 300 2.08 200 39.66 500 2.08 152 37.28 1000 2.08 88 32.53 300

There is an approximately 3dB drop in gain as per the measured data. For outputting the recorded audio to speakers/headphones, ADC is used which is in form of RC low-pass filter. To attenuate higher frequencies more than 210 Hz, RC time constant has been designed. This frequency is lesser than the input frequency range of microcontroller. It is designed in this way to pare down the noise caused due to higher frequencies at PWM output. This circuit is tested and verified for capturing the output signals and generating the PWM signals. Figure 5 shows the ADC circuit. Fig. 5. ADC circuit 3.3 Software Design and Implementation It consists of a code running in ARM 7 microcontroller and a MATLAB visualization tool on PC. ARM 7 (LPC2148) microcontroller is the central component of the system. The code) running in this microcontroller is responsible for a number of activities such as sampling the sensor output, generating the PWM signal and for transmitting the data to MATLAB tool. 3.3.1 Signal Acquisition The ADC converts the electric signals obtained from output of bias circuit to digital signal such that the microcontroller can process. The ADC circuit requires a voltage of 5V to function. To drive ADC at 500 Hz frequency, the system clock should be running at 32 MHz. The sampling rate for the ADC circuit is 8 KHz using timer 0. We require a high sampling rate for better audio quality of acquired signal since the frequency content of internal body sounds are relatively low. Using Nyquist rate theorem, 300 Hz is the lowest sampling rate required and without aliasing it is 600 Hz. 3.3.2 Transfer of Serial Data and PWM Generation By using sampled data in ADC, the cardiac waveforms are played from the previous recordings generated by PWM signals. By timer 2, a 62.5K Hz output is produced. This magnitude of output is updated in timer 0 ISR capture at the rate of 8 KHz. Apart from outputting the audio, the information is also sent to MATLAB visualization tool via USART at 100 Hz. When the microcontroller communicates with other systems, the serial communication is employed for the data transfer. Instead of using 8-couple of bit data lines in parallel communication, a single and sole data line is used for serial communication which is much cheaper. For this, we use a USART protocol for transferring the data at 9600 baud rate. One of the most popular and widely used equipment for serial interface is RS232. For connecting RS232 to the microcontroller, a voltage conversion is needed. Therefore, we use a voltage converter that is MAX232 which h acts like a dual transmitter/receiver.

3.3.3 TFT Module The user interface that controls the microcontroller is the TFT module. Being a derivative of LCD it uses thin transistor technology for enhancing the quality of image. The TFT module is used to visually display the cardiac waveforms by setting the system parameters. The digital values which are real time values generated by ADC are plotted on the TFT display to get the cardiac waveform. 3.3.4 MATLAB Visualization tool A MATLAB program is written to read the data from the microcontroller periodically. Through a serial connection, the data is regularly read with the baud rate of 9600 bits per second. The data is processed to output a MATLAB plot of cardiac waveform and the program is designed to calculate average heartbeat. The data processed in MATLAB uses peak algorithm to calculate the average heartbeat. The waveform obtained should be free of noise for detecting the voltage spikes. To determine the steep spikes, the first and second derivatives of average heart rate is taken and the time taken for each beat is recorded. The difference between two consecutive heart beat spikes will give the time taken for a single heartbeat. Thus, the BPM can be calculated for any number of beats. (In this project the average BPM is calculated for 10 heart beats). IV. FIGURES AND TABLES Fig. 2. Developed System circuit with the displayed waveforms 4.1 Results Using this design, the system has successfully captured the heart signals and processed the data to display on the TFT and in MATLAB visualization tool. Overall, the digital stethoscopic system has well performed concerning the quality of audio, accuracy in calculation of average BPM and displaying the cardiac waveforms without any distortion. The heartbeat sound was easily heard with the help of headphones, showing that the PWM output is distortionless. The expectations of displaying the waveforms in MATLAB as well as on TFT was also met. By analyzing the cardiac waveforms, the physicians can detect the cardiac murmurs. The figure 6 shows the output of TFT module with the average heartbeat rate. The figure 7 shows the cardiac waveform output in MATLAB. To determine the efficiency and accuracy of the system, it was tested on several people. Table 2 shows the results in comparison to manual measurement. 302

Fig. 6. Display of average heart rate Fig. 7. Cardiac waveform displayed on MATLAB TABLE 2: Comparison of manual and MATLAB calculation Volunteer Manual Calculation MATLAB (BPM) (BPM) 1 85 89.2 2 83 85.8 3 76 75.39 4 73 74.85 calculation 303

5 71 72.56 6 65 67.8 V. CONCLUSION The overall digital stethoscope has been able to meet various goals. It captured the cardiac signal through an acoustic sensor and processed it through a microcontroller via ADC. It could output a real-time audio through speakers or headphones. It could transmit the data serially through USART for MATLAB visualization and TFT module to display the cardiac waveforms which helps in detecting cardiac murmurs and the average heartbeat. Hence, for applications they are useful for audio recording and playback, analyze the visual waveforms and also store the recorded data. VI. FUTURE WORK There is always room for future improvement even though the system meets all the basic requirements. It can be used with smart phone using Bluetooth protocol. It can also be used to store the waveforms in Flash memory for record and playback of the signals in future. A significant extension in this project can implementation of FIR filters in MATLAB for filtering out a specific range of frequencies. One challenging problem is effective denoising that corrupts the audio output during serial transfer of data. VII. ACKNOWLEDGEMENTS The author(s) acknowledge Dr. Shylashree N, Associate Professor, Department of Electronics and Communication Engineering, R.V. College of Engineering, Bengaluru for guiding and supporting in carrying out the research work on the Design and implementation of Digital Stethoscope using TFT Module and MATLAB Visualization tool. REFERENCES Conference Papers: [1] Md. Sarwar Jahan& A. B. M. Aowlad Hossain, A low cost stethoscopic system for real time auscultation of heart sound, 2014 International Conference on Informatics, Electronics & Vision (ICIEV), pp. 1-4, 2014 [2] Ade Surya Iskandar; Ary Setijadi Prihatmanto; Syahban Rangkuti, Design of electronic stethoscope to prevent error analysis of heart patients circumstances, 2014 IEEE 4th International Conference on System Engineering and Technology (ICSET), PP. 1-4, 2014 Website: [3] Cornell University website. Digital Stethoscope, Available in: http://people.ece.cornell.edu/land/courses/ece4760/finalprojects/s2012/myw9_gdd9/myw9_g dd9/ 304