terminology (newbie question)

Discussion in 'General Electronics Chat' started by NY10, Aug 9, 2010.

  1. NY10

    Thread Starter Member

    Jul 30, 2010
    47
    0
    Hi, all

    I have a few questions regarding the terminology.

    When I tried to simulate the circuit that I created, there were many options such as Parametric sweeps, transient, and ac.

    Can anyone goes over what these are in very detail ?

    Thank you very much.
     
  2. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    I assume you are talking about SPICE. I don't use SPICE much, but here are some starting points:

    Parametic sweep: Vary a parameter and simulate at these values.
    Transient: Simulate over time.
    AC: Simulate over frequency.
     
    NY10 likes this.
  3. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    Transient Sweep is the standard for simulations.

    You tell it how long you want the circuit to run and specify if you want it to start with Voltage sources turned off and other condition.

    Then you press run (sense of humor in LTSPICE that the icon is a running man).

    If gives you a plot screen and when you mouse over the schematic you get voltage probes or a current clamp for a curser. You can measure voltages on nodes, or currents through component pins. They will show up like oscilloscope traces in the plot pane.

    Master the transient sweep first.

    The next one that you can look at is the the AC response. This is useful for showing a calculated frequency response with phase angle.

    With DC sweeps you can do things like plot the base and collector current relationships of a transistor.

    The best way to find this stuff out is to look at what other people have done. If you haven't found many or any places where sample of interesting Simulations are posted, here is a Yahoo Group where you can start looking. Their files are full of simulations and by the time you master everything they show there, you will have a whole new level of questions to ask.

    As an example let me attach this LTSPICE file that made its way to that group by way of ON SEMICONDUCTORS and some pictures.
    [​IMG][​IMG]

    NOTE THAT YOU WILL NEED TO OPEN THE LIB.TXT FILE IN NOTEPAD AND SAVE IT AS TIP41C.LIB THEN SAVE THE SCHEMATIC IN THE SAME FOLDER.
     
    tom66, NY10 and kingdano like this.
  4. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    In case you were wondering, you only need to right click on the Plot pane to find the option to add another plot pane which is how you get a split screen like I used here so that two signals at very different levels can both be seen with some detail.

    Click on any plot pane before taking a measurement to select where you want to see that measurement.

    Most things are very simple but it is so powerful a tool that you will tend to assume things are going to be complicated. It can almost get scary addictive once you are well started.
     
    NY10 likes this.
  5. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    On this theme of interest in what you can do with LTSpice, here is a way to compare two (simulated) transistors side by side.

    Here it is set up with the matching voltages set up with a -1 multiplier so that you can compare complementary pairs of NPN and PNP.

    Try changing the transistors to 2N3904 and 2N3906 for another comparison.

    Change back and you can see that the PNP 2n2907 has about 15% higher gain than the 2N2222. (They were not meant to be a complementary pair.)

    Increase the PNP base resistor to around 1100 Ohms or 1200 Ohms and see the collector currents start to match better.

    If you just want to see two NPN then make the multiplier on the controlled voltages 1.

    You can also change the sweep parameters replace the BJT models and look at other transistor types like Mosfets.
     
    Last edited: Aug 14, 2010
  6. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    Here are pictures of the Schematics and the Sweeps in case anybody hasn't installed LTSpice. A Free Sim program of LTSpice quality, if you have something better that you use - let me know.

    When you look at the traces notice that I edited the PNP collector current. I told LTSpice that I would like to see it as -Ic(Q2). All I had to do is right-click on the Ic(Q2) label in the plot window and add the minus sign - in front of the Ic(Q2) parameter. Otherwise the two transistor currents appear as mirror images either side of zero current. This simple edit lets you compare them more easily.

    [​IMG][​IMG]
     
    Last edited: Aug 14, 2010
    tom66 likes this.
  7. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    I suggested this as something you try but I will show you an example.

    Here I am actually comparing the same NMOS current sinking - high on resistance type transistor under different source voltages.

    In the compare circuit I set the voltage multiplier at .5 and in the plot pane you can see that this makes the voltage applied to the drain that I swept from 0 to 50 Volts, only sweep from 0 to 25 Volts in the right hand circuit.

    Look at the plot and it might help you understand how the voltage on the drain changes the turn on characteristics for a Mosfet.

    [​IMG][​IMG]
     
    Last edited: Aug 14, 2010
    tom66 likes this.
  8. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    I should probably stop until I see if anyone really does find these tips on using LTSpice useful.

    One final thing that I think you will want to use.

    [​IMG]

    This is just a sweep with 10 Volts on the gate for the same NMOS as above.

    What is interesting is that LTSPICE is quite happy to give you a plot of Watts of Power and all you have to do is multiply your voltage by your current.

    Dead simple.

    Useful if you are trying to design your own switcher. Especially since you can turn that plot into an average power rating just by telling it to integrate. (You can't integrate a sweep.) Get a complicated noisy transient sweep wave form and just ctrl left click the sweep expression tag. RMS and average values pop up in a small dialog box. Easy.

    For this image I want to make one more point. LTSPICE is just a computer program. It can help you make or avoid mistakes if you let it. This plot I have pictured is the kind of visual that would be helpful when you were looking to check where your operating point should be for power handling.

    Checking the Datasheet for the BSS145 trasistor will tell you that this transistor is a small signal switcher that only handles .36 watts.
    It would be a good idea to use a larger than 470Ω resistor with it.
     
    tom66 likes this.
  9. Ghar

    Active Member

    Mar 8, 2010
    655
    72
    LTSpice lets you plot power by holding alt and clicking on a device.
    I was pretty mad at it for a few weeks before I discovered that shortcut.
     
  10. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    :D
    That is even easier, and I am not surprised to find out there was an even easier way.

    Thanks for letting me know, because knowing a way that worked I was happy enough.
     
  11. Potato Pudding

    Well-Known Member

    Jun 11, 2010
    684
    92
    The OP asked about the different types of simulations.

    I haven't shown the AC Frequency response before. It is probably too advanced for anybody new to electronics and simulations, and a simulation is only helpful if you understand the related details of how the circuit works.

    Here is a Bandblock or Bandreject filter circuit with plotted frequency response.
    I also have a small demo of cursor use and the cursor dialog.
    I apologize to dial up users and hope the download is worth it for them.
    [​IMG]
     
Loading...