Announcement

Collapse
No announcement yet.

Lesson 9 - 3rd Order Butterworth LTSpice simulation

Collapse
This topic has been answered.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lesson 9 - 3rd Order Butterworth LTSpice simulation

    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:

    Click image for larger version

Name:	AD_820_OP_AMP.png
Views:	167
Size:	80.8 KB
ID:	19068

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

    Click image for larger version

Name:	Ideal_OP_AMP.png
Views:	158
Size:	80.2 KB
ID:	19069
    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
  • Answer selected by Ant1882 at 02-06-2022, 06:55 AM.

    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.

    Comment


    • #2
      Seems like the AD820 needs at least 5 volts according to the datasheet. Maybe try a 6v rail? ☺

      Comment


      • #3
        Originally posted by AlexanderBrevig View Post
        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!

        Comment


        • #4
          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

          Comment


          • #5
            Originally posted by AlexanderBrevig View Post
            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
            Thanks, slightly better results than before with 100k load added and voltage upped a bit, the cut-off frequency is still lower than expected though at around 4 kHz...
            Click image for larger version

Name:	ad_820_100k_load.png
Views:	137
Size:	87.3 KB
ID:	19074

            Comment


            • #6
              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.

              Comment


              • #7
                Originally posted by SauceBoss View Post
                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.
                I had no DC bias, I changed this to just be 1... the results are now as I expected. Thank you! So some DC bias is important when operating with a single supply? I'm new to a lot of this kind of design work... as Richard Feynman once said, I feel like an ape trying to put sticks together to reach the banana :-)

                On the resistor sizes, I believe in the course Phil had a reason for wanting the capacitor values to be low... but I need to check back on that. Working sim...

                Click image for larger version

Name:	Butterworth_3rd.png
Views:	124
Size:	85.2 KB
ID:	19078

                Comment


                • #8
                  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:

                  Click image for larger version

Name:	noise_default_lowC.png
Views:	122
Size:	48.8 KB
ID:	19080
                  And after lowering the series resistor values:

                  Click image for larger version

Name:	noise_low_R.png
Views:	119
Size:	47.2 KB
ID:	19081

                  Thanks!

                  Ant

                  Comment


                  • #9
                    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.

                    Click image for larger version

Name:	0 bias.jpg
Views:	136
Size:	128.5 KB
ID:	19083

                    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.

                    Click image for larger version

Name:	7v bias.png
Views:	149
Size:	15.0 KB
ID:	19085

                    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.

                    Click image for larger version

Name:	dc bias simple.jpg
Views:	130
Size:	214.7 KB
ID:	19084

                    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!).

                    Click image for larger version

Name:	opampbias.jpg
Views:	126
Size:	238.2 KB
ID:	19086

                    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).


                    Comment


                    • #10
                      That's brilliant, thanks for taking the time to explain... it's much appreciated, and makes a lot of sense.

                      Ant

                      Comment

                      Working...
                      X