You are on page 1of 6

Arduino Based Cost-Effective Design and

Development of a Digital Stethoscope


Muhammad Waqar∗ , Shehla Inam†¶ , Muhammad Azeem ur Rehman∗ ,
Muhammad Ishaq‡ , Mafia Afzal† , Nimra Tariq† , Faisal Amin† , Qurat-ul-Ain§

∗ Dept. of Biomedical Engineering & Sciences, National University of Science & Technology, Pakistan
† Dept. of Biomedical Engineering, Riphah International University, Islamabad, Pakistan
‡ Dept. of Electrical Engineering, National University of Science & Technology, Islamabad, Pakistan
§ Dept. of Computer Science, Bahria University, Islamabad, Pakistan
¶ shehlainam10@gmail.com

Abstract—The medical device used for auscultation is known S4 sounds are usually observed within the frequency range (20
as a stethoscope. An ordinary acoustics-based stethoscope is to 70 Hz). These sounds should be carefully observed because
limited in its ability to provide high-quality sound in noisy they may suggest the heart abnormalities [5]. As the beating
environments. To deal with this problem digital stethoscopes
have been developed. A digital stethoscope enables the use of heart and blood flow through it results in the generation
of advanced noise cancellation techniques resulting in high- of Heart sounds [6]. Similarly, in abnormal cases, there might
quality sound compared to a conventional stethoscope. Currently, be additional signal activities between S1 and S2 sounds e.g.
conventional stethoscopes are commonly used by physicians due S3, S4, and murmurs. The S3 sound is produced when there
to their low cost compared to the digital ones. This paper is a sudden deceleration of blood flow from atrium into left
presents an Arduino DUE based cost-effective digital stethoscope
with real-time realization of cardiac sounds over a graphic ventricle. This sound behaves like normal heart sounds in
display and logging capabilities for post-processing in powerful children and adults up to 35 to 40 years. But, after 40 years,
numerical software such as MATLAB. The proposed design is this sound acts like an abnormal hear sound and is correlated
considerably low-cost compared to the commercially available with the dysfunction and volumetric overloading of ventricles
digital stethoscopes while providing 2.375 ± 0.222 dB better [7]. The vibration of valves, supporting structures, and walls
signal-to-noise ratio.
Index Terms—Auscultation, digital stethoscope, heart sounds, of ventricles cause the S4 sound. It has been proved that S4
Arduino DUE, signal processing, MATLAB during the diastolic period is the symptom of heart failure [8].
Additionally, heart problems or diseases may cause numerous
I. I NTRODUCTION heart murmurs that are extra or unusual sounds heard during
Auscultation is the process of listening to internal body the beating of heart and are classified as systolic, diastolic
sounds and it is achieved by using a device known as stetho- and continuous murmurs [9]. During the mid-systolic process,
scope [1]. Two types of heart sounds are produced under a high frequency sound named as mid-systolic click (MSC)
normal heart conditions; the first sound is S1 that corresponds is produced by the abrupt halting of prolapsing mitral valves
to mitral and tricuspid valves closure after receiving blood leaflets excursion into the atrium by chordae [10]. In [11],
from lungs and body. This initiates the systolic process. The the authors developed a low-cost digital stethoscope what
second sound is S2 that shows the initiation of diastolic was able to be interfaced with the mobile communication
process and termination of systole and is produced by the devices. In this instrument, the sounds from various locations
aortic and pulmonic valves closure after pumping blood to the could be captured with the help of an electret condenser
body and lungs [2]. The frequency ranges of S1 and S2 sounds microphone which were later filtered, amplified and processed
is between 20 to 175 Hz [3]. According to [4], The peaks of digitally by using an adaptive line enhancement technique
S1 sound like in the lower frequency range (10 to 50 Hz) and to gain the audible and distinct heart sounds. Arjit Sinharay
medium frequency range (50 to 140 Hz), where the S2 peaks et.al used direct acoustic coupling technique which quickly
are observed in lower frequency range (10 to 80 Hz), medium and conveniently converted the smartphones into simple, user-
frequency range (80 to 200 Hz), and higher range of frequency friendly high quality, and affordable digital stethoscope. The
(220 to 400 Hz). Similarly, there are also two other sounds; S3 device enabled the heart patients to send their heart sound
sound is obtained by the passive filling of ventricles known to doctor’s chamber from their home instead of travelling
as early diastolic process, and S4 sound by active filling of from faraway places [12]. The authors in [13] proposed
ventricles known as late diastolic process. The peaks of S3 and a prototype model of a smart real-time digital-stethoscope
system to monitor and diagnose the patient’s heart sounds. The
system consisted of two subsystems i.e. a digital stethoscope
978-1-7281-5404-6 ©2019 IEEE and a computer-based decision-making subsystem, which was

Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 15:11:11 UTC from IEEE Xplore. Restrictions apply.
Fig. 1. Block Diagram of Proposed Digital Stethoscope System

able to communicate wirelessly using Bluetooth low energy


technology. The portable subsystem captured the heart sounds
of the patient, filtered, digitized, and sent the captured heart
sounds to a personal computer wirelessly for visualizing and
further processing the heart sounds to decide if the heart Fig. 2. Microphone biasing circuit powered by 3.7 V Lipo Battery
sounds were normal or abnormal. For this purpose, twenty-
seven-time domain, frequency domain, and Mel frequency
cepstral coefficients (MFCC) features were used to train a
public database to identify the best-performing algorithm for
classifying abnormal and normal heart sound (HS). In [14],
the designed digital stethoscope was able to detect the heart
and lung sounds along with measuring heart rate. The heart
sound was detected using a microphone, analog signal was
filtered and stored in a computer. This helped in performing
feature extraction from the signal.
II. M ETHODOLOGY Fig. 3. The Inverting Preamplifier Circuit
Fig. 1 shows the block diagram of the proposed digital
stethoscope system.
The entire methodology of the designed stethoscope is The amplified signal from the preamplifier is subjected to
divided into four parts; signal detection, signal processing, the second op-amp of the Tl072 IC and it is used as an active
signal processing and output system. second order Sellen Key antialiasing filter as shown in Fig. 4.
The cutoff frequency of the filter is 1026 Hz and it is
A. Signal Detection calculated by using formula:
The signal detection part consists of the chest-piece of an 
fc = R1 R2 C 1 C 2 (2)
ordinary stethoscope that detects the acoustic heart sounds
from the body. A highly sensitive 3.5 mm studio speech A DC shift of 1.67 V is added in the filtered signal that is
microphone is attached inside the pipe near the end of the provided by 3.3 V pin of Arduino through a voltage divider.
chest-piece. It is necessary because Arduino cannot read negative portion
The microphone has a sensitivity of -52 dB ± 5 dB,
impedance is 2.2 k, and its frequency range is between 30 Hz
to 15 kHz. The microphone circuit is powered by 3.7 Volts
Lipo battery and shown in Fig. 2.
B. Signal Conditioning
The second part is the signal conditioning part composed
of preamplifier, antialiasing filter, and DC shifting. The mi-
crophone converts the acoustic signal detected by chest piece
into electrical signal. This signal has very low amplitude lies
between 35 mV to 50 mV. It is given to the preamplifier circuit
that is composed of a TL072 IC. This is a dual operational
amplifier IC and its first op-amp is used as an inverting
preamplifier as shown in Fig. 3.
The gain of the preamplifier is 21.36 and it is calculated by
using formula:
R2
Av = − (1) Fig. 4. 2nd Order Active Sallen-Key Low Pass Filter
R1

Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 15:11:11 UTC from IEEE Xplore. Restrictions apply.
Fig. 5. DC Shift added by Arduino DUE 3.3 V pin through a voltage Divider
Circuit

of the alternating heart sounds signal. The circuit is shown in


Fig. 5.

C. Signal Processing
The third part of the methodology is the signal processing Fig. 6. Algorithm Applied in Arduino Software
part. The first step is to digitize the signal and it is done
by analog 12-bit pin of the Arduino DUE board. The second
step is to apply a simple moving average filter for removing
noise from the signal. The third step is to set the threshold
for beats count. A threshold of 2400 is set. The beats are
defined in such a way that it will always be greater than the
corresponding neighbors to it. After counting the beats, the
calculation of beats per minutes (BPM) are done and a real-
time heart sounds along with BPM are displayed over a serial
2.5-inch TFT graphic LCD (240 × 320). The pin configuration
of TFT LCD with Arduino DUE board is shown in Table I.
Also, the algorithm applied in Arduino software is shown in
Fig. 6. The proteus schematic of circuit is shown in Fig. 9.

D. Output of System
Fig. 7. BPM and Real time heart sounds over TFT Graphic LCD
The fourth part is the output part. The first output is the
digital output that is in the form of BPM and real time heart
sounds over TFT graphic LCD. The digital output is shown
in Fig. 7.
The second output is analog that is obtained after converting
it through built-in 12-bit DAC0 pin of Arduino DUE board.
This signal is then given to a low noise LM386 power
amplifier. The speaker or earphones can be connected with 3.5
mm stereo audio jack for listening the analog heard sounds.
The power amplifier circuit is shown in Fig. 9.

III. R ESULTS AND D ISCUSSION

The circuit is designed in Proteus and its PCB layout is


designed in Dip trace software. The PCB layout front and
Fig. 8. Low Noise Power Amplifier Circuit
back are shown in Fig. 10.

Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 15:11:11 UTC from IEEE Xplore. Restrictions apply.
TABLE I
P IN C ONFIGURATION OF TFT LCD WITH A RDUINO

TFT Pins Vcc GND CS RST DC MOSI SCK LED MISO


Arduino Pins 3.3V GND D10 - D9 SPI2 SPI5 - SPI6

Fig. 9. Proteus Schematics of Circuit

Fig. 10. PCB Design in Dip trace software (Front and Back View)

A. Software Results B. Heart Sound Analysis

To analyze the heart sounds detected by the proposed device


were converted into .wav format using the thinks lab one
As mentioned before that circuit was designed in Proteus
phonocardiogram software. The heart sounds were recorded
8.1 software. At early stages of design, the circuit was tested
at a rate of 44,100 bps. The recorded audio file was read in
in Proteus and its simulations were performed. A wave file was
MATLAB and its FFT and Signal to Noise Ratio (SNR) was
given as an input to the circuit and each stage of the circuit i.e.
calculated. The SNR of the recorded signal was compared with
preamplification, Sallen-Key filter and Power amplifier were
the heart sounds recorded by Littman 3200 Digital stethoscope.
tested. Fig. 11 shows the actual wave sound that was given as
The FFT of the recorded heart sounds is shown in Fig. 13.
an input to the circuit.
Firstly, the .wav file was extracted in MATLAB. The
This signal was then amplified by means of first operational Sampling Rate was kept as 22050. Three frequency ranges
amplifier of TL072 IC. The amplified signal is given to the selected in the signal; 0-35 Hz, 35-400 Hz, and 400-1000 Hz.
second operational amplifier of TL072, which a 2nd order The correct heart sounds lie in the second range i.e. 35-400
active Sallen-key antialiasing low pass filter. The simulated Hz. The sounds that appeared at other frequency ranges were
results of this stage are shown in Fig. 12. considered as noise. A built-in Trapezoidal function was used

Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 15:11:11 UTC from IEEE Xplore. Restrictions apply.
Fig. 11. Hardware Implementation of Circuit on PCB Sheet

Fig. 12. 2nd Order Sellen-Key Antialiasing Low Pass Filter with Cut-off
Frequency 1026 Hz

Fig. 13. FFT of Recorded Heart Sounds in MATLAB


Fig. 14. Flow Chart of SNR

that calculates the area under each of the three sections of


the FFT graph. The resulted integrals of the three sections Also, The SNR in dB was calculated as
were obtained. Then, these integrals were divided by their  
S
corresponding frequency ranges to get the average area (Area/ SNR = 20 log10 (4)
Hz) for each of the three portions. The relative noise was N
calculated by summing the first and third integrals, whereas
the second integral defines a relative value for heart sounds. The complete results of the proposed systems are sum-
The flow chart of SNR is shown in Fig. 14 marized in Table II. After comparing results of proposed
Psignal and commercially available digital stethoscopes in terms of
SNR = (3) linear SNR, it can be seen that proposed model has given the
Pnoise

Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 15:11:11 UTC from IEEE Xplore. Restrictions apply.
TABLE II
S UBJECTS BPM, SNR, AND C OMPARISON WITH L ITMANN 3200 D IGITAL S TETHOSCOPE T YPE S TYLES

Litmann Litmann Linear SNR SNR


Age BPM BPM Avg. Linear SNR Avg. SNR
Subjects 3200 Linear 3200 SNR Difference Difference
(Years) (Measured) (Normal) (Ls) (dB)
SNR (Lt) (dB) D=Lt-Ls (dB)
1 48 76 60-100 2.873 ∓ 0.083 -9.16 3.202 -10.10 0.329 -0.94
2 23 82 60-100 2.612 ∓ 0.262 -8.33 3.202 -10.10 0.590 -1.77
3 78 93 60-100 2.345 ∓ 0.157 -7.40 3.202 -10.10 0.857 -2.70
4 39 73 60-100 2.414 ∓ 0.367 -7.64 3.202 -10.10 0.788 -2.46
5 3 115 80-120 1.634 ∓ 0.242 -4.26 3.202 -10.10 1.560 -5.84

TABLE III TFT graphic LCD. The heart sounds are recorded in .wav
C OST OF P ROPOSED D IGITAL S THETHOSCOPE . C OMPARATIVELY, THE format and processed in MATLAB for frequency analysis
PRICE OF L ITMANN 3200 IN PAKISTANI RUPEES IS R S 90,000.
and SNR calculation. Additionally, cost comparison between
Components Price in PKR the proposed model and locally available Litmann digital
Acoustic Stethoscope 500 stethoscope is provided in Table III. It shows the design is
High Frequency Studio Speech Microphone 1000 cost effective and can be commercialized after bringing some
TL072 IC 270 design improvements. However, the proposed stethoscope can
Arduino DUE 1500
TFT Graphic LCD 1500 give better sound quality with minimum noise. The design
LM386 Power Amplifier 20 needs to be further improved and some other features can be
Lipo Batteries 700 added such as wireless transmission and reception of heart
Miscellaneous 100 sounds in Android based Smartphone application. This will
Total 5590
make the system easier to use and have greater portability.
R EFERENCES
[1] V.R. Prasad, G. Phade, ”Design of Electronic Stethoscope and Heart
Rate Monitor for Remote Area Application”, International Journal of
Computer Applications, vol. 137, no. 10, pp. 1-4, 2016.
[2] N.K. Bakshi, M. Gupta, ”Wireless Electronic Stethoscope”, International
Journal of Engineering Research & Technology, vol. 3, no. 4, pp. 459-
462, 2014.
[3] H. Parmar, ”Design and Development of a wireless Electronic Stetho-
scope using DSP”, M.Tech Project, 2013.
[4] R.M. Rangayyan, R.J. Lehner, ”Phonocardiogram signal analysis: a
Review”, Critical Review in Biomedical Engineering, vol. 15, no. 3,
pp. 211-36, 1987.
[5] A.G. Tilkian, M.B. Conover, ”Understanding Heart Sounds and Mur-
Fig. 15. Heart Sounds S1 and S2 detection on both Breadboard and PCB murs with an Introduction to Lung Sounds”, 4th Edition edition, 2001.
[6] S. Leng, R.S. Tan, K.T.C. Chai, C. Wang, D. Ghista, L. Zhong, ”The
electronic stethoscope”, BioMed Eng OnLine, vol. 14, no. 66, pp. 137,
2015.
desired results. Using sophisticated and better components can [7] H.K. Walker, W.D. Hall, J.W. Hurst, ”Clinical Methods”, 3rd ed.,
improve the results of proposed model. Boston: Butterworth, 1990.
[8] A. Mangla, ”Heart Sounds”, The heart.org: Medscape, 24 April 2014,
C. Hardware Results Online: emedicine.medscape.com
[9] S. McGee, ”Evidence Based Physical Diagnosis”, 3rd ed., Saunders,
As mentioned before that there are two outputs of the Elsevier, 2012.
system; one digital output in the form of BPM and real time [10] J.A. Shaver, R. Salerni, P.S. Reddy, ”Normal and abnormal heart sounds
signal on TFT graphic LCD and the other the analog output in cardiac diagnosis: Part II. Diastolic sounds,” Current Problems in
Cardiology, vol. 10, no. 4, pp. 7-55, 1985.
heard on speaker or headphones. Heart sounds are clearly [11] A. Lakhe, I. Sodhi, J. Warrier, V. Sinha, ”Development of digital stetho-
detected and realized over TFT graphic LCD. The hardware scope for telemedicine”, Journal of Medical Engineering & Technology,
results are shown in Fig. 15, where S1 and S2 sounds were vol. 40, 2016.
[12] A. Sinharay, D. Ghosh, P. Deshpande, S. Alam, R. Banerjee, A. Pal,
clearly detected on breadboard as well as on actual hardware ”Smartphone Based Digital Stethoscope for Connected Health; A Direct
implemented on PCB sheet. Acoustic Coupling Technique”, IEEE First International Conference on
Connected Health: Applications, Systems and Engineering Technologies,
IV. C ONCLUSION Washington, DC, 2016.
[13] M.E.H. Chowdhury, A. Khandakar, K. Alzoubi, S. Mansoor, A.M.
The design of a cost-effective digital stethoscope is pre- Tahir, M.B.I Reaz, N. Al-Emadi, ”Real-Time Smart-Digital Stethoscope
sented. The heart sounds detected by chest-piece are amplified System for Heart Diseases Monitoring”, Sensors, vol. 19, no. 12, p.
and passed through an anti-aliasing filter. The Arduino Due 2781, 2019.
[14] N. Katyal, M. Mathrani, M.K. Hota, ”Preparation of a Digital Stetho-
boards processed the signal in digital domain, where BPM are scope”, IEEE International Conference on System, Computation, Au-
calculated, and real-time heart sounds are displayed over a tomation and Networking, 2018.

Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 15:11:11 UTC from IEEE Xplore. Restrictions apply.

You might also like