Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Electret mic and phone for heart and lung sound for telemedicine

Status
Not open for further replies.
Is C5 the one you thought missing?
Yes.


(quote) NJM5532 is ..... Input impedance of different pair should be relatively high (i guess).
42 yeas ago electret mics were not invented yet so they used low impedance dynamic mics and low values for the feedback resistors that work fine when an opamp has an input resistance of only 30k ohms.

Next time i will signal from function gen to this opamp and see if the gain is what it is supposed to be.
The old NJM5532 has a very wide range of input resistance. You might need to test many to find one high enough to work in this circuit.
 
42 yeas ago electret mics were not invented yet
Your dates are a long way off, AG...

I've had this pair of electret mics for near on fifty years, since around 1973 or 74. They were ludicrously expensive at retail back then, I got them at cost.

The "modern" style plastic diaphragm type were first made in the early 60s & the electret mic concept dates back a century.

Electret_mics.jpg

I've generally used 2k2 - 4k7 as a load for a two terminal electret mic, depending on the supply voltage.
That was the original standard in PC sound cards at the mic input, intended for direct connection of an electret capsule: 4k7 to 5V supply.
 
Today, I found that different phone supplies different voltages to my electret mic. 1.21-1.23 V, 1.25 V and 1.88 V are supplied by xiaomi 9t pro, ipad 2020, and Samsung S6, respectively. Current supplied to the electret mic is also measured to be around 0.25-0.27 mA for all mobile devices.

I then changed R1+R2+R3 to 30k to drop voltage so that electret mic sees around the 1.24-1.26 V.

Thanks to rjenkinsgb

Phones use sensing circuits to decide what is connected; a capacitor alone may not be being sensed, it could need a DC path to ground to switch the mic input on.

Phones are indeed sensing whether the mic input is connected to. I think this is the reason why previous recording have no heartbeat, since phone uses its built-in mic instead. I have chosen 5.1k to trick the phone and the modified schematic is shown below.
InkedSchematic_2021-07-29_cropped_noted.jpg

Node A is always at 4.7V, but node B is measured as 1.8 V (9T pro), 2.5 V (ipad) and 2.6 V (S6). Once all devices tricked by R8, its voltage becomes 1.26 V, 1.83 V and 1.74 V. All recordings now contain the heartbeat sound. As high frequency cutoff is not optimized, high frequency noise is still present. Hopefully, once i have tried audioguru's circuit, these noise will be eliminated. Still eagerly waiting for all ordered parts to arrive.

recording from phone beware of high pitch noise
recorded from ipad
 
Last edited:
Don't worry too much about the mic feed resistors - try different values, lower may well give better output.
With a 9V supply, 10K should be fine as a minimum.

And remember a shallower depth "stethoscope head" will give proportionally higher output, as the air pressure will change more for a given movement at the large end.
A funnel is far from ideal, a flatter container should work much better.

I wonder if a "pressure zone" type setup in a shallow container would work even better, rather than the mic through a hole? (With the mic fixed so its face is parallel to and almost touching the inside back wall of the container).
 
Last edited:
Don't worry too much about the mic feed resistors - try different values, lower may well give better output.
With a 9V supply, 10K should be fine as a minimum.
R1+R2+R3 right? I was wondering if I should change their values back to have 3.5V drop on mic as audioguru used to suggest for low sound level. With you suggesting the same thing, I will definitely try it out.

And remember a shallower depth "stethoscope head" will give proportionally higher output, as the air pressure will change more for a given movement at the large end.
A funnel is far from ideal, a flatter container should work much better.

I wonder if a "pressure zone" type setup in a shallow container would work even better, rather than the mic through a hole? (With the mic fixed so its face is parallel to and almost touching the inside back wall of the container

Your recommendation seems like what audioguru did years ago. He did use lid of peanut butter if i remember it correctly. Dr.VPot had also done something silmilar.
steth diy.png
IMG_4982.JPGIMG_4983.JPG
I will attempt to make better diy stethoscope. thanks rjenkinsgb.
 
Digikey lists hundreds of electret mics and their datasheets. They have a standard voltage across them of 2V to 3V and the max is 10V.
They have a "sensitivity reduction" spec of -3dB when the voltage across the mic is reduced to 1V to 2V.
Now you have 30k feeding the mic then the voltage across the mic will be almost zero and it will barely work.
That is why I use 1k plus 10k to feed the mic from a 9V supply. If its current is 0.4mA then the resistors have 4.4V and the mic works very well with the remaining 4.6V across it. Also the mic still works fine when the battery runs down to 6V.

At the output you show a low value 100nF capacitor C3 feeding a 5.1k resistor R8. Do the math, the cutoff frequency is 314Hz for no bass and no heartbeats.
Try 4.7uF but you do not know the polarity since the phone output has some voltage then two back-to-back 10uF capacitors will be fine.

Your photo shows an electret mic mounted on a blue pcb. Please post its link so we can see its specs.
 
The pins on your 2SC458 have the Oriental sequence which are different to the 2Nxxx or BCxxx pin sequence.
Why do you need Beau's on-off switch that might cut all lung sounds?
 
The On/Off is just an option ... and I did not call out the pin out of the transistor. ANY generic NPN transistor will work. As long as you orient the Base, Emitter, and Collector as depicted in the schematic in post #5 you should be fine.
 
Digikey lists hundreds of electret mics and their datasheets. They have a standard voltage across them of 2V to 3V and the max is 10V.
They have a "sensitivity reduction" spec of -3dB when the voltage across the mic is reduced to 1V to 2V.
Now you have 30k feeding the mic then the voltage across the mic will be almost zero and it will barely work.
That is why I use 1k plus 10k to feed the mic from a 9V supply. If its current is 0.4mA then the resistors have 4.4V and the mic works very well with the remaining 4.6V across it. Also the mic still works fine when the battery runs down to 6V.
The voltage across the mic was measured as 1.24-1.26 V after feeding resistor. These voltage drop on the mic was chosen as they were the voltage phone supplied to the mic that is able to pick heartbeat sound. Anyway, I will try to see if better performance could be obtained with the 3.5V on mic.

At the output you show a low value 100nF capacitor C3 feeding a 5.1k resistor R8. Do the math, the cutoff frequency is 314Hz for no bass and no heartbeats.
Try 4.7uF but you do not know the polarity since the phone output has some voltage then two back-to-back 10uF capacitors will be fine.
If the cutoff frequency is 314Hz, where does noise come from? I previously thought that cutoff frequency was not high enough based on the presence of noise in the recording. 4.7uF is film cap and two back-to-back 10uF caps are electrolytic right? Does the schematic look right?
Schematic-2.png


Your photo shows an electret mic mounted on a blue pcb. Please post its link so we can see its specs.

I think you misunderstood me. The last two photos were taken from the old thread of Dr.Vpot https://www.electro-tech-online.com...ctret-condenser-mic-distortion-issues.152836/

The pins on your 2SC458 have the Oriental sequence which are different to the 2Nxxx or BCxxx pin sequence.
Why do you need Beau's on-off switch that might cut all lung sounds?
I am still waiting for parts and have learned a lot from discussing with guys. Just thought why not try and learn from it.
 
Last edited:
The low frequency cutoff is 1 divided by pi x R x C which is 0.16/(5.1k x 0.1uF)= 314Hz at -3dB. Then 314/4= 85.3Hz is at -12dB, 43Hz is at -24dB and 22Hz is at -36dB which is 1/70th of the original level. Heartbeats are at even lower frequencies that are reduced much more by the capacitor value too small.

You show an extra 4.7uF capacitor (that is not needed) between the two back-to-back 10uF capacitors.

You still have 30k ohms that is much too high feeding almost no voltage and current to the mic so its output level is almost zero.

You still have an old NLM5532 that has a minimum input impedance that is too low for this circuit.
 
If you want to eliminate any possible polarity problems with the output coupling caps, just use two with negatives connected together and add a high value resistor, 100K or more, from the junction to 0V.

Though as every device puts less than 3V across the load resistor, in practice a single cap with positive to the opamp output would be fine.

And get rid of the extra resistors feeding the mic, just use 10K.

If AGs explanation was not clear enough, the previous small capacitor was giving a high-pass filter effect, so passing noise and reducing or blocking low frequencies.
 
Sorry my bad on the cutoff frequency.

I am testing this circuit with function generator as an input. The input sinewave with 100 mV at different frequencies were applied and the input and output signals were measured on the oscilloscope.

test_circuit1.png


Here are results i found. The gain is 18.3 (2.2/1.2) which is lower than expected (1M/47k = 21.3). Low input impedance of NJM5532 could be the reason for this as audiguru suggested. Cutoff frequencies was also found to be 10 Hz and 13 kHz.
500Hz.png10Hz.png13kHz.png

Cutoff frequency at 13 kHz is too much. So I change C11 to 68 pF. New cutoff frequency then is 2.3 kHz
68p_500Hz.png68p_2.3k.png

Some of parts I ordered have arrived this afternoon. I think I might be able to construct audioguru's circuit.

I have also tried transistor mod of Beau and measured signals at emitter (CH1) and collector (CH2) terminal were below.
PointA_B.png
It seems like transistor does not really increase signal level Beau. My bad that I forgot to set both channel the same v/div.

Edited 31/07/2021
Please ignore my previous paragraph, I was probing 2 channels at the same point that is why signal was identical.

Here are the correct measurements. By probing correctly emitter and collector as CH1 and CH2, respectively, signal of my voice is clearly enhanced though it seems a bit odd at circle.
Tmod_LI.jpg

Heartbeat signal of Beau's transistor mod somehow has lower peak-to-peak voltage than without transistor mod circuit. Strange since the input signal of transistor mod circuit is higher.
H.pngTmod_H.png
 
Last edited:
Beau's transistor is common-base with a very low input resistance that attenuates the 2.7k ohms output of an electret mic. Your function generator probably has a zero output resistance then the transistor does not attenuate it.

Your opamp is inverting with its input resistor determining the input resistance and its gain. If you want a gain of 200 then the total input resistance of the opamp must be 5k ohms which is 5k ohms minus the 2.7k output resistance of the electret mic. BUT the 2.3k resistor attenuates the mic output almost to half.

My opamp is non-inverting that always has an input resistance of 100k ohms since the negative feedback resistors that set the gain are not at the mic.
 
I built audioguru's circuit on the breadboard and took few measurements today. Keep in mind that circuit presented here has some differences compared to original audioguru's circuit because all ordered parts have not yet arrived.
31-01-2021 test circuit.png


I was probing different nodes in the circuit as indicated in the figure above. All measurements were carried out without connecting to the phone. Here is what i have found.

Signal is clearly amplified (x28) between signal and point A.
outputOpamp.png


Still looking ok between signal and point B.
output_C.png


ok between signal and point C
output_C_C.png


Last two figures seem to have pickup more frequency noise. Do you think noise could come from exposed wired on the solder joints at electret mic and trrs jack. I am not sure how to get rid of these noises. Any advices? please.
 
Just about anything is possible while using breadboard wiring; I'd not be concerned unless it has still got the same problem when assembled on stripboard with good grounds, or a PCB.

If you make a PCB, use a topside ground plane to keep the ground impedance down.

Note that C10 is reversed in the diagram.
 
The scope does not show normal rectangular heartbeats because it is set to AC and maybe cuts the very low frequencies. Try setting it to show DC.

Much of your noise appears to be 60Hz and ringing oscillation.
Didn't you use a shielded audio cable from the mic and from the trrs plug-cable and jack?
The circuit wired on a solderless breadboard has the many rows of contacts and long wires all over the place acting like antennas for picking up interference.
I always make a prototype compactly soldered on a piece of perforated stripboard. The strips are easily cut to length and a few short jumper wires form half of a pcb and the parts form the other half. I have never had 60Hz hum picked up.

Your 1st opamp has a gain of 1 + (1M/100k)= 11 and the 2nd opamp has a low frequency gain of 1 + (33k/56k)= 1.59. Then the total gain is only 11 x 1.59= 17.48 times
 
Sorry guys. It is my errors again on the diagram :banghead:. Here is the correct one.
31-01-2021 test circuit.png


the 1st opamp has a gain of 22 and the 2nd has a gain of 1.6. The total gain is 35.2 times. The gain of 28 times obtained is not that far of the calculated one. Good right?

Just about anything is possible while using breadboard wiring; I'd not be concerned unless it has still got the same problem when assembled on stripboard with good grounds, or a PCB.

If you make a PCB, use a topside ground plane to keep the ground impedance down.

Thanks, I think I will try perfboard next and see whether noise can be reduced.
I only had few experiences doing single layer pcb. I am not quite sure what you mean by using topside ground plane. Could you elaborate more please?

The scope does not show normal rectangular heartbeats because it is set to AC and maybe cuts the very low frequencies. Try setting it to show DC.
Thank you. Will definitely try that. about cutting low frequency. Is R12 can be remove? So that cutoff frequency would be 0.16/(20uF*5.1k) = 1.56 Hz.

Didn't you use a shielded audio cable from the mic and from the trrs plug-cable and jack?

I did. However, in order to connect to the breadboard, I had to solder jumper wire to them and that solder joints are exposed.
 
R6 in your 1st schematic is 100k and is 47k in your 2nd schematic which explains the difference in gain.

Two 10uF capacitors in series produce 5uF. Then the -3dB cutoff frequency into 5.1k is 6.3Hz.
Every jumper wire is an antenna that picks up interference. All the rows of contacts and long wires on a breadboard are antennas.

The circuit has many RC low frequency cutoffs. Maybe their total cuts heatbeats.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top