Op amp

Thread Starter

Roschambo

Joined Aug 15, 2014
8
I am trying to select an op amp to use to amplify a electret microphone output to attach it to an arduino.
I was looking at the lm324, which sould reach v+ -1.5 V

I was planning to power the arduino with a single 9 Volt battery.
Will the op amp output be able to reach 0 to 5 volts?

And to power the op amp with 9 v and ground.

I want to use one of the op amps in the package as a non inverting amplifier and to offset it using one of the other op amps in the package that will be set up as a voltage follower.

Falstad circuit
Can someone advise me on whether the lm324 is a good choice for this application. And whether the circuit is any good?

Thanks

PS: I hope this is the right location for this thread
 
Last edited:

MrChips

Joined Oct 2, 2009
30,824
Can't see the circuit.

LM324 is fine. Set the gain to about 300. You don't need to offset the voltage. Simply couple the output through a 10μF capacitor.
 

MikeML

Joined Oct 2, 2009
5,444
If Audioguru was still here, he would say that the '324 is a crappy amplifier for audio. However, for this application its shortcomings will not matter. Running on 9V and gnd, the output can swing between a few mV to ~7V, if overdriven. Put a 10K resistor between the '324 output pin and the Arduino AD input (to protect it from being driven above 5V).

The goal should be to set the DC operating point at the '324's output pin to 2.5V (midway for the AD input). Then no coupling capacitor is needed. If the coulping capacitor is wanted, then you will have to add a high-impedance voltage divider on the AD end of the coupling capacitor to bias the AD input to 2.5V.
 
Last edited:

ErnieM

Joined Apr 24, 2011
8,377
While the LM324 is as good a choice as any the circuit is no good.

What are you trying to do with the mic? What are you doing with it's signal?
 

Lestraveled

Joined May 19, 2014
1,946
I agree with everything MikeML said. The LM324 is a old opamp and while the specs say it will operate near zero volts the spec sheet is not specific about how well it will operate.

I suggest that you consider a more modern opamp, an LMC6482, that is guaranteed to operate near zero.
 

Thread Starter

Roschambo

Joined Aug 15, 2014
8
The circuit I cooked up is the following:
Electret circuit.png
The electret microphone is like the following:

The output of the microphone oscillates between -0.2V and +0.2V.

If an op amp receives -0.2V at the noninverting input and the gain is 10 the op amp would try to output -2 V right? As the op amp supply is V+=9V and V- = 0V(Ground) the output will be 0V right?

I want to check changes in volume
 

ErnieM

Joined Apr 24, 2011
8,377
I repeat: What are you trying to do with the mic? What are you doing with it's signal?

Where is it going? Into what Arduino pin for what purpose?
 

shteii01

Joined Feb 19, 2010
4,644
I repeat: What are you trying to do with the mic? What are you doing with it's signal?

Where is it going? Into what Arduino pin for what purpose?
According to OP pic it is going to Arduino A0 port. Normally Arduino A0 port is the first ADC input channel (usually first of six).
 

Thread Starter

Roschambo

Joined Aug 15, 2014
8
I repeat: What are you trying to do with the mic? What are you doing with it's signal?

Where is it going? Into what Arduino pin for what purpose?
The signal should be amplified by the op amp to increase voltage to be able to read it with an arduino. The arduino has analog input pins, these should have a input resistance of about 100M the arduino can read 0V to 5V it will feed back a value between 0 and 1023.
This value will be processed drive a number of components. If the amplitude is greater than a specific value A LED will turn off, when the value is lower than that value the LED will flicker.
 

ErnieM

Joined Apr 24, 2011
8,377
This value will be processed drive a number of components. If the amplitude is greater than a specific value A LED will turn off, when the value is lower than that value the LED will flicker.
Since an audio signal will average around zero one would expect the LED to always be flickering. If the occasional peak value is captured then the LED just stays off a little longer when flickering.
 

BobTPH

Joined Jun 5, 2013
9,003
Easiest way is to use an inverting amplifier and bias the + input to 2.5V. This will get you and output that swings symmetrically around 2.5V.

micamp.JPG

Edited: Use higher resistors for the voltage divider, 10K and 26K would be better.

Bob
 
Last edited:

MikeML

Joined Oct 2, 2009
5,444
The circuit I cooked up is the following:
View attachment 71763
The electret microphone is like the following:

The output of the microphone oscillates between -0.2V and +0.2V...
Here is how I would do it:

I took my own advice, centered the swing at 2.5V, and limited the output to keep from overdriving the Arduino. Note the symmetrical clipping if the gain is turned up...
 

Attachments

Thread Starter

Roschambo

Joined Aug 15, 2014
8
Easiest way is to use an inverting amplifier and bias the + input to 2.5V. This will get you and output that swings symmetrically around 2.5V.
Bob
I did not think this was an option, but this does make sense.

Here is how I would do it:

I took my own advice, centered the swing at 2.5V, and limited the output to keep from overdriving the Arduino. Note the symmetrical clipping if the gain is turned up...
The reason I am using a second op amp as voltage follower is because I thought this would give a more stable virtual ground, what is wrong with my circuit? I thought that because the op amp does not draw current through the inputs the total power consumption of the circuit would be reduced because of the higher resistance voltage divider.

Thanks for all the replies!
 

MikeML

Joined Oct 2, 2009
5,444
For starters, the 1meg Pots are way too high in resistance for LM324 opamps. Their input bias current is too high to use such high resistances.

Lose that useless simulator; it shows ideal behaviour only.
 
Top