triangular wave using lt spice help

Discussion in 'The Projects Forum' started by syaf921, Dec 13, 2014.

  1. syaf921

    Thread Starter New Member

    Dec 21, 2012
    18
    0
    I need it to oscillates at 20kHz. How i can get that?
    And why Vcc need to be -10v? I have changed the value but the output is different.
    Also why in the transient section of the edit simulation command, i need to check the "skip initial operating point solution".

    This is the cct.
     
    Last edited: Dec 13, 2014
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Try this:
    08.gif

    I cleaned up your drafting so I could follow what you were trying to do. This will only work as simulated if you buy some modern, CMOS, rail-to-rail opamps, because its frequency depends on the square output reaching the rails.

    To get it to oscillate, I had to create a slight initial perturbation with the statement .ic V(tri)=1mV. Dont use UIC, ever! Here is what the LTSpice Help file says about UIC.

    uic.gif
     
    Last edited: Dec 13, 2014
  3. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    You just needed to change R1 to 2k2 to get 20kHz.
    Vcc was -10V because you had the V1 +ve terminal grounded.
    Here's a redrawn version with V1 and V2 moved, so that the schematic is less cluttered.
     
  4. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    Here's Alec's circuit further modified to operate from a single supply by using a pseudo-ground at 1/2 the supply voltage to the op amp inputs that were previously grounded.

    Note that you need to use .uic or "Start external supply at 0V" to start the oscillations. Otherwise the circuit does a DC analysis when puts the circuit into a quasi-stable state with no oscillation and there is not the normal real circuit noise to initiate the oscillation.
    Alternately you can perturb the circuit with an initial .ic command as Mike suggested, to start the oscillation.

    TriangleMod2.gif
     
  5. syaf921

    Thread Starter New Member

    Dec 21, 2012
    18
    0
    How did u get R1=2.2k, can you show me the calculation?
     
  6. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I didn't. I changed all the resistors to more reasonable values (considering the currents that real opamps can source and sink).

    There are four things to consider. The peak to peak value of the square wave, the trip point(s) of the Schmitt Trigger, the value of R1 and C1.
     
  7. syaf921

    Thread Starter New Member

    Dec 21, 2012
    18
    0
  8. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I copy the LTSpice screen image to clipboard using Alt-PrtScn, paste it to IrfanView, crop the excess, and save it to a .gif Then I post the .gif here.
     
  9. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    I didn't calculate it. I just tried it in the sim. That's what sims are for ;). Just play with values and let LTS do the calculations.
    I use the same method as Mike (albeit with a different graphics program) to post sim results here.
     
Loading...