LC Oscillator with OP-AMP

Discussion in 'Homework Help' started by cebrax, Jan 31, 2010.

  1. cebrax

    Thread Starter Member

    Jan 30, 2010
    26
    0
    [​IMG]

    Hello!

    This circuit is an LC oscillator with a digital output, using single supply ( 5V GND )OP-AMP.
    I have been trying to understand this circuit step by step, but two days, nothing. Can anyone explain the operation of this circuit step by step like; "... at initial position this has this voltage and after this charges this happens so opamp is in this mode and the output is this so it makes ..." . Thanks everyone!

    The circuit schematic is added. And also I want to add the Falstad Circuit Simulator codes for you to import:
    Code ( (Unknown Language)):
    1.  
    2. $ 3 5.0E-6 32.755850052045055 54 5.0 50
    3. a 376 248 456 248 1 5.0 0.0 1000000.0
    4. r 376 328 456 328 0 47000.0
    5. w 376 264 376 328 0
    6. w 456 328 456 248 0
    7. g 280 328 280 376 0
    8. l 152 232 152 328 0 1.0 -0.00261395817586732
    9. c 248 232 248 328 0 9.999999999999999E-6 0.6658661804968603
    10. w 248 328 152 328 0
    11. w 152 232 248 232 0
    12. O 456 248 504 248 1
    13. w 360 168 360 232 0
    14. w 360 232 376 232 0
    15. c 280 328 376 328 0 1.0E-5 -2.4853614377662505
    16. w 248 328 280 328 0
    17. c 360 232 248 232 0 9.999999999999999E-6 2.5009190426051853
    18. R 248 88 232 88 0 0 40.0 5.0 0.0 0.0 0.5
    19. r 248 88 360 168 0 100000.0
    20. r 360 232 280 328 0 100000.0
    21. w 456 168 456 248 0
    22. r 456 168 360 168 0 100000.0
    23. O 504 376 520 376 0
    24. o 9 64 0 42 9.353610478917778 9.765625E-55 0 -1
    25. o 6 64 0 34 1.25 0.003125 1 -1
    26.  
     
    Last edited: Jan 31, 2010
  2. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    My post was going pretty far off, so I deleted it and am starting over.

    You need designations, to allow discussion of the schematic. You also need to make it clearer. I'll show you what I mean...

    [​IMG]

    I have a problem where you put R1 and R2. The op amp needs biased, but they are in the wrong location to do this. As for the rest, the tank circuit exhibits maximum resistance to the resonant frequency. This creates positive feedback.

    Take another look at R1 and R2 though, betcha they should be on the - input of the op amp.

    I'm willing to bet this is more what you were trying to do...

    [​IMG]

    There R1 and R2 will allow the op amp to float stably between the power supply rails. The rest is positive feedback and gain.
     
    Last edited: Jan 31, 2010
  3. cebrax

    Thread Starter Member

    Jan 30, 2010
    26
    0
    Hello Bill!

    Thanks for the answer!

    Now, I am starting to understand the circuit. Very big help of re-sketching and seperating to parts.

    However I couldn't understand this comment of you. How come tank circuit creates the positive feedback? Anyways, instead of this, I just took the tank circuit as an AC supply that needs feedback:
    And the second circuit you have posted, where inverting input of the op-amp is biased, doesn't work in the simulation. Here is the simulation codes for you to import in Falstad Circuit Simulator:
    Code ( (Unknown Language)):
    1.  
    2. $ 1 5.0E-6 10.634267539816555 50 5.0 50
    3. a 336 240 432 240 0 5.0 0.0 1000000.0
    4. r 336 160 432 160 0 47000.0
    5. w 288 160 336 160 0
    6. w 336 160 336 224 0
    7. w 432 240 432 160 0
    8. r 336 320 432 320 0 100000.0
    9. w 432 320 432 240 0
    10. w 336 320 336 256 0
    11. r 288 80 288 160 0 100000.0
    12. r 288 160 288 240 0 100000.0
    13. g 288 240 288 256 0
    14. R 288 80 288 48 0 0 40.0 5.0 0.0 0.0 0.5
    15. c 336 320 240 320 0 1.0E-5 -1.1154503566207607E-4
    16. c 240 320 240 400 0 1.0E-5 -7.832433580167812E-5
    17. l 176 400 176 320 0 1.0 -3.285020607574556E-7
    18. w 240 400 208 400 0
    19. w 208 400 176 400 0
    20. w 240 320 176 320 0
    21. g 208 400 208 416 0
    22. w 288 160 224 160 0
    23. c 224 160 176 160 0 1.0E-5 1.211277763324845
    24. g 176 160 176 192 0
    25. O 432 240 480 240 1
    26. o 13 64 0 34 5.339967589802275E-4 1.3349918974505689E-6 0 -1
    27. o 22 64 0 34 0.001220703125 9.765625E-5 1 -1
    28.  
    Secondly,
    Narrowing down the circuit to this:
    [​IMG]

    Can you tell me what will happen? I see that inverting input is almost stable at 2,5 V. Why?

    THANKS!

    btw, here is something i found that can be very useful: http://www.media.mit.edu/resenv/classes/MAS836/bias.pdf
     
    Last edited: Feb 1, 2010
  4. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Any oscillator requires positive feedback to work. Sometime it does this by using a phase shift. If an amp is an inverting amplifier (180°), and a phase shift component shifts only one frequency (another 180°), then the oscillator amplifies that one frequency (causing the oscillation) and ignores the rest.

    This oscillator is much simpler. A tank circuit is a high resistance at one frequency (resonance), and shorts out all other frequencies. That one frequency is fed into the positive input of the op amp, comes out the output much larger (but in phase), and is routed back to the positive input, like a dog chasing its tail. Random noise will get the process started.

    Feedback is core to all oscillators, and to amplifiers too for that matter. I suggest you research the word as it applies to electronics.

    The negative input on this design is divided (creating a voltage ½ the power supply voltage) and filtered. Basically a crud virtual ground. I've written about virtual grounds here...

    Creating a Virtual Power Supply Ground
     
  5. cebrax

    Thread Starter Member

    Jan 30, 2010
    26
    0
    Thanks! That helped me a lot. But the second circuit I posted. I am still lost :(
     
  6. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Think of the capacitor as a resistor, or reactance. I'd give you the formula for gain, but you left designations off (see what I mean about their importance?). I assume you are studying op amps, look up the formula yourself, and plug the capacitor reactance in instead of resistance.
     
  7. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
  8. cebrax

    Thread Starter Member

    Jan 30, 2010
    26
    0
    What do you mean by leaving designations off? Sorry I'm not a native speaker of English.. I looked it up in the dictionary but I don't get it. Can you give examples?
     
    Last edited: Feb 1, 2010
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Look at my schematic, then look at your schematic. If I mention R1, you know exactly what part I am talking about. Where is R1 on your schematic?
     
  10. cebrax

    Thread Starter Member

    Jan 30, 2010
    26
    0
    Ow, OK!

    Sorry for that. Let me redraw this:
    I know I want too much, but I couldn't. Can you help me with the calculations too?

    [​IMG]
     
  11. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    This circuit is a differentiator. Basically it is a type of high pass filter. The output is not on the inverting pin of the op amp as labeled, but the output of the op amp. The signal on the + input will be created on the - input, this is the nature of how op amps work.

    Just googling around I found this...

    http://www.wisc-online.com/objects/ViewObject.aspx?ID=SSE5203

    Gain is R2/Xc or R2/(2πFC1).

    In this case that isn't why they did it. The capacitor allows pin 2 to have a steady DC voltage, as well as the AC signal (both match the + input). Thinking about it, maybe your original circuit should work after all, if a capacitor was put in series with R3.
     
  12. cebrax

    Thread Starter Member

    Jan 30, 2010
    26
    0
    [​IMG]

    IMHO this circuit is not a differentiator. The input is given to non-inverting terminal. Plus, C1 is grounded. Since we assume that there is no current sink or source in the inverting terminal because of its very high impedance, this is a low-pass filter that has its input from the output of the OP-AMP, and its output given to inverting terminal of the OP-AMP.

    Vo=k.(Vni-Vi) ,Vni=Non-inverting input, Vi=Inverting input, k=open-loop gain
    Vo=k.(Vni-(Vo-Vr1))
    Vo=k.(Vni+Vr1-Vo)
    Vo=k.Vni+k.Vr1-kVo
    (k+1).Vo=k.(Vni+Vr) , k+1 is almost equal to k
    Vo=Vni+Vr
    Vni=Vo-Vr , where Vi+Vr=Vo
    Vni=Vi

    Then,

    Vr1=I1.R1 , where I1(or i1) is the current that passes thru R1
    i1=C1.(dvc/dt)
    i1=C1.(dVni/dt)

    Vinput(t)=Vni(t)=2,5 + 1,06 . sin( 2*pi*50*t) ,lets assume it like that
    or let's say:
    Vinput(t)=2,5 + sin(2*pi*50*t)

    How can I move on from here ? I can't solve it.

    From there, the capacitor will charge up, ok but after some point, it will be higher than the Vnon-inverting. And since the resistor is too high, it will discharge slowly, and that will make the output a square wave. So this square wave will be a saturated output so the parameters will change.
    The input signal and the square wave output of the OP-AMP will determine Vc1.

    I'm totally lost. Please help
     
  13. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    You right about it not being a differentiator. Sorry about that.

    Thing to remember is the signal on the - input will be the same as the signal on the + input, unless the op amp is saturating (clipping). With that assumption you should be able to figure out the rest of the numbers.

    [​IMG]
     
    Last edited: Feb 4, 2010
  14. cebrax

    Thread Starter Member

    Jan 30, 2010
    26
    0
    OK, I think I found it out.

    I have already found that Vni=Vi with the help of some equations.

    Actually the thing that makes inverting input same as non-inverting input is simply, the output of the OP-AMP.

    Think that we exchange C1 with a 150k resistor. The inverting input will be the same as non-inverting input. Where the output will be Vinverting+VR1.

    So back to the circuit WITH C1; output will try to make Vc1=Vnon-inverting.
    But, it will take more time than 50Hz period. Because of R1. Since R1 is so high, RC time constant will be longer than 50Hz period. So it will discharge and charge slowly, once it will charge to somewhere between Vp+ and Vp- of Vinput, it will be like it settled.It will change very little. So OP-AMP will start to work as a comparator, because the output will saturate and try to make it charge or discharge. However R1 won't allow it to discharge and charge quickly.

    But how do we calculate the point that it is something like it is settled?
     
  15. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    When you say settled, do you mean reaches maximum amplitude?

    If so the LC circuit tends to go as high as it can without distorting. If the sine wave is distorted it isn't a pure frequency. The LC circuit will only allow one frequency (a sine wave) to be on it.
     
  16. cebrax

    Thread Starter Member

    Jan 30, 2010
    26
    0
    No. If you change R1 with a smaller value, say, 330 Ohms. Then Vc1 will be same as the input signal, sine wave. But the current that makes Vc1 to go to some value, is from the output of the OP-AMP. And it is determined considering R1 too. So when R1 is small, capacitor can charge and discharge easily, so it will follow the input sine wave. When R1 is big,say 47k, capacitor will charge and discharge slowly, because of the current restrictions due R1.

    I want to calculate that value of Vc1. Vc1 will go like: 2,49V to 2,51 V. It will charge and discharge little.
     
  17. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I assume you are familiar with the concept of reactance? The capacitor in this context is a resistor, only it is referred to as reactance in this case.

    The gain of an inverting op amp using the + input is:

    G = 1 + (R2/R1)

    in this schematic...

    [​IMG]

    The capacitors reactance substitutes for R1 in this situation. By varying R2 or the cap you vary the total gain in the circuit. Follow?

    The signal on the + and = inputs will remain the same (if the op amp is not clipping). R3 provides the load for the signal source, it does not interact with the gain.
     
  18. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I think you are getting confused by the fact that there are two sets of parts in your original circuit. One is to allow the op amp to work with a single power supply. The other is the oscillator itself.

    Stripping the DC bias you would be left with this...

    [​IMG]

    Focus on this, then work on the DC bias networks.

    Just curious, am I helping or making things worse? Sometimes a different point of view can make a difference.
     
  19. cebrax

    Thread Starter Member

    Jan 30, 2010
    26
    0
    No man you are helping me a lot. Thanks for that =)

    Thinking of the capacitor as a resistor,reactance, it is a ~318 Ohm resistor.
    So op-amp will saturate, right? It is something like 30mV in the inverting input..
     
    Last edited: Feb 6, 2010
  20. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I suspect the op amp will clip the sine wave badly. Oddly enough the sine wave on the tank circuit will still look good, since it will reject the odd frequencies.

    Slight change in subject:
    Some op amps handle rail to rail signals poorly. FET input types have a problem with phase reversal (a form of clipping, but funkier).

    Normal BJT types don't have this problem.
     
Loading...