Op amp help!

Discussion in 'General Electronics Chat' started by rougie, Aug 26, 2013.

  1. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    Hello,

    Well, I have experimented only with non-inverting configurations using the lm324 op amp.

    I just decided to add a voltage divider at the non-inverting input. Why? Because I am exploring and experimenting. So, now, I am not sure if we can still call this configuration an non inverting op amp configuration?? I think we do... but not sure.

    The point is, I have done an inverting op amp circuit in the attachment below and it works fine. I put in 4vdc at the non-inv input and out comes 5vdc.

    I figured it out intuitively and using the differential amplifier formula and it matches. Then I tried, to calculate vout using the common mode voltage and differential gain formulas but the output came to 8 volts instead???

    ** QUESTIONS **
    1) Given the way the opamp is connected in the circuit below, is it okay to calculate such a circuit using the common mode/differential gain formulas as we were atemping to do in my previous thread?

    2) If so, why am I getting 8v instead of 5v?

    thanks
     
    Last edited: Aug 26, 2013
  2. LDC3

    Active Member

    Apr 27, 2013
    920
    160
  3. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    Rougie - your topology this isn't a differential amplifier. If V1 is permanently grounded the amplifier has only one input.

    What is your op-amp supply voltage? Is it unipolar or bipolar - what values?
     
  4. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    Hello t_n_k,

    I should of drawn a clearer schematic.... sorry!

    To answer your questions, the op amp supply voltage is connected to +/-14 Vdc.

    And yes I figure it's a non inverting configuration and not a differential.
    Bipolar? I guess so as its connected to +/- supplies.... ...

    What values are you asking?

    Okay, well then are you saying that in the above circuit we cannot
    calculate it using common and diff gain formulas because
    we have v1 to ground? right? simply because the circuit is a
    non Inverting op amp and not differential right?)

    Bon, t_n_k, I'm lost on something here..... so lost that I am
    deep in the woods.... and I don't think I can be rescued!!!! LOL

    Can you please clarify what the heck common mode voltage is?

    I have read that it is the portion of the voltage that is common
    to both inputs. So for example.... if v1 has 10v and v2 has 5 volts
    isn't the portion of the voltage that is common to both inputs
    5v? Where do they get this idea from that the portion of the
    common voltage to both inputs is:

    vcm=v2-v1/2 ????

    this makes no sense to me !!!!

    I have read tons of articles and they all say the same thing...
    something is not clear....

    Anyways.... thanks for replying.
    r
     
    Last edited: Aug 27, 2013
  5. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    You most certainly can use the differential and common mode formulas just fine. You simply haven't done so. You have made a fairly simple and easy to make mistake. If you would care to redo your work and properly track units, I would be more than happy to point out exactly where you made your error -- assuming you don't spot it while redoing the work.
     
  6. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    Sorry rougie I didn't read your original post correctly. I thought you had done an experiment and obtained 8 volts out rather than the correct 5V. I just thought - "... must have a wiring error ...". That's why I asked about the supply voltage.

    As WBahn says you can certainly use the common mode and differential mode gains to verify your intuitive solution. Obviously you have some errors in your working - I didn't look at that part of the image.

    I wonder why you are keeping on with the common mode and differential mode issues against some earlier advice. Not that there's a particular problem with wanting to know what these terms mean or when and why they are of importance.

    I would only be interested in such matters when I was looking at a true differential amplifier in which I want to amplify only the difference input signal and reject any response to the common mode value present on the differential input voltage. For instance, if I was wanting to measure a voltage drop across a current sensing resistor in a power circuit, when the resistor is sitting at a high common mode potential. All I want is the voltage drop across the resistor. I don't want the fact that it (the resistor) might be sitting at a common mode potential of (say) 50V to cause any error in the resistor voltage drop reading. I only want the parameter value of interest - anything else is a potential source of error which might lead to inferior circuit performance. Designing a differential amplifier with good common mode rejection is a challenge and requires some attention to detail. Perhaps you can discover other applications where differential amplifiers have to meet stringent common mode rejection performance measures.
     
  7. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    Hello guys,

    I finally found some time to reply... sorry for the delay!

    oh! I found the error.... Please see attachment!


    aaahhh you guys got me curious!!!

    WBahn, you may want to put in the last square bracket at 19.2 ... just a thought... ;)

    Okay, well, guys, I thank you a lot for your help. I am looking at WBahn and the other links similar to it and slowly piecing it together....

    Guys, don't be surprised if I come back with more questions on this.... because I still have trouble understanding some concepts such as:

    ================================================ (A)

    I have read that it is the portion of the voltage that is common
    to both inputs. So for example.... if v1 has 10v and v2 has 5 volts
    isn't the portion of the voltage that is common to both inputs
    5v? Where do they get this idea from that the portion of the
    common voltage to both inputs is:

    vcm=v2-v1/2 ????

    this makes no sense to me !!!!

    Why is the common mode voltage = v2-v1/2 ???

    ================================================(B)

    Today I have done different circuits such as ramps and simply figured out the gain
    by vout/(v2-v1). Which really equated to the :

    Va = rf/ri

    but then again this was a differential op amp ..... :D

    In short I am trying to see exactly what's so special about using:

    vout = Acm x Vcm + Ad x Vd

    to find out vout !!

    I know, I know, I know darn it.... we talked about it in other threads but the benefit or advantage of using this versus the differential equation is not sinking in ...


    ================================================(C)
    ahh! you lost me! But that's okay.... I will be back with more questions about common mode and differential gains!


    A little sentimental feedback......

    You know guys, and I am not just talking to t_n_k or WBahn, I am talking to the whole forum here..... Sometimes, many noobs will post a question... and usually, thereafter, the nooby, is flooded with information coming from all tangents. It often happens that much of this information is totally misunderstood by the nooby and not biased by an unmotivated attitude but simply because he or she doesn't understand what the postee's are trying to explain. Yes, sometimes there are important concepts that need to be understood before one attacks the math and thereby influencing the nooby to hold off a little before crunching numbers.

    So, for the sake of all the noobs in this and other forums, please understand that it is not laziness or malicious intentions if one re-asks the same question, it's simply that he or she was unaware that the particular question was explained in the previous thread. Or it can simply be that at the time the question was answered (in a previous post perhaps), the noob may not have had the necessary knowledge to understand it. And because of this reason, the noob may forget that this was answered previously.

    I am sure noobs try not to forget previous information that was posted in their threads, but it can happen that due to ignorance and such a huge overflow of information, that...in all empathy, we may forget!

    If it happens, I (we) apologize!

    t_n_k and WBahn, thanks for helping out!
    rougie
     
    Last edited: Aug 27, 2013
  8. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    Done. Thanks a lot.

    It isn't. It's (v2-v1)/2. But I know that's what you meant.

    In theory they could, but the bookkeeping becomes more difficult. For your example with v1=10V and v2=5V, you are saying the it would make sense to say that the Vcm is 5V and the Vd is 5V, right? But what if v1=5V and v2=10V? Wouldn't you still want to say that Vcm is 5V but that now Vd=-5V?. It becomes harder to go back and forth between things because you are always having to make decisions based on which one is actually larger -- something you don't know in advance.

    Second, First, what would the common mode voltage be if v1=10V and v2=-5V? Defining the common mode voltage to be the average is a simple and well-defined quantity for any value of v1 and v2.

    Third, the notion of purely differential inputs means that if we start out with both inputs at zero, that increasing ONLY the differential voltage entails a symmetric action, namely increasing one input by a certain amount and decreasing the other input by the same amount.

    I pointed out several useful things in the blog. To recap: If we WANT an amplifier that ONLY amplifies the difference between to signals, which is very, very, very commonly the case, then when the gains are written in this fashion we have a very clear path to pursue in order to achieve that goal -- we set Acm=0 and figure out what the constraints on the circuit are in order to make that happen.

    When you have a power supply that goes up by 5%, then the common mode voltage of two signals powered from that supply will likely also go up by about 5% each. But you don't want your output changing just because the power supply voltage increased. If the common-mode gain is zero or very, very small compared to the differential gain, then it won't.

    Electromagnetic noise induces unwanted signals into circuits. By laying out the circuits well we can create a situation in which these signals appear as common-mode components with little differential component. As a consequence, their effect on the circuit can be made negligible if the common-mode gain of the circuit is very small compared to the differential component.
     
  9. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    WBahn,

    Okay, so its a well defined compromise (average) of what the common portion of the voltage that is applied to both inputs! And when we multiply this average by the gain obtained from:

    Acm = [Ro/(Rb+Ro)(1+Rf/Ra)-(Rf/Ra)]

    we get the true common voltage reflected at the output hence the

    Acm x Vcm

    part of the equation (21) of your blog.

    Okay, its getting a little clearer... if I am wrong please let me know!

    So, allow me to be an ignorant parrot.... In laments terms, when do we use the differential formula,

    vout = V2(R2/(R1+R2)) ( (Ra+Rf)/Ra) - V1(Rf/Ra)

    verses the common mode/diff gains formula:

    vout = Acm x Vcm + Ad x Vd


    I see, both formulas give the correct answer!! Is it because we can use these formulas

    Acm = [Ro/(Rb+Ro)(1+Rf/Ra)-(Rf/Ra)]
    Ad = 0.5[Ro/(Rb+Ro)(1+Rf/Ra)+(Rf/Ra)]

    to stabilize the amplifier should it be exposed to noise as for example varying power supply?

    Thanks
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    That last point is the most important one -- BOTH formulas give the correct answer as long as you use them properly. So, in theory, it doesn't matter which one you use. You could flip a coin and say, "Today I am going to use common-mode and differential gains."

    It's like finding the power dissipated in a resistor. Do you use P=I*V, P=I^2*R, or P=V^2/R? All are correct and valid and so, theoretically, it doesn't matter which you use. But is some cases using one form is trivial and using another form requires some additional work.

    So you use whichever form makes the computation you are trying to do right now the easiest or that conveys your message the most clearly.
     
  11. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    thanks for your help WBahn,

    one more thing....

    what utility do you use to make your math formulas
    so elegant.... I would like to do the same in my personal
    Word notes....

    thanks
     
    Last edited: Aug 28, 2013
  12. analogdesign

    New Member

    Aug 29, 2013
    14
    1
    LaTex is excellent for equations. The equation editor in Word is very good too, though.
     
  13. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    I'm using the LaTex scripting facility -- there are a couple of stickies in a couple of the forums that tell you how to use it. When you quote material that has one of these equations, you can see the script that created it.

    The rendering engine used by vBulletin is actually pretty poor. LaTex (or the "parent" program, Tex) is one of the most widely used document typesetting languages for everything from journal articles to textbook manuscripts and is intended to produce publication-quality output.
     
  14. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    thanks guys
    r
     
Loading...