capacitor input question

Discussion in 'General Electronics Chat' started by CaliusOptimus, Apr 24, 2007.

  1. CaliusOptimus

    Thread Starter Well-Known Member

    Aug 14, 2005
    59
    0
    ive been toying around with a few op amps and transistor, attempting to make a small audio amp for the first time. i noticed on most (if not all) of the amp schematics on the net have a capacitor between the input signal and the first stage of the amp. So, i connected a cap (.1uF) in series with a sine wave signal from my sound card to the non-inverting input on my op amp, along with a 10K resistor from the non-inv to ground to bias at 0V. i ran the output of the op amp back to my soundcard to view the waveform. no matter what restistor/cap combo i used on the input the waveform became distorted at either extreme of the 20hz-15khz spectrum my sound card will sample. how would i go about avoiding this and still have some sort of DC blocking function on the input of my amp?

    i appreciate it! :)
     
  2. gootee

    Senior Member

    Apr 24, 2007
    447
    50
    Experimenting like that is a great thing to be doing, as long as you're careful not to damage your soundcard by connecting it improperly.

    To run an opamp as an amplifier, you "must" use feedback from the output pin to the inverting input pin (hopefully with as short a path as possible).

    With your setup as described, i.e. if you have NO feedback connected at all, just connecting a wire directly from the opamp's output to its inverting input should make it work MUCH better, although that configuration would have a gain (i.e. amplification factor) of one (a "voltage follower").

    If you already have something like another 10K resistor from output to inverting input, maybe even with a very-low-pF cap in parallel with the resistor, then the problem you are seeing "might" be because the 0.1 uF DC-blocking/AC-coupling "input" capacitor is too small to pass the low frequencies without altering them. Also, if it's a ceramic cap, you might want to try another type (and probably also with a larger value), such as one of the film types, especially if you already have some on hand, or maybe try two back-to-back electrolytics. Of course, you could also try removing the input coupling cap, altogether, especially if there's very little DC in your input signal, or you don't have it set up for much gain.

    But it sounds like something else is probably also going on. You might also be seeing problems associated with using wires that are way too long, to connect the signal to the opamp circuit, and the power supply's power and ground connections to the opamp's power pins and your ground. Shorten all of the wires as much as possible, and see if that helps.

    Also, you "should" have two 0.1uF (probably ceramic) capacitors, with one connected very close to each of the opamp's power pins, with their other (also as short as possible) leads connected to each other and to ground (but preferably using a different ground conductor for them to get back to the power supply ground than your 10K resistor from the non-inverting input [or any other "signal" ground] uses). And, if you can, connect a couple of 10 uF (or so) electrolytic caps in parallel with the 0.1 uF caps on the opamp's power pins, but not necessarily as close to the pins, if it's not convenient. Make sure their polarities are correct, though! (e,g, If you have +V, Gnd, and -V from your supply, then the "+V to gnd" cap's "-" goes toward gnd. And the "gnd to -V" cap's "-" goes toward -V.)

    There are other possibilities for the cause of your distortion. Your opamp might not be capable of reproducing those frequencies well, at the amplitudes you're using, for example. You could try using a smaller input signal, or a lower gain configuration if you're using any gain, or a different type of opamp. And if you're using capacitance in parallel with a feedback resistor, you could try lowering the cap's value.

    To be thorough, too, you should check the frequency response without the opamp circuit in the loop, in case it's a problem with the sound card or something else besides the opamp circuit.

    Have fun!

    - Tom Gootee

    http://www.fullnet.com/~tomg/index.html

    -
     
  3. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,157
    Running the output of the op amp back is not a good idea.

    If your using the line input of the sound card, you need to attenuate the op amp to less than 1 volt. If your using the microphone input, you need to attenuate the op amp output much lower to probably around a few millivolts.

    Isolate the op amp output and the sound card input with a series capacitor. If you were trying for 20 Hz, The 0.1 uF capacitor has an Xc of about 80k, so the input to the op amp was very low ... about .11 of what you were delivering from the sound card.

    Post the schematic of your amplifier and post the screen shots of your distortion.
     
  4. CaliusOptimus

    Thread Starter Well-Known Member

    Aug 14, 2005
    59
    0
    thanks for the replies! i solved my own problem, as time would have it, but of course ive stumbled on to something else. my problem was solved by changing my 10k to a 1meg. big difference there, but it did the trick. ive included a schematic so you can see what im working with. anyway, i salvaged the 4558 opamp from an old lil guitar amp, and it's the only one i havent fried yet. ive got a couple 741's and i just cant figure out what to do with the 'offset null' pins. i tied them to ground and a melted ic is what i got, so that wasnt the answer. also another question, what is the difference between a 'comparator' and an opamp? ie lm339 vs 4558 or 741. thanks again!

    [​IMG]
     
  5. Eddy Kurent

    Member

    Apr 9, 2007
    18
    0
    Hi, Calius

    A very good tutorial on op amps is found at www.facstaff.bucknell.edu/mastascu/eLessonsHTML/OpAmps/OpAmp2.html

    That should answer many of your questions.

    As shown, your op amp is doing - nothing. It is merely a buffer between the input and output from and to your sound card.

    Do not worry about the offset null pins. Leave them unconnected.

    Comparators and op amp amplifiers perform two separate functions, which the above link should explain.
     
  6. CaliusOptimus

    Thread Starter Well-Known Member

    Aug 14, 2005
    59
    0
    thank you, the link was very helpful! while experimenting i noticed that when the op amp was configured as is in the schematic (minus the coupling cap), the output saturates to +Vcc when the + input is dropped to fully negative supply voltage. is there anyway to avoid this, or is it an artifact of the particular part? ive had a few ideas for audio amps, but this effect would be detrimental to the design. thanks again guys, i know ive posted a bazillion different questions. gotta learn some how!
     
Loading...