Op amp

Discussion in 'General Electronics Chat' started by Roschambo, Aug 15, 2014.

  1. Roschambo

    Thread Starter New Member

    Aug 15, 2014
    8
    0
    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: Aug 15, 2014
  2. MrChips

    Moderator

    Oct 2, 2009
    12,451
    3,370
    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.
     
  3. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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: Aug 15, 2014
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    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?
     
  5. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    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.
     
  6. Roschambo

    Thread Starter New Member

    Aug 15, 2014
    8
    0
    The circuit I cooked up is the following:
    Electret circuit.png
    The electret microphone is like the following:
    [​IMG]
    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
     
  7. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    Here is complete and tested amplifier I built for my grandson. It is very similar to your amp. (I used a rail to rail opamp.) Maybe it will give you some ideas.
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    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?
     
  9. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,398
    497
    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).
     
  10. Roschambo

    Thread Starter New Member

    Aug 15, 2014
    8
    0
    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.
     
  11. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    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.
     
  12. BobTPH

    Active Member

    Jun 5, 2013
    789
    114
    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: Aug 15, 2014
  13. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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...
     
  14. Roschambo

    Thread Starter New Member

    Aug 15, 2014
    8
    0
    I did not think this was an option, but this does make sense.

    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!
     
  15. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Nobody can see your circuit because your link has been busted since your first post...
     
  16. Roschambo

    Thread Starter New Member

    Aug 15, 2014
    8
    0
    It is the circuit in the second post
     
    Last edited: Aug 15, 2014
  17. to3metalcan

    Member

    Jul 20, 2014
    228
    23
    (The link's not actually broken, it just wants to run java...doesn't work so great on mobile devices!)
     
  18. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Or if you have Java disabled, like me...
     
  19. Roschambo

    Thread Starter New Member

    Aug 15, 2014
    8
    0
    Could I get some feedback on what is wrong with my circuit?
     
  20. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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.
     
Loading...