Last active
June 22, 2025 14:22
-
-
Save turingbirds/5fa6275781232c1c4e563a43c4042bf2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Version 4 | |
SHEET 1 1496 1228 | |
WIRE -48 256 -160 256 | |
WIRE 128 256 32 256 | |
WIRE -336 272 -336 256 | |
WIRE 384 272 272 272 | |
WIRE 560 272 464 272 | |
WIRE 32 336 16 336 | |
WIRE 128 336 128 256 | |
WIRE 128 336 96 336 | |
WIRE 464 352 448 352 | |
WIRE 560 352 560 272 | |
WIRE 560 352 528 352 | |
WIRE 64 416 64 400 | |
WIRE -320 432 -336 432 | |
WIRE -272 432 -320 432 | |
WIRE -160 432 -160 256 | |
WIRE -160 432 -192 432 | |
WIRE -112 432 -160 432 | |
WIRE 16 432 16 336 | |
WIRE 16 432 -32 432 | |
WIRE 32 432 16 432 | |
WIRE 496 432 496 416 | |
WIRE -336 448 -336 432 | |
WIRE 128 448 128 336 | |
WIRE 128 448 96 448 | |
WIRE 160 448 128 448 | |
WIRE 272 448 272 272 | |
WIRE 272 448 240 448 | |
WIRE 320 448 272 448 | |
WIRE 448 448 448 352 | |
WIRE 448 448 400 448 | |
WIRE 464 448 448 448 | |
WIRE 32 464 16 464 | |
WIRE 560 464 560 352 | |
WIRE 560 464 528 464 | |
WIRE 608 464 560 464 | |
WIRE 720 464 688 464 | |
WIRE 784 464 720 464 | |
WIRE 800 464 784 464 | |
WIRE 16 480 16 464 | |
WIRE 464 480 448 480 | |
WIRE 448 496 448 480 | |
FLAG -336 352 0 | |
FLAG -336 256 vcc | |
FLAG 64 480 0 | |
FLAG 64 400 vcc | |
FLAG 16 560 0 | |
FLAG -336 528 0 | |
FLAG -160 496 0 | |
FLAG 496 496 0 | |
FLAG 496 416 vcc | |
FLAG 448 576 0 | |
FLAG 272 512 0 | |
FLAG 720 528 0 | |
FLAG 784 464 Vout | |
FLAG -320 432 Vin | |
SYMBOL voltage -336 256 R0 | |
WINDOW 0 45 43 Left 2 | |
WINDOW 3 46 73 Left 2 | |
WINDOW 123 0 0 Left 2 | |
WINDOW 39 0 0 Left 2 | |
SYMATTR InstName V1 | |
SYMATTR Value 3.3 | |
SYMBOL res -288 448 R270 | |
WINDOW 0 32 56 VTop 2 | |
WINDOW 3 0 56 VBottom 2 | |
SYMATTR InstName R1 | |
SYMATTR Value 100k | |
SYMBOL Opamps\\UniversalOpamp2 64 448 R0 | |
SYMATTR InstName U1 | |
SYMATTR Value2 Avol=10Meg GBW=100Meg Slew=100Meg | |
SYMBOL voltage -336 432 R0 | |
WINDOW 123 36 90 Left 2 | |
WINDOW 0 39 62 Left 2 | |
WINDOW 3 36 120 Left 2 | |
SYMATTR Value2 AC 1 | |
SYMATTR InstName V2 | |
SYMATTR Value SINE(1.25 1.25 50E3 0 0) | |
SYMBOL voltage 16 464 R0 | |
WINDOW 0 43 68 Left 2 | |
WINDOW 3 39 94 Left 2 | |
SYMATTR InstName V3 | |
SYMATTR Value 1.25 | |
SYMBOL cap 96 320 R90 | |
WINDOW 0 12 58 VBottom 2 | |
WINDOW 3 -13 -3 VTop 2 | |
SYMATTR InstName C2 | |
SYMATTR Value 47p | |
SYMBOL res -128 448 R270 | |
WINDOW 0 32 56 VTop 2 | |
WINDOW 3 0 56 VBottom 2 | |
SYMATTR InstName R2 | |
SYMATTR Value 18146 | |
SYMBOL res -64 272 R270 | |
WINDOW 0 32 56 VTop 2 | |
WINDOW 3 0 56 VBottom 2 | |
SYMATTR InstName R3 | |
SYMATTR Value 50k | |
SYMBOL res 144 464 R270 | |
WINDOW 0 32 56 VTop 2 | |
WINDOW 3 0 56 VBottom 2 | |
SYMATTR InstName R4 | |
SYMATTR Value 10k | |
SYMBOL Opamps\\UniversalOpamp2 496 464 R0 | |
SYMATTR InstName U2 | |
SYMATTR Value2 Avol=10Meg GBW=100Meg Slew=100Meg | |
SYMBOL voltage 448 480 R0 | |
WINDOW 0 45 63 Left 2 | |
WINDOW 3 43 90 Left 2 | |
SYMATTR InstName V4 | |
SYMATTR Value 1.25 | |
SYMBOL cap 528 336 R90 | |
WINDOW 0 11 64 VBottom 2 | |
WINDOW 3 -13 -5 VTop 2 | |
SYMATTR InstName C4 | |
SYMATTR Value 33p | |
SYMBOL res 304 464 R270 | |
WINDOW 0 32 56 VTop 2 | |
WINDOW 3 0 56 VBottom 2 | |
SYMATTR InstName R5 | |
SYMATTR Value 24979 | |
SYMBOL cap 256 448 R0 | |
WINDOW 0 47 62 Left 2 | |
WINDOW 3 48 89 Left 2 | |
SYMATTR InstName C3 | |
SYMATTR Value 398.90p | |
SYMBOL res 368 288 R270 | |
WINDOW 0 32 56 VTop 2 | |
WINDOW 3 0 56 VBottom 2 | |
SYMATTR InstName R6 | |
SYMATTR Value 10k | |
SYMBOL cap -176 432 R0 | |
WINDOW 0 44 53 Left 2 | |
WINDOW 3 45 79 Left 2 | |
SYMATTR InstName C1 | |
SYMATTR Value 98.093p | |
SYMBOL res 704 448 R90 | |
WINDOW 0 0 56 VBottom 2 | |
WINDOW 3 32 56 VTop 2 | |
SYMATTR InstName R7 | |
SYMATTR Value 100 | |
SYMBOL cap 704 464 R0 | |
WINDOW 0 52 20 Left 2 | |
WINDOW 3 51 46 Left 2 | |
SYMATTR InstName C5 | |
SYMATTR Value 21.188n | |
TEXT -344 152 Left 2 !;tran 0 1.08E-3 1e-3 1E-6 | |
TEXT -344 176 Left 2 !.ac oct 100 1 100E6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! Thanks for the great design guide! Helped me understand what is going on as well as how to design the filter! Sadly some of the plots are not working great in the original. Most importantly the Group Delay plots do not work as intended because scipy seems to assume digital filters in its implementation of
group_delay()
making nonsensical results for those curves. Secondly, when the phase "wraps" above π or below -π there is a jump in the Phase graph. This is technically correct but makes it harder to interpret what is going on in the graph, especially when comparing Phase from different filters. In my Fork I implemented a Group Delay function that calculates it directly from the numerator and denominator polynomials. Also I implemented a corrected call to scipy'sgroup_delay()
that makes it work right. I used both together as a sanity check.My Fork
Please check out this fork, as I can't make a pull request to a gist as far as I can tell. Note that some of the Matplotlib colors are confusing because I'm always plotting the two different ways to calculate the Group Delay, to confirm that they are both in fact working. This would not be helpful for the demo itself, I just left it as proof.
I think fixing your original gist is important because some external sites link to it (which is how I found it) and it was VERY helpful for getting the basics of designing such a filter! Maybe more people would benefit from a clearer version from the start!