First Google “electret microphone +LM386”
If that doesn’t answer your question, come back here and follow @jremington ‘s suggestion.
I am using Uno Arduino.My goal of project is to measure bpm without any sensor.
IF your mic is not being used as a sensor, you will have to explain in more detail.
A microphone is a sensor.
See post #3.
Do you have any specs?
The LM386 is a "power amplifier, designed to drive a speaker.
A "normal" audio signal is AC. It goes positive an negative, and negative voltages can fry your Arduino... Especially from a power amplifier (with enough current-capability to drive a speaker).
Also, electret microphones need "power". Laptops, soundcards, and phones provide 5v out to the microphone, but most mic preamps don't.
Most "sound sensor" boards (like this) have a biased output. The output rests at 2.5V and with silence you get (about) 2.5VDC and a regular Arduino with a 10-bit ADC reads 512 (with silence).
The AC audio signal "rides on top" of the DC and goes up & down from there. The louder the sound, the more the positive & negative peaks deviate from 2.5V. (You can easily subtract-out the bias in software if you wish.)
P.S.
If you can use a line-level audio signal (like the RCA outputs on a CD/DVD player, etc.) or a headphone signal instead of a microphone, there is a schematic for a bias circuit in my post for The World's Simplest Lighting Effect.
Do NOT connect a speaker wire! Depending on amplifier power, you might get too much voltage and again, fry the Arduino.
Maybe some more details here --> https://forum.arduino.cc/t/digital-stethoscope-using-arduino/
When is a mic NOT a sensor?
When it´s in a carnival party costume ![]()
But you missed my point. I was giving another post (presumed being of the same project) that can explain the OP final objective.
- You know what kind of project you like to build.
- That's why I assume you've already searched for it in Google.
- From this I conclude that you have not found a manual, and you now want a schematic + code from us.
Please correct me if I am wrong.
I doubt it if you have followed the steps above.
But you would have to specify (You did it well!)
what do you like to program?
what functions should it have?
what devices do you have? (Which Arduino, etc.?)
Only question:
How do you imagine it without a sensor?
You can also post it in the "Jobs and paid services" category. Here you are more likely to find some who will program extra code for you. You might also get a schematic and a more detailed description.
More cross-posts merged and @zainzakir has received a two day suspension.
@zainzakir, I hope that when you return to the forum you'll be more respectful of our community.
Thanks in advance for your cooperation.