Does anybody know how to design low pass filters using LtSpice

Discussion in 'Homework Help' started by hunterage2000, Mar 29, 2011.

  1. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
    I have setup the diagram for a 2nd order Butterworth low pass filter with

    R1 = 1 x 1.422kΩ​
    R2 = 1 x 5.399kΩ​
    R3 = open circuited​
    R4 = short circuited​
    C = 0.1μf​
    C1 = 0.033μF​

    But not sure what to do from here. I want to see the magnitude and phase response on a bode plot.
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    You need an AC signal source and you want to do an "AC Analysis"
     
  3. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
    So what would I put for type of sweep, no of points, start and stop frequency? The only info I have is the above info and the cutoff frequency is 1000hz also what signal source would I use.
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    Start with a linear sweep
    Figure on 500 points
    Start @ 0.1 Hz and go up to 100 kHz, that pretty much brackets the cutoff frequency of 1000 Hz.
    You would use an AC signal source with let us say 1 VP-P
    How would you do it in the lab??!!
     
  5. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
    what is 1 VP-P? are you experienced with Ltspice because I get an error message saying

    Unknown subcircuit called in:
    xu1 n002 n004 n002 opamp aol =100k gbw=10meg

    To be honest with you we've had no lab experience with this and only know dc circuits.
     
  6. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    1 VP-P describes an AC waveform that is 1 volt peak to peak. If you imagine that this waveform is symmetrical about AC Ground then the positive peak would occur at +500 mV and the negative peak would be at -500 mV. So if you subtract the negative value from the positive value you get:
    Code ( (Unknown Language)):
    1.  
    2. +500 mv - (-500 mV) = 500 mV + 500 mV = 1 Volt
    3.  
    That's 1 Volt Peak to Peak. This could also be described a 0.707 Volts RMS(Root Mean Square)

    I am experienced in LTSpice. The error you are getting is because you have no model for the opAmp. You need to read the help files for info on using models and subcircuits.

    You would be well advised to find the Yahoo group for LTSpice.
     
  7. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
    not sure about the model, the attached jpeg is the instructions we got for it. Can you advise on how I pick an appropriate model?
     
  8. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,644
    759
    Without looking outside, LT Spice comes with a bunch of op amps (from LT, of course) which you could use.
    Make sure that you feed them with a dual rail supply.

    If you need to go further on active filters design, Filterlab from Microchip (free download) is good and simple to use.

    At this stage of your learning keep LTSpice for simulation / testing.
     
    Last edited: Mar 29, 2011
  9. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    No..no...no. LTSPICE needs a "model" file in order to simulate the operational amplifier. You could also use one of the ones that it already provides. You have to read the LTSPICE help files to learn how to connect the opAmp symbol to the information required for simulation.
     
  10. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    Here is a sample model file
     
  11. NISM1906

    New Member

    Dec 27, 2010
    3
    0
    @hunterage - All generic op-amps need a model. I have attached a small tutorial that I got from the LTSpice user forum (yahoo group). This works like a charm as I have used it. As a matter a fact, it has an LM339 comparator model in the file (text file). Hope this works for you.

    Now as for the bode plot - in order to get the information you require, you will need to hook up an "AC" voltage source to the input. The value of the voltage that you assign "MUST" be changed under the AC section for the voltage supply (right click on the voltage source and find the section that says "Small Signal AC analysis(.AC)" and enter a value of 1V for amplitude and then close it.) Now you have an AC source; next you will need a transient command (or .AC analysis command) and this is done by starting a new simulation or selecting the current simulation (NOTE: most of the time, if you right-click on an item it will give you the settings for it) and then select the "AC Analysis" Tab and from there it should be rather intuitive. Let me know if you have questions and I will try and respond.

    Regards,
     
  12. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    If you want to use the generic op amp model, without any power supplies, you can do it like this. Copy and paste the .ASC file to your folder that contains the file you are trying to simulate.

    Note that you had your capacitors swapped.
     
  13. SteveM99

    New Member

    Feb 10, 2011
    10
    0
    Hi Folks,
    I'm new to LTSpice and would appreciate your help. I downloaded Ron's attached .asc file and substituted the LT1001 opamp and connected it to +/- 15vdc power. None of the opamp settings have been changed (default).

    When I run the Simulation, no output appears from the opamp on the simulation screen... the output screen is blank. The x-axis is labeled with the Freq. Sweep range (10Hz to 1MEG Hz).

    The Y-Axis is blank (no labels or values). Expected to see the dB scale like in Ron's image.

    Not sure what I'm doing wrong at this point and have no one else to ask.

    Appreciate any info, thanks.
     
    Last edited: Aug 12, 2011
  14. SteveM99

    New Member

    Feb 10, 2011
    10
    0
    I re-installed LTSpice and re-ran the same Simulation without any changes and it worked correctly.... I don't have an answer. :confused: Is LTSpice a little unstable?

    [Lurking Mode][Back ON] :D
     
  15. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Your resistor and capacitor values are all over the place.
    Most Sallen and Key Butterworth lowpass filters use an opamp with a gain of 1 and equal value resistors. The value of the feedback capacitor is simply double the value of the capacitor to ground.

    If the opamp is set for a gain of about 1.6 then the capacitor values can be equal.
     
  16. SteveM99

    New Member

    Feb 10, 2011
    10
    0
    I downloaded Ron H.'s attached file as a demo to try to learn about this type of filter and LTSpice at the same time. The values you mention are his, I'm a novice at this stuff and appreciate your input.

    Thanks.
     
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    I picked the values in my schematic off your schematic in post #1. I swapped the capacitor values to make the filter work.
     
Loading...