What a cool idea- please keep us posted on the progress!! I've worked as a paramedic for over a decade so this is very interesting to me. Here is an idea-
Remove the diaphragm from the bell of the stethoscope!
If you have a smaller, open Bell on the other side, just rotate the head of the stethoscope 180° to do an initial quick test.
You could also consider using a
single headed stethoscope to reduce noise.
If your testing with smaller open side is successful, consider a second test with the diaphragm removed from the primary bell (the big side.)
Here is why
Normal stethoscopes are pretty noisy. Unless the patient, the person holding the stethoscope, and the stethoscope itself are held very still, you're going to pick up a lot of white noise caused by friction on the diaphragm. This will make it hard to differentiate between heart noise and everything else.
A lot of noise comes from the person attempting to listen holding the stethoscope wrong- moving, pressing too hard, or placing a hand on the second diaphragm (pushing on the back instead of holding the stethoscope on the sides of the flange and holding it gently in place.
If you're results get more accurate, it's because you're filtering out a lot of the noise. If that is still not good enough in terms of BPM (beats per minute) accuracy, the next step is to filter your incoming audio signal.
Get more accurate sound with a Filter
Heart tones have an audio frequency on average from 20Hz to 200Hz. The heart tone can then be better isolated using frequency selection to ignore everything that isn't a heart tone. Look into simple circuits called passive high pass and passive low pass filters. There may be some options that are easy to include and would significantly increase the accuracy of the device.
Sample rate is important for BPM accuracy
HR (heart rate) is easily approximated by selecting a sample rate (I use 10 second) and counting the number of heart beats. That number × 6 = beats per minute. The longer the sample, the better your results (mostly because people stop moving around so much after about 20 seconds as they settle down.)
As for detection- Without a diaphragm on the bell, your device should be able to hear the lower tones of the heart in a relatively health person.
False positives
Things like respiratory illness and cardiac arrhythmias may cause a problem not easily overcome without a lot of extra code. For example, CHF, pneumonia, and any other disease causing rhonchi may trigger the same frequency range as the heart beats (wheezing like from COPD may be screened out as it has a higher pitch. ) And a person with supraventricular tachycardia, atrial fibrillation, a heart block, or frequent ectopic beats may prove difficult to display a "Beats per minute" without an extended sample time.
Read this article in the Journal of Biomedical Physics and Engineering!
"In this work, a new design with a low cost electronic stethoscope is designed and implemented as a simple circuit for a replacement with conventional stethoscopes. This presented a low cost stethoscopes consisting of a preamplifier, low-pass filter, high-pass filter, microcontroller and Bluetooth."
"The results indicated that an electronic stethoscope system could provide suitable information for BPM value and could display heart sound signals."
Good luck!
Now you can see how complex it can quickly become and why the EKG machines I use every day cost over $30,000USD! Finding a better, cheaper way to monitor for cardiac conditions is an awesome goal to have. Please let us know what you come up with and share the code and hardware setup you come up with.
Cheers!