Digital Stethoscope using Arduino

see post #2

@zainzakir, please do not cross-post. Threads merged.

1 Like

The LM393 is not a sound sensor.

and the links to those parts?

Have you used an oscilloscope or even a dvm to check the output signal?

Is a total nonsense. It will not give you any heart rate at all.

An analogRead returns a number between 0 and 1023, which is the amplitude of the waveform at the instant you take the reading. It has very little to do with the heart rate.

What you need to do is to time the interval between successive peaks of the waveform.

However, your refusal to post a schematic means you will be forever doomed to never getting it working. It is all well and good posting a list of components but how these components are wired together is vital information that we simply do not know.

Hi,
This you tube is another see what I do, but I'm not going to give you the code or explanation of how it works (cos really it doesn't, with appropriate junky music).

As @Grumpy_Mike has pointed out, the code is utter trash.

Tom.. :smiley: :+1: :coffee: :coffee: :coffee: :australia:

This is lm393 sound sensor:

Sir,actually it is beats per minute which i have correct how.

That will give you the period of one heart beat. Translating that into beats per minute is just simple high school arithmetic.

It will work but there is a high chance that other sounds will interfere with module

That's why a stethoscope has a special construction to guide and amplify the vibrations. It can not simply be replaced by electronics and software.

This is an lm393

Which is why you should always post links to your parts.

The "sound detector" gives a "1" out (Vcc) on a LOUD sound and a "0" (0V) for less sound.
You adjust the control to pick up hart beats.

Why they connect to an analog input mystifies me.

This would be a more suitable sound detecting system that would allow you to see the sound level

Yes and No

They are absolutely designed to transfer the pressure waves from the diaphragm of the bell to a persons ear drums and this design is absolutely adequate (and ideal) for auscultation in a quiet and stable clinical or controlled setting. But not everyone works in a quiet, stable environment. :upside_down_face:

In emergency medicine, the electrification of stethoscopes has been progressing steadily for a while. Primarily, these developments work towards the elimination or mitigation of things like road noise, jet engine drone, or the thukthukthukthuk of helicopter rotors that make anything other than the most obvious clinical symptoms impossible to hear.

Flight medics, both civilian and military, have frequently have electronically enhanced stethoscopes for that reason. It is becoming more common for ground based (Ambulance) paramedics and EMT's to use them now as well (several people at my agency use them daily.)

I suspect the next lines of electrification will work towards recording and providing data to the user for two reasons. The first would be documentation- being able to attach an audio clip of lung sounds, heart tones, etc., may be beneficial to have in a persons medical records and would certainly be beneficial in educational settings for new practitioners of all disciplines to have real sounds to learn from.

The second, and this is just a personal guess, would be to have a computer analyze the audio data for diagnostic purposes. Every time a 12 lead EKG (heart rhythm analysis) is completed, there is an algorithm that the machine uses to interpret the results which is printed on the tracing. It is also not uncommon for imaging results, such as X-rays, CT, MRI, etc., to be analyzed by an AI system to search for things like cancer. These algorhythms become more popular everyday as they continue to expand into healthcare and I suspect that audio recordings of heart tones, lung sounds, carotid blood flow, etc., is not far behind.

The goal of providing a low cost option is excellent. I would love to see the results of this project in person- so please post the code and I will build one too!

Cheers (and happy Easter!)

1 Like

is not based on sound but on light. So is my pulse oximeter that clips on a finger and has; in professional edition; also USB connection. I remember a student who built such a pulse meter in the 80's with a C64.

And there exist solid borne sound sensors which ignore ambient noise. Electronic sensor technology often uses effects which were out of reach to mechanical engineering.

1 Like

The board has a 10K trim pot in a voltage divider to adjust the threshold of the comparator. The voltage output of the microphone is connected to the comparator, but is also connected to an analog output pin through the same trim pot to offset the signal to somewhere around Vcc/2 to keep it from going negative and this is fed to the board analog out pin. So you can get an analog reading that sorta corresponds to sound intensity. There is no amplifier so it's not very sensitive.

I too would be more inclined to use an electret microphone with an amplifier and add bandpass filters to cut down on some of the interferences.

But with the board the OP has the comparator works much better than the analog out and this concept maybe sort of doable using the digital output. You are not gonna make a stethoscope this way but you maybe able to measure heart rate BPM. My wife is not gonna let me use one of her Littman bells to try it, lol.

The first thing the OP needs to do is learn how the board works using the comparator function with just some basic testing and coding. Before trying to hook up to a bell, you need to desolder the microphone from the board and connect wires to it and solder the wires to the board where the microphone was. If you try to insert the microphone into a tube still soldered to the board it's just going to break off anyway, and be that much harder to desolder and resolder.

1 Like

Thanks @robertnc I missed that; not difficult since even the company cant decide whats on the board!

yes the comparator output should work provided you adjust the threshold suitably.

That one looks slightly different from the one the OP posted a picture of, it has a transistor and no analog pin out.

I found one like the OP posted in a starter kit I got for a grandchild. I played around with it some and sort of figured out what it was doing using a DMM and the serial plotter.
Again I have to stress the importance of removing the microphone from the board. At first glance I assumed the microphone was glued into the slot it sits in, but it's not, as I quickly discovered. It is held in place only by the leads - I almost broke mine off just from tapping on it.

After some further internet searches looking for an actual board schematic, I found this tutorial that describes the sensor a little better and uses the analog function.

https://circuitdigest.com/microcontroller-projects/interfacing-sound-sensor-with-arduino

Using the analog output is probably not going to work for this application, but at least it describes the board functionality.

A short tutorial shows using the digital out from the comparator to light up an LED. That is probably the best approach - use the same concept to count pulses and derive a BPM:

https://www.phippselectronics.com/using-the-microphone-sound-sensor-module-ky-038-with-arduino/

That sounds awesome! I've only seen the Eko type in use in the field so far.

I have made this digital stethoscope from the following link but it is not working. Secondly, they do not tell R1 and R2 values.Kindly help me.
Link:

Have you tried here?

Edit: also, why post in a forum section that specifically asks you not to post there?

There are 7 resistors used in the circuit. 5 of the 7 are identified. The remaining two MUST be the ones not identified.

1 Like