Recording with LM386 Module

Good day!

I am trying to amplify my audio recordings using the LM386 module and an ECM microphone. The module is connected to a laptop's USB port using a USB power cable. The audio plug is connected to a mobile phone for recording purposes. Whenever I try to record, only static noises are present. When I adjust the VOL in the module, loud crack noises are recorded. What am I doing wrong? Thank you.
 

Attachments

  • 12121.PNG
    12121.PNG
    228.8 KB · Views: 210
  • 327561089_1688045688276315_2225501054607871105_n.jpg
    327561089_1688045688276315_2225501054607871105_n.jpg
    48.7 KB · Views: 128
  • 328102444_731197458350754_743762638320726388_n.jpg
    328102444_731197458350754_743762638320726388_n.jpg
    38.7 KB · Views: 118
The LM386 is really a small audio power amp intended to drive a low impedance speaker rather than be used as a preamp... however........

One thought is that the output coupling cap may be to large for coupling to a high impedance input. I would try adding a 100 ohm or thereabouts resistor across the output points of the board. That will instantly kill any DC present caused by the cap.

You could also try connecting a small speaker to the board and seeing that the board itself actually works as intended.

I assume your electret mic is self contained and does not need an external power supply.
 
Hello, thank you for your response. How should I connect the resistor at the output of the board?

I'm trying to make a low cost amplifier that will capture a lung sound and amplify it to be exported to a laptop. I'm trying to record a lung sound taken from the chest and back.

Here is the ecm mic I'm trying to use.
1676718401642.png



Here is the recording I recorded on the first try:
https://voca.ro/1e9MsDrfnOWF

Thank you so much for your help.
 
Have a read at this:
https://sound-au.com/articles/mic-electret.htm

Look at fig 1B

You need a resistor to power the capsule. The polarity has to be correct to the capsule but should be easy to find. Negative will probably go to the capsule body. The cap is needed to AC couple the output (to remove DC). If there is a non polarised cap already fitted to the LM386 board then you can omit that part (the 2.2uF in fig1)

The resistor on the output of the board just connects across the 'out' terminals to act as a dummy load. The value is not critical, anything from 47 to 220 ohms should be fine.
 
Hi.
Sadly it won't work as is: your mic capsule needs a 'preamp/headamp/buffer' to convert it's (very) high output impedance to one more suited to the voltage amplification that'll be then needed to drive line input.

The 'preamp' for your capsule will need to be an active circuit ( so you'll need a psu for it, either from phantom or a stand alone one).

Edit: Mooly was faster than me. Very good article.
 
  • Like
Reactions: Mooly
Sadly it won't work as is: your mic capsule needs a 'preamp/headamp/buffer' to convert it's (very) high output impedance to one more suited to the voltage amplification that'll be then needed to drive line input.
Good point 👍 I'm not sure just how low an impedance the FET buffer in a capsule can drive. It's a source follower so... not sure... maybe it will drive a few k of load.
 
I'm not sure either Mooly, my experiments with this kind of capsules were some 20 years ago so i might be totally off in my comment...

Skuukzky, you want to record 'lung sound': i suppose you don't want breathe but the 'inner working' ones? If yes maybe it would be easier to find a 'contact mic' ( one which record structure born vibrations) rather than a mic capsule? Or if a mic capsule maybe try to put it in a stethoscope?
 
Thank you Mooly and krivium. I will try to take these notes and apply it. Do you guys mind if I ask a basic question? I'm an online class student, so I have a poor foundation in electronics.

Mooly, you said "too large for coupling to a high impedance input", what input are you referring to? Also to clarify it, I'll try to connect a 2.2k resistor on the positive of capsule and a 47 to 220 dummy load at the out? Right?

krivium. Can you elaborate this more? "to convert it's (very) high output impedance to one more suited to the voltage amplification that'll be then needed to drive line input."

krivium, how can I determine the output impedance of the microphone and make it work with a pre-amp? Also, yes, i considered contact microphone, but it will be hard to filter sounds from that as a handpiece for a contact mic introduces more noise. I've read articles saying that for capturing lung sounds, it would be better to create a coupling for ecm. So I did a coupling for ecm, to ensure the air is coupled to ecm and that ambient noise is also reduced.

Thank you guys so much.
 
Mooly, you said "too large for coupling to a high impedance input", what input are you referring to? Also to clarify it, I'll try to connect a 2.2k resistor on the positive of capsule and a 47 to 220 dummy load at the out? Right?

I'm assuming you are feeding the output of the board into some kind of line level input which would normally have a high impedance. The speaker coupling cap on the module is 'big' to give decent low frequency response into a low ohm speaker. A problem with that is if no load is attached (a low impedance load) then the leakage current of the cap might dominate and simply take the line level input to some high DC voltage. Adding a resistor as a load would instantly remove that DC voltage.

The 2.2k from capsule to positive supply is just to provide power for the capsule.

This suggests the output impedance of a typical capsule is around 2.2k:
https://components101.com/misc/elec...equency: 20Hz to 16,000Hz 5 Impedance: <2.2kΩ
 
I'm assuming you are feeding the output of the board into some kind of line level input which would normally have a high impedance. The speaker coupling cap on the module is 'big' to give decent low frequency response into a low ohm speaker. A problem with that is if no load is attached (a low impedance load) then the leakage current of the cap might dominate and simply take the line level input to some high DC voltage. Adding a resistor as a load would instantly remove that DC voltage.

The 2.2k from capsule to positive supply is just to provide power for the capsule.

This suggests the output impedance of a typical capsule is around 2.2k:
https://components101.com/misc/elec...equency: 20Hz to 16,000Hz 5 Impedance: <2.2kΩ
Thank you Mooly, I get it now. I will try it asap. I will keep this comment section alive and update you.

Also, if that is the case, would it work if I plug in the output of the board to a laptop with a mixed audio port?
 
krivium. Can you elaborate this more? "to convert it's (very) high output impedance to one more suited to the voltage amplification that'll be then needed to drive line input."

Ok. Please apologize if i induced confusion: i'm obsessed by large membrane/tube electronic studio microphones so i had a kind of reflex answering about it...
A condensator capsule is high impedance source ( a capacitive one 😉 ) which output a 'tiny' voltage ( well in some case not so tiny...but let's assume that).

In most studio microphone the electronic is here to mainly change this high impedance to something much lower. It can too give a bit of (voltage) gain ( most circuits does but not all, some mic's electronic is only a buffer stage at unity gain no voltage gain) but the main goal is to transform impedance.
Why a lower impedance? It gives the ability to 'drive' a line ( cable) without too much loss of signal to the next stage where a voltage gain will be performed ( to adapt input signal to the electronic stages following -in other word a microphone preamplifier).

In your case it is not different.

Within your capsule, the fet is the buffer, so it's output impedance will define the need ( or not) of another circuit (or not).




krivium, how can I determine the output impedance of the microphone and make it work with a pre-amp?

I see a way to do it:

That would be to use a known load of sufficiently high impedance and to connect to it your capsule and a variable potentiometer in paralell and from there perform a serie of measurements.

Thanks to ohm's law we know that the resistance of 2 same value in paralell equal a resistor half the initial value used.

In practice it means the voltage divider the load and sources ( capsule//potentiometer) should drop by 6db when the potentiometer value equal the capsule ouput z...

You'll need to setup a steady sound source ( loudspeaker) for your capsule ( 1khz sine seems indicated but maybe 50hz is 'better' for your DMM accuracy) to output a steady signal: it will output a steady voltage out of your capsule.

First measure the voltage at load with the capsule only. It'll give reference level. Don't change level of source ( loudspeaker) in between both serie of measurements...

And from there you can 'predict' voltage value you should encounter in next step:

https://www.sowter.co.uk/decibels.php

Eg: you measure 0,2449V (-10dbu) then you can expect 0,1228V (-16dbu) once the pot and capsule have same value...

Then repeat with the potentiometer connected and slowly rotate the pot while monitoring the voltage at load with DMM, until you notice the biggest drop in voltage ( which should equal your 'predictions').

Then you disconnect your pot and measure the resistance value and you should be in ballpark.

I would use something like a 20k resistance as load at minimum and a 5 or 10k linear potentiometer.

And i'm pretty sure the value given by Mooly will be confirmed.






Also, yes, i considered contact microphone, but it will be hard to filter sounds from that as a handpiece for a contact mic introduces more noise. I've read articles saying that for capturing lung sounds, it would be better to create a coupling for ecm. So I did a coupling for ecm, to ensure the air is coupled to ecm and that ambient noise is also reduced.

I don't know... where did you see the articles, i would like to see their arguments.
I think a modified stethoscope would be better but it's only intuitive, nothing to back up my opinion.
 
Last edited:
LM386 caught my eye.
I don't normally post on Analog Line Level (I'm an avid Tubes / Valves reader and "poster").

I used LM386 professionally in Parks Ultrasound Dopplers.

Then I built an LM386 "hearing aid" for my dad.
Electret Microphone, JFET stage, Volume control, LM386, Ear Bud.
1.5V button battery for the Electret Mike.
8.6V battery for the JFET and LM386.

LM386 can be very hard to keep from oscillations, etc.

Please post your complete Electret Mike and LM386 schematic, including power circuit (voltage source and power isolation RC filter between Electret and LM386).
Include your LM386 negative feedback gain adjustment circuit.

Perhaps I can help.

Thanks!
 
  • Like
Reactions: krivium
To capture lung sound

Use a stethoscope

Either connect a " computer" microphone to the stethoscope tube
and capture directly to computer with microphone input.

Or use numerous microphones or earbud microphone for cell phone
and capture directly to phone/ phone voice recording amp.

no need to fuse with LM386
it is rather horrible in every way
no offense, it just is a horrible thing.

most computer/laptop/cell phone already have mic input
just need mic

likely has minimum voltage to turn on.
check data sheet. believe min is 4 or 5 volts.
So need check usb voltage if 5 volt or 3.3 volt
3.3 volt could mean to low chip wont turn on.
if I remember single supply so would need capacitance coupling
on output. otherwise half supply constant DC on output.
 
Hopefully I didn't misunderstand the project

I just assumed standard passive or electret
microphones being used to capture lung sound.

So your using massive amounts of gain
from the LM386 to make microphone capture lung sound.

Stethoscope should eliminate large amounts of gain to make it work.
Since the membrane would give the gain and placed
directly on body. Give more reveling recordings.
standard mic stuck in the tube where ears normally go
would capture sound better and isolate outside noise.
not require such high gain, and assuming high amounts
of noise would be also be reduced.

not sure of location / region

Stethoscope can range from 95$ to 400$

Cheap but workable solution is affordable
Stethoscope sold at markets in my region
Like Rite Aid or Walgreens market
or amazon from 10$ to 20$ dollars

Also there is automotive application
like Pittsburg brand sold at Harbor Freight
or automotive supply only 5$ to 10$
doesn't have membrane like medical, more a probe.

Maybe not useful for lung project but can capture strange
interesting samples for sound design. probe can be placed
on metal objects and strike the metal object for strange pings
etc etc. cars, cans, bridges, tension wires etc etc
 
TNT, why do you associate me with stethoscopes?

A two-pin electret condensor microphone normally has a JFET common-source stage built in that is meant to be biased by an external 2.2 kohm resistor to a clean supply of about 3 V. The output impedance of the common-source stage itself is pretty high, so the impedance is determined by the 2.2 kohm resistor.

If the noise floor matters a lot, make sure to pick the right capsule. Some have a 14 dB(A) equivalent acoustic noise level, others well over 30 dB(A).

Computer sound cards normally have the supply and resistor built in, so you can connect the capsule straight to the sound card. In https://www.diyaudio.com/community/threads/need-advice-for-a-weird-project.352655/ it was found that making a custom preamplifier would reduce the overall noise floor by about 2 dB compared to connecting the capsule straight to the sound card.
 
Go back to the link in post #4
This is noted Mooly, but I want the complete design of this is my last resort, I guess. The main goal of the project is for it to be low cost and handheld and I think this might require a few configurations to reduce the size. Thank you always, Mooly!
The output impedance of the common-source stage itself is pretty high, so the impedance is determined by the 2.2 kohm resistor.
This is noted MarcelvdG, but this is similar to reply #9, right? I'll consider the 'custom preamplifier' you referred on your reply. Thanks!