Opamp output?

Discussion in 'General Electronics Chat' started by Flappie, Jan 7, 2014.

  1. Flappie

    Thread Starter New Member

    Jan 7, 2014
    12
    0
    Hello,

    I'm a bit confused about the output of this simple schematic.
    It's an R-2R network, connected to the inverting input (line 6, Vin-) of the opamp.
    The value coming from the R2R network varies between 0 and (almost) 5V, at 200 kHz.
    The opamp is a TLC274BIN. The non-inverting input (line 5, Vin+) is connected to the output. As you see, on the output is also a capacitor of 100 nF connected.

    The supply of the opamp is not drawn in this schematic, but V+ is connected to VDD (5V) and V- is connected to ground.

    What will the ouput voltage range be (after the capacitor) ?

    [​IMG]
    Many thanks in advance!!!
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    We had a similar discussion here recently.

    https://forum.allaboutcircuits.com/showthread.php?t=92942

    In doesn't matter how the opamp is configured. You can replace the opamp circuit with a simple voltage source or battery.

    What matters is the unconnected lead of the capacitor has no connection to anything and therefore can assume any voltage (since it is floating).

    Any attempt to measure the voltage with a voltmeter with respect to ground will provide a leakage path to ground and therefore will show 0V with respect to ground over time, assuming that there is no leakage in the capacitor itself.
     
  3. LvW

    Active Member

    Jun 13, 2013
    674
    100
    Flappie, this opamp circuit cannot work as desired.
    All opamps need NEGATIVE feedback, thus you must interchange both input nodes.
    Then, you will have a unity gain follower.
     
  4. Flappie

    Thread Starter New Member

    Jan 7, 2014
    12
    0
    Thanks for your replies!

    The unconnected lead of the capacitor is connected to another opamp (also to the inverting input Vin-), that amplifies the voltage 8 times.

    They told me the voltage range after the capacitor will be -2.5V to +2.5V.
    In that case, after the amplification opamp the output will be -20 to +20V.

    I'm asking this to check whether it's correct or not. I google'd and read a lot, but I can't get a 'certainty' about it. Nor a clear clarification :)

    The meaning is to get a waveform on the output, that looks like a (modified) sine wave (AC).

    The person who drew this schematics, tells me the voltage will be between -2.5V and +2.5V after the capacitor in this circuit, but I'm looking for a clarification/comfirmation.
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    That makes a huge difference. The input of the next opamp has resistance and leakage current. That is going to determine the voltage at the capacitor. In your case, the capacitor functions as a DC blocking capacitor and its function is to allow the AC signal to reach the next stage. Hence a voltage range of -2.5V to +2.5V is the correct assumption.

    You cannot get an output from the opamp that exceeds the positive and negative supply voltages. Thus if the opamp is powered by +15V and -15V supplies for example, the output will clip to something less than those voltages.
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,748
    4,797
    1) While the TLC274's output includes the negative rail, it can only get within 1V to 2V of the positive rail.

    2) As already pointed out (and apparently ignored), you have this opamp configured as a comparator. You can expect that the output will probably end up at close to 0V and stay there unless you get the input down below a dozen millivolts or so, at which point it will go to about 4V and then stay there until your input rises above whatever the output ends up at, at which point it will slam back to to about 0V.

    3) If the other side of the cap goes to an opamp input and nothing else goes there, then your second opamp may not be able to work properly because you can't furnish the input bias current that most opamps need. In general, opamp inputs need a DC path of some kind to make the internal circuitry work.
     
  7. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,393
    497
    Their negative supply voltage of the op amp is connected to ground. I am guessing they will get output of 0 to +5 volts. Since they were told that they will get +2.5 volts, then my further guess is that they will see 0 to +2.5 volts.
     
  8. Flappie

    Thread Starter New Member

    Jan 7, 2014
    12
    0
    Thanks for your replies all!

    Also if I don't interchange both input nodes, as LvW says?

    Indeed I know that, to be clear I'll show the complete schematics of this signal (first opamp is supplied with 5V and GND and second opamp with +24V and -24V).

    [​IMG]

    @ WBahn ; I do not completely understand your reaction. I'm personally not a 'hardware-crack,' software is more my thing.
    Does 2) stay the same as you say, when you see this full schematic?

    This schematic snippet is from a friend who has already made the PCB's of it.
    He's way better at hardware than me, but I got my doubts with this output. I just can't clarify it correctly. I'm developing the software and therefore, I'm looking for a comfirmation/declaration of the desired output voltage range. :rolleyes:
     
  9. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    The feedback connection on both opamps is incorrect.

    Feedback must go to the inverting (-) input of the opamp.
     
    Flappie likes this.
  10. Flappie

    Thread Starter New Member

    Jan 7, 2014
    12
    0
    Hm, now I wonder what that will give... Since the PCB's are already made :D

    So in no way - this can work correctly?

    I must say I'm a bit astonished, because the designer owns a company that produces way more complex electronics than this circuit and they are well familiar with all kinds of opamp's, DAC's & ADC's...
    Error is human, but I know he's checked this schematics multiple times.
    I'm really amazed to be honest :eek:
     
  11. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,393
    497
    Build one, see what it does.
     
  12. LvW

    Active Member

    Jun 13, 2013
    674
    100
    Flappie, as mentioned already, both opamps will work correctly only if you interchange the input terminals (negative feedback).
    More than that, what is the purpose of the first one (unity gain buffer)?
    If you configure the second opamp as a non-inverting amplifier (gain=1+R2/R1) it has a very large input resistance (like the buffer), which means you do not need the buffer at all.
     
    Flappie likes this.
  13. Flappie

    Thread Starter New Member

    Jan 7, 2014
    12
    0
    Thank you very much for your help guys!

    I spoke to the designer of the schematics today, and indeed- he saw his mistake - the input terminals have to be interchanged. We're trying to figure out a way now to interchange them on the PCB or in the way of mounting the components.

    The purpose of the first one is indeed a unity gain buffer. The second one is indeed supposed to be configured as a non-inverting amplifier (1+R2/R1).
    Very good to know that this means I do need the buffer at all! Might be handy to find a solution to the faulty connected input terminals. Thanks a lot!!
     
  14. WBahn

    Moderator

    Mar 31, 2012
    17,748
    4,797
    All three of my comments stay the same. Namely:

    Go look at the Data Sheet for this opamp.

    http://www.ti.com/lit/ds/symlink/tlc274.pdf

    You will find that, with a 5V supply, the maximum output voltage is typically 3.8V (with a 10kΩ load) and they only spec a minimum of around 3.2V at room temperature. You need to either supply a higher voltage, attenuate your input signal (and make up for it with gain in the second stage), or at least find a rail-to-rail opamp.

    Let's say that the voltage at the inverting input of the opamp is Vn=1.0000V and the output of the opamp is currently Vout=Vp=1.0001V. What is going to happen? The differential input voltage is (Vp-Vn)=0.1mV and this gets multiplied by the open-loop gain of the opamp, which at room temp is typically 27V/mV, so just from this tiny difference the output want to go to 2.7V. But as soon as it starts going upward from its 1.0001V the differential input voltage increases and so the output wants to drive higher and higher. The end result is that it saturates almost immediately -- with ~3V/μs slew rate, it will take it less than 1μs to do so.

    Again, the Data Sheet is your friend:

    http://www.ti.com/lit/ds/symlink/opa551.pdf

    The input bias current is up to ±100pA. This is the current that the internal circuitry may need at each input in order to function properly. Note that it could be in either direction and you don't know which (and it may vary depending on input signal). With a capacitor blocking any DC current to one of the inputs, you can't be assured that the opamp will function properly.

    One way to deal with this is to put two resistors, one to each supply, that will nominally hold the input at midvoltage if there is no input bias current and no input signal. To size the resistors, allow for ten times the max offset current, or 1nA, to flow. With ±24V supplies, using two 10MΩ resistors would give you more than a thousand times that without increasing your quiescent current draw by even a fraction of a percent. Now, it is possible that the cap will have enough leakage current to support the bias current, but it isn't particularly good design practice to rely on this unless you KNOW you can count on it.
     
    Flappie likes this.
  15. Flappie

    Thread Starter New Member

    Jan 7, 2014
    12
    0
    Thank you, I appreciate your answers.

    1) Indeed, I already figured out that it needs a higher voltage supply, in order to be able to ouput the full 5V range. Attenuation is not done in this case, because it would degrade the ouput resolution of the signal terribly.
    Since 12V supply is already implemented on this PCB and this opamp can handle a supply of 12V and ground, I think connecting this supply would be the best solution to evoke this problem. Thanks.

    2) Now I do understand what exactly you meant :D. Thanks for this explication, this problem will be solved by interchanging the input terminals.

    3) Ok, this sounds like another problem...
    Is it possible to leave the circuit as it is, test it and maybe the opamp WILL function properly? Or is it quite impossible for it to work like that? If so, I better start figuring out a decent solution for this...
     
  16. WBahn

    Moderator

    Mar 31, 2012
    17,748
    4,797
    Why would attenuating the input signal to match the input range of the opamp degrade your output resolution. Isn't (A/2)*2 equal to A? But powering the opamp by a higher source voltage is a perfectly acceptable (and possibly preferred) solution.

    Maybe the opamp will function properly... until it heats up. Or until the input signal is just right to cause problems. Or until the unit has aged a month or two. Or until you replace the capacitor with a better quality one. Or until....

    Better to do it right the first time. Just use the two high-valued resistors as described. You can probably solder them pin-to-pin on the underside of the board without problems.

    For that matter, you could probably solder just a single resistor in parallel with the coupling capacitor and it will work fine. Just make it large, say at least 100kΩ but 1MΩ would be better. However, if you are looking at working with very slow signals, this might cause problems. But then again, working with slow signals is where the present design is going to be most likely to cause problems.
     
    Last edited: Jan 10, 2014
  17. Flappie

    Thread Starter New Member

    Jan 7, 2014
    12
    0
    Indeed. What I mean is (I'm working with an 8 bit R2R ladder on 5V range), if I 'degrade' this range to 3.8V ; my output signal will look worse than on 5V range.

    But as I'm writing this, I notice this doesn't make sense. The resolution stays the same and I guess it'll be just a matter of a higher amplification to get exactly the same result.
    The only correct reason not to do it is, I think, that my lookup table will be less 'flexible' in the software (in terms of possible multiplication/dividing factors).

    If I power the opamp with 12V and ground (looks like the easiest solution), will I have a greater risk on damaging the MCU if something would go wrong? Because the 12V would go to the MCU lines? Or is this negligible?
    Another option would be to mount another opamp instead of this TLC274BIN, a rail to rail one for example like MCP6004. But then I must seek a good 'replacer' for this opamp. I don't really know what's best, to seek another one or to fix the other power supply on the PCB.

    So you are saying to use OR the 2 resistors, 1 to each supply, OR one resistor in parallel to the capacitor?

    I'm not working with very slow signals (I think); the slowest signal will be around 800 to 1000 Hz at the output. The fastest signal will be around 4.5 kHz.
    To get these frequencies at the output, the sample rate will be more or less between 42 kHz minimum and 200 kHz as a very maximum.

    To be clear all the way: the meaning of this output is to get an AC signal that looks like a sine wave with frequency range between 1 kHz up to 4,5 kHz.
    Depending on a given input value of a sensor, the frequency of this output will be around a certain value.
    The amplitude of the output signal will vary as well, also depending on this given input by the sensor (the output will vary between around 10VAC up to maximum 40VAC).

    My meaning is to describe the signal in the lookup table for 40VAC (with the constant amplification of the second opamp) and to do multiplications (accually dividing) on the described lookup table, depending on the input value of the sensor. So if I divide the lookup with a factor of 4, it will output the lookup table for a 10VAC output.
     
    Last edited: Jan 12, 2014
  18. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,159
    Is C12 really 100 farads?
     
  19. Flappie

    Thread Starter New Member

    Jan 7, 2014
    12
    0
    No :) it's 100 nF.

    But in order to get the highest amplitude on the input of the second opamp, I will experiment a bit with the value of C12.
    I will start with 10nF and gradually place 100nF, 330nF and 680nF in parallel and measure my output each time.

    If you have any tips for this, always welcome :)
     
  20. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,159
    Schematics are supposed to convey clarity.

    You have 0 to 5 volts input. You do not indicate the Vdd and Vss of the first opamp. You do not have the flag (pin 8) terminated. Do you expect the output to swing between -24 and +24?

    Have you reviewed the two datasheets?

    Is this schematic from a book or from the internet? If so, cite the source.
     
Loading...