1
\$\begingroup\$

I'm new to simulations on LTSpice with op amps (and LTSpice in general).

I've been trying to simulate a Sallen-Key low pass filter and the simulation is nowhere near my calculations plotted with \$Mathematica\$.

This is what I did: enter image description here

And this is what it yields: enter image description here

But http://sim.okawa-denshi.jp/en/OPstool.php simulator and also Mathematica yields this:

enter image description here

Which looks alright.

Thanks you in advance!

\$\endgroup\$
10
  • \$\begingroup\$ Perhaps you have the wrong transfer function for Mathematica? Not sure how we can troubleshoot this issue. I apologize for saying this but I don't think anyone here is going to be able to help you out because Mathematica costs money. \$\endgroup\$
    – user103380
    Jun 24, 2019 at 22:03
  • \$\begingroup\$ @KingDuken The point is not the graph on Mathematica, that is the correct one, I also checked it with the free simulator sim.okawa-denshi.jp/en/OPstool.php. \$\endgroup\$ Jun 24, 2019 at 22:07
  • 1
    \$\begingroup\$ do you mean 0.1 farad or 0.1 micro farad? \$\endgroup\$
    – Voltage Spike
    Jun 24, 2019 at 22:15
  • \$\begingroup\$ I used 0.1 F . . \$\endgroup\$ Jun 24, 2019 at 22:18
  • 1
    \$\begingroup\$ I see 2 problems: 1) V2 and V3 both appear to be positive voltages with respect to ground., 2) The output impedance of a 741, even closed loop, is more than the impedance of a 0.1F capacitor at frequencies above 1 Hz, maybe even lower (the impedance of a 0.1F capacitor is only 0.016 ohms at 100 Hz. Why are you using such weird values as 0.001 ohms and 10 F capacitors. Rescale your components to more practical values and redo the simulation. \$\endgroup\$
    – Barry
    Jun 24, 2019 at 22:33

2 Answers 2

1
\$\begingroup\$

First off. If you want the calculations to match up, then you need to use an ideal amplifier. The ideal amplifier in LT spice is found in the opamps folder, you need to add the spice line

.lib opamp.sub 

for lt spice to find the library for the part.

Then set the ideal opamp's open loop gain to something insanely high like

Aol=10000000K

and the gain bandwidth product to something insanely fast like:

GBW=10000Meg

The reason you need to use an ideal opamp is because filter tools assume that there are no losses and ideal opamps (unless they have a section to change the op amp). The GBWP and open loop gain create a pole, which hampers the opamp's ability to function at high frequencies

enter image description here

Secondly, your not using the same numbers in each of the tools:

enter image description here

and here are my numbers...

enter image description here

it looks like the graphs match up to me. But only up until about 100kHz where the amplifier starts to make a difference again.

It would be extremely hard to build a filter with the values you have chosen for components. Traces and wires have miliohms of resistance, so choose values that are not in that range, otherwise you wouldn't be able to bulid this circuit. Caps in the farad range are also undesirable because they are bulky and expensive.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks you! I thought the LM741 was good enough \$\endgroup\$ Jun 24, 2019 at 22:47
  • \$\begingroup\$ It probably is, but it depends on how much stop band you need. What are you feeding Vout into? \$\endgroup\$
    – Voltage Spike
    Jun 24, 2019 at 22:48
  • \$\begingroup\$ Into nothing, I'm just learning about op amps and simulations \$\endgroup\$ Jun 24, 2019 at 22:49
1
\$\begingroup\$

Your resistor and capacitor values insanely wrong for a real circuit. You need to change them by a factor of 1,000,000 or more (up for the resistors, down for the caps -- you want to maintain the same R*C product). Try 1k\$\Omega\$ resistors and 0.1 and 10 \$\mu\$F caps. For a real circuit, you'd probably go up another order of magnitude on the resistors and down on the caps.

Edit: Every case is different, but for most normal use cases choosing a center R value of 5000\$\Omega\$ is a good starting point. You can go lower if it's a power op-amp, you have to go higher if it's a "low power" op-amp.

When and why gets complicated (there's issues of bandwidth and noise when you get too high, issues of the amplifier being able to drive its own feedback network if you get too low). If you don't know -- 2k to 10k!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.