Circuit analysis with C, D, R and NMOS

Discussion in 'Homework Help' started by PsySc0rpi0n, Oct 1, 2015.

  1. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    I have a new circuit to analyse and I wanted to know if is there any way of simulate 3 different frequencies on the same plot.

    The asc file is attached! Also a printscreens was added!
    The desired frequencies are 10Hz, 100Hz and 1000Hz.
     
  2. dannyf

    Well-Known Member

    Sep 13, 2015
    1,825
    364
    The frequency only comes into play if the period is materially comparable to the rc time constant.
     
  3. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    This is a simple RC discharge circuit. You hardly need a simulator to solve it. If it were a practical circuit, why wouldn't you make the RC product much, much bigger, like 1megΩ and 1uF.

    To answer the question of how I would use LTSpice to make plots (if for example, I wanted plots to paste into my notebook), here is what I would do:

    1. Create a new parameter, f = frequency in Hz: .param f=10
    2. Modify the pulse gen V1 to automatically parameterize the pulse width expression Ton: {0.5/f-2u}
    and the period expression {1/f}. Also change the sim directive to .tran {5/f}
    3. Run the sim with f=10
    4. Plot whatever you are interested in.
    5. Change f=100, rerun
    5. Change f=1K, rerun

    Note that now, changing just one parameter {f} automatically reconfigures the simulator for each new frequency. Anything inside {} curly braces is computed before the simulator runs. It is like a mini programming language.

    If you were thinking that the secret to this analysis had something to do with .AC or frequency sweeps, remember that is only for "linear" circuits, where the excitation is sinosoidal (not a varying pulse frequency).

    2c.gif

    To run the three simulations sequentially so that you can overlay the circuit behavior on one plot, add the directive
    .step dec param f 10 1K 1 That will run five cycles of each frequency before allowing you to plot. You will find the plot confusing, however, so I recommend doing it as I suggested above.
     
    Last edited: Oct 1, 2015
    PsySc0rpi0n likes this.
  4. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    Ok, I just need to ask 2 questions about those parameters!

    I didn't understood the .trans 5/f directive! Is that to allow five cycles? If I have chosen like 7 or 2, that would only plot 7 or 2 cycles respectively?

    And the other question is when we use the parameter {0.5/f-2u} to set the duty cycle to 50%, on some calculators if we use that expression, they will calculate first 0.5/f and only then it will do the -2u part of the expression! Does LTSpice handles that correctly?
     
  5. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Yes, the expression {5/f} is evaluated before the simulation is run, and is substituted into the .TRAN directive. Remember that Period=1/f, so 5/f is five periods.

    Yes, division and multiplication is done before addition and subtraction. It is in the Help file... You can add () if you wish to make the order of operations explicit.
     
    PsySc0rpi0n likes this.
  6. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    Ok, thanks...

    Tomorrow I'll go into the analytic analysis! I need to show some calcs to the teacher about this circuit!

    So I think I need to calculate Vripple, Vc and probably Vds and Id... At least these ones!
     
    Last edited: Oct 1, 2015
  7. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    Morning guys...

    I have done part of this problem. But now I need to find Vds and Id for the circuit. The problem is that I don't know the K parameter in the datasheet. Is it supposed to be there? Can I solve the problem without K parameter?
     
  8. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    Morning Psy,
    Which K parameter in the data sheet, I do not see it in the BS170 d/s.?
    E
     
  9. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,960
    1,097
    This one
    [​IMG]

    Psy, K parameter want help you much because your MOSFET work in triode region. So you need Rds(on). Also K parameter has a wide spreader from transistor to transistor, even if they have the same part number. And this equation Id = K*(Vgs - Vt)^2 is just a first order approximation (ideal mosfet).
     
    Last edited: Oct 4, 2015
    ericgibbs likes this.
  10. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    I think I found a way of getting what I need without the K parameter... I assume that the FET is at triode region, find Id knowing that Vds = 0V in saturation, then with the help of the datasheet figures, I'll find if the assumption is correct or not and explain all this to the teacher!
     
Loading...