1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

LTSpice sine wave out of voltage source [solved]

Discussion in 'Homework Help' started by Mihai1396, Oct 11, 2016.

  1. Mihai1396

    Mihai1396 New Member

    Joined:
    Oct 11, 2016
    Messages:
    2
    Likes:
    0
    Hello,

    I tried to modify my .tran command so it would simulate more quickly a more advanced circuit. Using .tran 0 2m 1u 100n uic on a small design and got this. (click "this" for picture).
    Anyone knows why is this happening?

    Thank you!

    Edit1: Probes placed on the wires that are not connected to anything.
     

    Attached Files:

  2. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,325
    Likes:
    1,231
    Location:
    Cardiff, Wales
    Welcome to ETO!
    We're not psychic. Please post your .asc file, using the 'Upload a file' button.
     
    • Agree Agree x 1
  3. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,370
    Likes:
    974
    Location:
    Loveland, CO USA
    I was going to say I am psychic, but I don't see what the problem is?
    I get the top voltage at +7.5V, the bottom voltage at -7.5V.
    Are you looking at node3 on the (+) of the opamp?
    upload_2016-10-11_9-26-44.png
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,139
    Likes:
    566
    Location:
    AZ 86334

    Garbage In, Garbage Out

    If you let LTSpice do the work, instead of circumventing its built-in "artificial intelligence", then you will see that the circuit you drew has a stability problem. If had read the Help File, you would have learned that it is a bad idea to force an outcome by using the "uic" directive, because that usually causes un-natural results.

    It is better to let LTSpice do an initial conditions solution, either explicitly as a .OP solution, or implicitly as part of a .TRAN solution. .uic specifically screws with that...

    Here is the .OP solution. I purposely unbalanced the R1 R2 voltage divider +-1% to show the effect. Note that the opamp really does create a buffered "rail splitter". I labelled the nodes so we can see what is what. Read the Help File about what the .OP sim actually does.

    d2a.jpg

    Now, do a .TRAN sim to see what happens in the time domain as the circuit is "released" from the values found in the .OP run, above. Note that the circuit breaks into oscillation because of the attributes of the OP07 (primarily GBW). You can see the behavior after only a few us; you where simulating for thousands of cycles of the oscillation. No wonder it took lots of cpu cycles before finishing the sim. Mine runs in less than 1s.

    d2b.jpg

    So, how do you stabilize it? Without doing a detailed analysis, I fall back on experience. Adding bypass cap(s) to either or both rails, which you would see in a "real" application of this circuit does it:

    D2c.jpg
     
    • Like Like x 1
  6. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,139
    Likes:
    566
    Location:
    AZ 86334
    Interesting that mine oscillated, and Ron's did not. Here are the Spice settings for my sims...

    d2set.jpg
     
  7. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,370
    Likes:
    974
    Location:
    Loveland, CO USA
    My "Max Threads" only allows 1 or 2. I have not updated in 85 days.
    I see uV of noise/oscillation but not volts.
    Your oscillation is near 1mhz so that is probably at the top end for the amp. I think a capacitor almost anywhere will help.

    I made one of these in real life (if there is such a thing). I connected a capacitor from V+ to gnd and from gnd to V-. (audio project and needed a +/- supply with a center point)
     
  8. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,139
    Likes:
    566
    Location:
    AZ 86334
    I am running on a 64bit quad-core processor.
     
  9. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,139
    Likes:
    566
    Location:
    AZ 86334
  10. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,370
    Likes:
    974
    Location:
    Loveland, CO USA
    Thanks for the link. I have used the National/TI "rail splitter". Low power but often you only need mAs (long term) and high current short term. So add capacitors.
     
  11. Mihai1396

    Mihai1396 New Member

    Joined:
    Oct 11, 2016
    Messages:
    2
    Likes:
    0
    @MikeMI thank you very much for your answer. There was a capacitor on the design I copied but I choose not to include it because I could not understand its purpose.
     
  12. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,139
    Likes:
    566
    Location:
    AZ 86334
    Even with the bypass, the circuit is only marginally stable (on the verge of oscillating, or damped oscillation). A more detailed analysis to prove stability under varying loads is in order. My guess, the OP07 is not the best opamp for this application...
     

Share This Page