| FORUM

FEDEVEL
Platform forum

Lesson 9 - 3rd Order Butterworth LTSpice simulation

Ant1882 , 02-02-2022, 08:44 AM
Hello,

Just working my way through the course, onto lesson 9 using LTSpice. When trying to simulate the 3rd order Butterworth filter with Fc = 25kHz I got the following:



If I then switch to using an ideal op-amp I get the following, which agrees with the filter calculation tools:


This was done based on the suggestion from here: https://electronics.stackexchange.co...len-key-filter

Is this a quirk of LTSpice, or is the first simulation showing us something more "real-life" than the ideal calculations? In which case we may need to alter component values or op-amps for a better result. I'm new to LTSpice simulations, maybe it is the case we need to use ideal op-amps to gain sensible results. Can anyone comment on this?

Thanks, also great course!

Anthony
SauceBoss , 02-03-2022, 02:25 PM
I would try to use smaller resistance and larger capacitances as that will lower the noise. In this example you have overall around 41k of series resistance, that's an awful lot (but keeps the capacitances small). Personally I wouldn't go over 5k in series resistance. Try doing noise simulation and then reduce resistances by tenfold (you will need to up capacitances by the same amount) and then run sim on noise

Side note: have you provided DC bias since you operate on single power supply? It can be done in voltage source settings.
AlexanderBrevig , 02-02-2022, 09:32 AM
Seems like the AD820 needs at least 5 volts according to the datasheet. Maybe try a 6v rail? ☺
Ant1882 , 02-02-2022, 09:57 AM
Originally posted by AlexanderBrevig
Seems like the AD820 needs at least 5 volts according to the datasheet. Maybe try a 6v rail? ☺
Just tried, got the same unwanted output ha ha. Thanks for the suggestion though!
AlexanderBrevig , 02-02-2022, 10:15 AM
It also says it needs a load. You can see Rload in the datasheet. Try adding a resistor to ground, seems to want to be loaded.

You can always expect real components to deviate from theory, but not so much you're seeing. Let us know when you get better results
Ant1882 , 02-02-2022, 10:41 AM
Originally posted by AlexanderBrevig
It also says it needs a load. You can see Rload in the datasheet. Try adding a resistor to ground, seems to want to be loaded.

You can always expect real components to deviate from theory, but not so much you're seeing. Let us know when you get better results

SauceBoss , 02-03-2022, 02:25 PM
I would try to use smaller resistance and larger capacitances as that will lower the noise. In this example you have overall around 41k of series resistance, that's an awful lot (but keeps the capacitances small). Personally I wouldn't go over 5k in series resistance. Try doing noise simulation and then reduce resistances by tenfold (you will need to up capacitances by the same amount) and then run sim on noise

Side note: have you provided DC bias since you operate on single power supply? It can be done in voltage source settings.
Ant1882 , 02-06-2022, 07:53 AM
Originally posted by SauceBoss
I would try to use smaller resistance and larger capacitances as that will lower the noise. In this example you have overall around 41k of series resistance, that's an awful lot (but keeps the capacitances small). Personally I wouldn't go over 5k in series resistance. Try doing noise simulation and then reduce resistances by tenfold (you will need to up capacitances by the same amount) and then run sim on noise
Ant1882 , 02-06-2022, 08:50 AM
I also ran the noise simulations as you suggested, and the lower resistor values gave better results, changed C1 and C4 to 10 nF, and the 3 inline resistors all divided by 10.

Before:


And after lowering the series resistor values:



Thanks!

Ant
SauceBoss , 02-06-2022, 09:03 AM
DC BIAS - why I need it?

If you think about AC signal by definition it is (or at least should be) with zero bias. So if you have a voltage source giving you 1V out, then it will actually be +0.5V to -0.5V range. You can say it's symmetrical in regards to GND potential. So it hasn't any DC BIAS.



If you input that signal to a single supply powered amplification stage you won't be able to go below 0V, so effectively you lose the bottom half of your signal. If you want this signal to be amplified properly, then you need to FIT IT INSIDE POWER SUPPLY VOLTAGE. And since your amplifier has a power supply of +15v to 0V (GND) then you need to shift the AC signal with positive DC Voltage. If you do a standard 1/2 VCC bias then your 1V AC will "RIDE" on a potential of 7,5V DC. When looking at the transient plot it will go up on Y-axis by 7,5V. It will be amplified properly, and you are in the clear.



How to introduce DC bias?

In LTSpice you can just define that in voltage source properties, so that's easy. In real-world, the easiest way is via a voltage divider. You need to remember that in this case any noise/interference on your voltage rail (15V rail) will be introduced into your signal divided by whatever your voltage divider ratio is.



If you want to have a better DC bias source, you can do as @phils-lab did in this course. You use an opamp as a follower after voltage divider. It allows you to set up a filter on BIAS voltage limiting the possibility of introducing noise/interference this way into the signal. Here is a simple first-order filter and opamp follower as an example. You could add another stage calculated to be around 100kHz and place close to the opamp input (opamp for this needs to be unity-gain stable!).



Side notes:
  • Why bias at half power supply? 1/2VCC bias gives you the best headroom for both halves of your AC signal. You can swing 7,5V upwards and -7,5V downwards. As long as you don't go over, or under power supply (minus some saturation voltage of your amplifier, so effectively it's gonna be less than 7,5V either way).
  • Usually, in audio, we go for AC coupled signals with symmetrical power supplies, so there is no need to use DC bias in the signal chain.

Audio filters - big resistance, or big capacitance?

The question is determined between parts availability/noise/amplifier loading. When doing a filter (not only audio) you need to balance those factors to get the result best suited to your needs.

Some bullet points (for analog audio signal chain):
  • Lowering resistances will result in lower noise.
  • Lowering resistances will increase loading on previous stages amplifier, perhaps increasing its distortion, or straight up overloading it.
  • Big capacitances are more expensive and use up more space.
  • Capacitance size determines what capacitor size you need to use. If you are in the range of 100pF to 100s of nF you will use NP0 or C0G dielectric caps. Their capacitance is stable in relation to voltage on the capacitor (unlike X7R and others). You can also use film caps, but they are much much bigger.
  • In extreme cases, you might need something on the order of several uF and more. Then you need electrolytic capacitors. When you use them it's recommended to go for nonpolar ones. You will usually use them in AC coupling. Remember that any AC voltage on electrolytic cap will significantly raise its distortion. Go at least ten-fold in value over what is recommended. Electrolytic caps shouldn't be used in filters other than AC coupling.
  • If you really need to use a big capacitance, but can't (or shouldn't) use electrolytic go for foil caps, or parallel smaller ceramics.
  • Paralleling caps is great as it helps to achieve lower parts tolerances, which you want for filters.
So the takeaway is to go as low with resistance as it is allowed by available capacitance that you can introduce, and by previous stages drive capability (which is usually 600 Ohm - 2k and up).


Ant1882 , 02-07-2022, 07:06 AM
That's brilliant, thanks for taking the time to explain... it's much appreciated, and makes a lot of sense.

Ant
Use our interactive Discord forum to reply or ask new questions.

Didn't find what you were looking for?