need some assistant on the op-amp circuit attached in the thread.

  1. Yes, although the mic needs a DC bias to power the preamplifier in the mic.

  2. 2v is the maximum RMS voltage you should feed the speaker, so as not to exceed its rated power. You will get some sound out of the speaker at a much lower voltage than this.

  3. The output of that op amp circuit is the amplified AC signal superimposed on a DC voltage of half the supply voltage.

  4. That calculation will give you the AC component of the op-amp output

  5. The resolution of the Arduino analog input (using the default 5v analog reference) is around 5mV. I suggest you amplify the signal enough so that the AC component is at least 100mV peak to peak at the level you wish to detect, preferably more.

100mV p-p is enough, 1v would be better. Use the circuit you posted in your first post in this thread, and change the values of the feedback resistors if you need to alter the gain.

Ok, since LM358N is dual op-amp, will it be better if I take advantage of the two op-amp inside the chip in order to amplify? Or just one will do? Also I found (DIY Tengu on a breadboard – tinkerlog) where LM386N is used and the circuit is much simpler. So what is the best option?

  1. should i use lm358n as in the 1st attachment.
  2. use dual lm358n for higher gain
  3. use lm386n since it is simpler.

One op amp in an LM358 should be able to give you a gain of up to about 100 before the gain drops at the upper end of the audio frequency range. So you only need to use both halves if you need a gain of more than 100. I would try using just one half.

Seeing as you want to know when YOUR baby is crying, you should record him/her crying so you have a repeatable cry to tweak your filters that you have not yet implemented so the gadget you are building does not put your spouse in hommicide mode with you as the unlucky victim.
To disambiguate my last statement... simply selecting a level for trip will drive your wifeee insane with nuisance trips from any noise....albeit the lawn mower next door, the front door opening and closing, ect. Filtering before the trip detection will allow you to tailor the heuristics of your preamp to match that of your baby's cry, thus making it less sensitive to ambient noises you don't want trips from. Such as dog shock collars are filtered for the unique content of a dog bark so the poor animal doesn't get a jolt when he scratches his head. (I owned a cheap one, it couldn't discern the clank of the d-ring from a bark, so the dog pretty much hid under the bed whenever the collar was on..)

Hehe, no actually its just a simple project that will enable me to learn few things. I don't intend to use it but maybe if it became that good, why not :slight_smile:
Right now i am just trying to amplify the voltage from microphone. Maybe once I master it use filtering.

Since LM358 has maximum gain of 100, I should atleast get 10mv input. But the electret microphone only produce few hundred uV. So I guess getting 1V is impossible. Same goes to LM 386 which has a gain of maximum 200. So, i guess just getting 100mV output will do the job.

yaantey:
Hehe, no actually its just a simple project that will enable me to learn few things. I don't intend to use it but maybe if it became that good, why not :slight_smile:
Right now i am just trying to amplify the voltage from microphone. Maybe once I master it use filtering.

Since LM358 has maximum gain of 100, I should atleast get 10mv input. But the electret microphone only produce few hundred uV. So I guess getting 1V is impossible. Same goes to LM 386 which has a gain of maximum 200. So, i guess just getting 100mV output will do the job.

More specifically, if you set the feedback resistors to get a higher gain (say 1000), that gain will be provided at the lower end of the audio frequency range but not at the higher end. It may still be adequate for the purpose. If not, then you can use one op amp to amplify the output of the other, with each set to give a gain of (say) 32. The datasheet suggests that the gain-bandwith product of one op amp is around 500K at 10v to 15v supply voltage, but unfortunately doesn't give the value with a 5v supply.

Ft is typically 1MHz for a GP op amp. A term gain bandwidth product comes into play Ft = GAIN*F. So at Dc-20KHz Bandwidth you max closed loop gain is 1+1MHz/20KHz or 501. Higher gain can be set with the understanding that the gain will roll off above the GBP.

I got beaten to the punch...lol

that gain will be provided at the lower end of the audio frequency range but not at the higher end

I didn't get this piece of theory at all (about the lower and higher frequency range). Can you explain to me in a simple manner if you can. From what I received before I don't necessarily need to amplify to 5V, just 1V will be enough, right?

Basically you don't get as higher gain at high frequencies as you do at low ones with an op amp.
Therefore if you ask too much gain from a device it will not delver it at the high end.

@yaantey

Seeing as you want to know when YOUR baby is crying, you should record him/her crying so you have a repeatable cry to tweak your filters that you have not yet implemented so the gadget you are building does not put your spouse in hommicide mode with you as the unlucky victim.
To disambiguate my last statement... simply selecting a level for trip will drive your wifeee insane with nuisance trips from any noise....albeit the lawn mower next door, the front door opening and closing, ect. Filtering before the trip detection will allow you to tailor the heuristics of your preamp to match that of your baby's cry, thus making it less sensitive to ambient noises you don't want trips from. Such as dog shock collars are filtered for the unique content of a dog bark so the poor animal doesn't get a jolt when he scratches his head. (I owned a cheap one, it couldn't discern the clank of the d-ring from a bark, so the dog pretty much hid under the bed whenever the collar was on..)

What ajofscott is saying, you need to add a "band pass filter", the sound of a baby is around 2 kHz to 6 kHz. ( I maybe wrong ), I know it is a hight pitch sound anyway. A LM358 is fine, it got a dual op-amp in it.

Hi,
Can I directly connect the electret microphone to oscilloscope to estimate the maximum output voltage from it so that I would know how much amplification is needed. I know noise and stuff will effect and I am going to test considering it. I'm going to scream at the microphone and try some loud music too. Attach is the sort of microphone i am going to use to giv u an idea (but not exactly the same model). Do u think I can hook it directly to oscilloscope to test?

Thanks.

electret microphone.jpg

It depends on two things:-

  1. The maximum sensitivity of the oscilloscope input.
  2. If the microphone requires a voltage to make it work.

Attached is the microphone type i am using. You think it can work if i connect to oscilloscope?

If you connect a 10k or so resistor from the +ve side of the mic to the +ve side of a 9v battery, and connect the -ve side of the 9v battery to the -ve side of the mic, and switch your oscilloscope input to AC, then you should be able to see the mic signal on the scope and thereby estimate the signal strength.

@yaantey

I happen to have a few of those mics, so I did this experiment using my scope I have. Well I set my voltage setting at 2 mV/div and I did get something, ( I was blowing on it ) and I place close to the speaker of my DIY AM radio, I did get something ( a sound waveform ) and try to measure it, it between 2 mV to 5 mV ( peak-to-peak ). If you feel the op-amp circuit do not amplify enough, you can still add another amp. Usualy, when I design this type of system, I add a transistor for the fisrt stage and the second stage a op-amp. Then I add a filter ( in your case a band pass filter set around the baby cry frequency ) and amplyfy and buffer to going into a analog input of the arduino.

And I will use a electronic circuit simulator to check the design and change some values ( resistors and capacitors ) if needed - if it improve or not.

I manage to test the voltage output from the electret mic and attach are the output from the mic when I shouted at it, played music and did nothing. All outputs were produced when I shouted and played music in very closed proximity to the electret mic, almost touching it. But unlinke Techone I found the my electret mic produce 23 mVpp. I got 8 mVpp without music and shouting, and by shouting I got 31 mVpp, hence 23 mVpp.

Attached are the output and the simple connection used, does the reading seem good?

Connection.png

My experiment simply measure the output of the mic without voltage and resistor. After net surfing, search : electret microphone ,I come across this site : electret microphones | Open Music Labs
Which I did know about the inside JFET, so DC42 is correct, it need a resistor and a voltage supply. I wonder if you will get better result by changing the resistor value ( lower or higher ) ? Hum , maybe...

@yaantey

The reading seem right.

Electret mics make voltage by the effects of altering dielectric thickness by sound waves. There has to be a charge across the capacitance for dielectric changes to manifest as voltage changes. C=Q/V, where C= capacitance in Farads, Q= charge in coulombs, and V = plate differential in Volts. Rearranged we get V=Q/C, thus anything that increases C reduces V and visa versa. If V=0 because the cap was never charged we will never see that C changed at all.

Hi,

I have downloaded a baby crying voice from (Baby Crying Sound Effects - Wav Mp3 Download) and used audacity to analyse the frequency. I have got the graph but I am not quite sure how I can find the fundamental frequency. I have attached the .txt file and the graph. Can someone who know the stuff point me to the fundamental frequency. Thanks.

spectrum baby 2.txt (6.18 KB)