Viewing waveform output in LTSpice?

Discussion in 'General Electronics Chat' started by Teknolog, Dec 6, 2013.

  1. Teknolog

    Thread Starter Member

    Sep 1, 2013
    31
    0
    I have created a circuit using LTspice. It's a circuit that contains a NE555 chip and a 9V DC voltage source. I have built a circuit where the 555 is supposed give an output AC voltage.

    My question is for LTspice. What kind of Simulation should I do in order to view the output waveform, in a similar way as an oscilloscope?
     
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Have you run a simulation of the circuit?
    If so, just point to a wire node, and LTSpice will display the voltage waveform at that node. Move the cursor over a component or a pin, and it will show the current that flows into/out-of that pin.

    Here is an example...
     
    Last edited: Dec 6, 2013
  3. adam555

    Active Member

    Aug 17, 2013
    858
    39
    I would do a transient for the time fraction you want to see: for example:

    .tran 1s
    .tran 1m
    etc

    or with LTSpice just click "run" and then type "1s" or whatever in the first textbox ("stop time") of the transient tab.
     
    Last edited: Dec 6, 2013
  4. adam555

    Active Member

    Aug 17, 2013
    858
    39
    Then do what MikeML advised.
     
  5. Teknolog

    Thread Starter Member

    Sep 1, 2013
    31
    0
    Thanks. I tried the transient analysis, and I saw the output waveform as I wanted. :)

    I have two more questions:

    1. How do I view what frequency the waveform has?

    2. Is it possible to do "live" simulations? Like for example if I have a potentiometer in the circuit which I change the value of, if it's possible to see how the voltage waveform is changing simultaneously with the changing of the potentiometer? (Like an oscilloscope)
     
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,764
    1,099
    Click and drag the cursor between two points on the waveform 1 cycle apart. The status bar at the foot of the screen displays the interval and corresponding frequency.
    Yes, using a voltage-controlled resistor model, or a behavioral voltage source, for example.
     
    absf likes this.
  7. Teknolog

    Thread Starter Member

    Sep 1, 2013
    31
    0
    Isn't there some way to show the frequency automatically? So that I can also immidietly view how the frequency is changing - live - when for example adjusting a voltage-controlled resistor model like you suggested.
     
    Last edited: Dec 7, 2013
  8. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,764
    1,099
    I expect there's some clever way using a behavioral voltage source, but I've never tried. Someone else may know the answer.
     
  9. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    No Spice-derived simulator that I am aware of can do that, because you end up doing a new .tran sim for each new value of whatever you are changing.
    The problem is that the independent variable is the value of something you want to tweak, and the frequency is not apparent until after a waveform is generated.

    You can, however, automate stepping of the value of a resistor or capacitor to see what effect it has on the frequency of an oscillator, for example.

    Suppose you want to know what value of resistor would set the frequency of a 555 oscillator to 100Hz. Here I have made the value of R2 to {T}, where T is just a variable, like in an equation. The statement
    .step param T 90K 110K 5K will step through five different simulations, where T=90K, 95K, 100K, 105K and 110K to see which value of R2 would make the oscillator run nearest 100Hz. Putting T in {curly braces} on the schematic means that a new value of T is used for each sim run.

    Each susequent sim run is plotted using a new color (waveform display setup item). Using the two cursors on the Plot Pane, it is easy to see that the blue waveform (where R2 is 100K) is the one that produces the frequency closest to 100Hz.
     
    • DF47.jpg
      DF47.jpg
      File size:
      281.9 KB
      Views:
      77
    absf likes this.
Loading...