ltspice frequency analysis of RC divider?

Started by seedlings, December 05, 2013, 10:06:08 AM

Previous topic - Next topic

seedlings

How do you do a frequency response for this RC divider in ltspice?  I've tried this tutorial, with no success.  I know there has to be a voltage and/or current source, but... I don't know what I'm doing.

It should boost over 700Hz, boost over 3k a wee bit more, and cut out over 10k... but it would be nice to see a picture graph.



CHAD

samhay

Select a 'voltage' component from your components library; it looks like a circle with a + and -.
Right click and select 'advanced'.
Select the SINE function and then set the amplitude and freq - you don't need this for a frequency analysis, but is nice to be able to look at the waveform.
Set the AC Amplitude in the Small signal AC analysis (AC) box - 1V is nice here as it is 0db.
Exit.
Select Simulate/Edit Simulation Cmd from the top menu.
Select the AC Analysis tab and have a play with the settings
To run a simulation either select Simulate/Run from the top menu or click on the running man.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

seedlings

Quote from: samhay on December 05, 2013, 10:23:02 AM
Select a 'voltage' component from your components library; it looks like a circle with a + and -.
Right click and select 'advanced'.
Select the SINE function and then set the amplitude and freq - you don't need this for a frequency analysis, but is nice to be able to look at the waveform.
Set the AC Amplitude in the Small signal AC analysis (AC) box - 1V is nice here as it is 0db.
Exit.
Select Simulate/Edit Simulation Cmd from the top menu.
Select the AC Analysis tab and have a play with the settings
To run a simulation either select Simulate/Run from the top menu or click on the running man.

Great Scott!!!  You're genius is showing!

Thanks samhay  :icon_mrgreen:

CHAD

samhay

Don't confuse genius with over-familiarity.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

merlinb

If you want something a little more user friendly but almost as powerful, try Tina:
http://www.ti.com/tool/tina-ti

seedlings

#5
Quote from: samhay on December 05, 2013, 11:32:19 AM
Don't confuse genius with over-familiarity.

Aaahh... I am not over-familiar with genius, so consider it a reckless compliment.  And, it's a good thing, because what I drew up does nothing like what I thought it would.  That would have blown at least 2 hours on the breadboard switching components before I figured out that those first two resistors and capacitors are ~/magically/~ seen as just one filter.


Quote from: merlinb on December 05, 2013, 04:40:23 PM
If you want something a little more user friendly but almost as powerful, try Tina:
http://www.ti.com/tool/tina-ti

Oh no.  No, no, no.  :icon_evil: With much appreciation and gratitude, the last thing I need is more options.  [facepalm]

CHAD

MaxPower

#6
Nevermind
What lies behind us and what lies before us are tiny matters, compared to what lies within us - Emerson


tubegeek

Quote from: cctsim on December 07, 2013, 09:03:54 AM
I wrote a short tutorial about this a while back.

Actually, you wrote a short EXCELLENT tutorial, but you are too modest to say so. Thank you for that!
"The first four times, we figured it was an isolated incident." - Angry Pete

"(Chassis is not a magic garbage dump.)" - PRR

seedlings

Quote from: tubegeek on December 07, 2013, 08:25:06 PM
Quote from: cctsim on December 07, 2013, 09:03:54 AM
I wrote a short tutorial about this a while back.

Actually, you wrote a short EXCELLENT tutorial, but you are too modest to say so. Thank you for that!

+1

Tutorials abound. There is usually too little information, or one key element that is overlooked and/or not explained.  cctsim's tutorial is perfect.

Do you have other ltspice tutorials (like how to permanently upload/save a BS170 mosfet)?

CHAD

cctsim

I have a short transient analysis tutorial that I was planning to upload but never found the time to give it the final polish.

For the BS170 mosfet, the easiest way is to use the built in nmos model, change the name to BS170 and add in the schematic a .model directive.

For example for BS170 add (click .op icon on toolbar, select spice directive, and copy & paste the text below)

.model BS170 VDMOS( Vto=2.1 Ron=1.2 Kp=0.32 Cgs=12p Vds=60 mfg=Fairchild)

seedlings

Quote from: cctsim on December 08, 2013, 04:37:37 PM
I have a short transient analysis tutorial that I was planning to upload but never found the time to give it the final polish.

For the BS170 mosfet, the easiest way is to use the built in nmos model, change the name to BS170 and add in the schematic a .model directive.

For example for BS170 add (click .op icon on toolbar, select spice directive, and copy & paste the text below)

.model BS170 VDMOS( Vto=2.1 Ron=1.2 Kp=0.32 Cgs=12p Vds=60 mfg=Fairchild)

When I do that, the output of a SHO, at max gain, with a 200mV input, the output is 10uV (microvolts).




CHAD

cctsim

R2 and R3 should read 1Meg and not 1m.

1m means 1milli which is quite low. The input is effectively shorted.


seedlings

Quote from: cctsim on December 09, 2013, 11:59:49 AM
R2 and R3 should read 1Meg and not 1m.

1m means 1milli which is quite low. The input is effectively shorted.



"Meg" - that's good to know, and explains some other things.

However, something else is still wrong (green is input before cap, and blue is output after cap):



CHAD

cctsim

The way the MOSFET is labelled is also wrong. Look at the screen shot below:



seedlings

A-HA!  Thank you!

I admit that I don't understand why I had to put the values in these boxes.  What is Prefix, InstName, SpiceModel, Value,  Value2, SpiceLine, and SpiceLine2?  I put "M1" in the InstName because that made the symbol look like yours from the picture.



CHAD

cctsim

M is for mosfets
InstName is for numbering different mosfets M1, M2, M3, similar to resistors R1, R2, etc 
SpiceModel is the name of the transistor BS150
etc
The other parameters are optional.

seedlings

Quote from: cctsim on December 09, 2013, 12:50:07 PM
M is for mosfets
InstName is for numbering different mosfets M1, M2, M3, similar to resistors R1, R2, etc 
SpiceModel is the name of the transistor BS150
etc
The other parameters are optional.

Can't thank you enough, my friend.  This was a huge plateau for me to scale... errr... which is to say... for you forge the route, place climbing anchors, guide ropes, safety harnesses, and then pull me up the slope while I went 'weeee.'

Much gratitude!!!

:D :D :D

CHAD

tubegeek

I'd guess the Inst in InstName is short for "instance" - M1 would be the first instance of a MOSFET in the circuit, R2 would be the second instance of a resistor, like that.

"The first four times, we figured it was an isolated incident." - Angry Pete

"(Chassis is not a magic garbage dump.)" - PRR