Analog bandpass filter - bode plot for various filter types - Page 1
Forum section: electronics / beginners

author: petert
author_rank: Regular Contributor
timestamp: September 22, 2018, 06:39:36 pm
content: Hi,I have tried various calculators, and also calculated by hand, but when I simulate the circuit in LTSpice I do not get the expected results (passband bandwidth is not narrow enough, center frequency is off, or output voltage too low, etc.). So I'd like to take a more systematic approach.Is there a program that can draw bode plots for all common analog filter types, for a given/set center frequency and passpand? What I found is usually limited to special circuits, or 4-stage opamp only circuits, but I haven't found an all in one solution, that allows easier comparison.Great would be if it would consider crystal based filters, LCR based filters (or LC, LR), and those using opamps, and show their performance in comparison.

author: voltsandjolts
author_rank: Unknown
timestamp: September 22, 2018, 08:26:49 pm
content: Microchip FilterLab - but IIRC only does Bessel/Butterworth/Chebychev

author: ogden
author_rank: Super Contributor
timestamp: September 22, 2018, 08:39:43 pm
content: Quote from: petert on September 22, 2018, 06:39:36 pmFor opamp based RC filters you shall try Analog Devicesfilter wizard. It has bode plot as well.Professionals use commercial tools like Genesys to design and simulate circuits including passive filters. For amateur/hobby use there are many online filter calculators. Your results may differ due to different Q factor of components in design versus simulation and maybe impedance mismatch. Filter shall be fed and loaded using impedances it was designed for. I know thathttp://www.wa4dsy.net/filter/filterdesign.htmldoes work correctly and LT spice simulations match. Thou I was using lowpass filter calc.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 22, 2018, 09:05:58 pm
content: Don't forget that filter tables don't account for inductor or capacitor Q (except those that do, but only to the extent that they can), and LTSpice has default values for components that you need to specify if you're doing other than those defaults.Tim

author: petert
author_rank: Regular Contributor
timestamp: September 22, 2018, 09:38:30 pm
content: Thanks for the links.I tried it, unfortunately with no luck. Probably doing some beginner mistakes.Edit: looks, better now. See post below.

author: petert
author_rank: Regular Contributor
timestamp: September 22, 2018, 09:41:57 pm
content: Ok, I am stupid, I entered 77500 kHz, instead of 77500 Hz.With the revised numbers, it looks much better. But on the link it looks much more flat than in the bode plot from LTSpice.Is that related to the input/ouput impedance setting?The results of the calculator from:http://www.wa4dsy.net/cgi-bin/lc_filter4?FilterResponse=Bandpass&poles=6&CF=77500&cfunits=HZ&cutoff=1&funits=KHZ&Z=50I/O impedcance = 50.0 ohmsCenter frequency = 77500.0 HZ3 DB bandwidth = 1.0 KHZGeometric center freq = 77498.4 HZ3dB Cutoff low = 77000.0 HZ3dB Cutoff high = 78000.0 HZ

author: ogden
author_rank: Super Contributor
timestamp: September 22, 2018, 09:49:37 pm
content: Quote from: petert on September 22, 2018, 09:41:57 pmPerhaps. In LTspice you shall put series 50ohm between signal source and filteroutputinput, load filter (filter output to ground) using 50ohms resistor as well.

author: petert
author_rank: Regular Contributor
timestamp: September 22, 2018, 10:01:42 pm
content: Thanks, that worked. Is there a better way than using resistors, since it will attenuate the signal, which I get from an antenna?And as I can see the part values are pretty odd. I assume it will be hard to find parts with those exact values. Any way to test out systematically what the closest match of common values would be?

author: ogden
author_rank: Super Contributor
timestamp: September 22, 2018, 10:31:55 pm
content: Quote from: petert on September 22, 2018, 10:01:42 pmSignal from antenna supposedly shall come through 50 ohm cable, so you don't need any resistor here - connect cable straight into filter input. Well, maybe some lightning protector needed if you will be using external antenna. Filter output needs (summary) 50ohm load. Most likely next component after filter will have some impedance, so you need calculate load resistor so filter "feels" 50Ohms on output. Don't consider filter load as attenuator.QuoteYes, your filter shall be considered as quite low frequency for LC, it is VERY narrow as well. At least try to relax your filter requirement to 5KHz bandwidth or so. I doubt it will help to get sane inductor values anyway. Simulate with inductor values you can actually get. You shall check what comes out of AD filter wizard. Maybe you will like component types and values more.I would just make first stage LC 2nd order lowpass filter with 120KHz cutoff frequency or so - to use 100uH inductor from my scrapbox. Just few tries in calculator are enough to approximately "hit" desired inductor value for 2nd order design. Add 1st order series capacitor hi-pass filter and I would name result as good enough for initial experiments.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 23, 2018, 08:25:31 am
content: The source and load are supposed to be 50 ohms, and their voltages will drop by 50% when matched. That's simply power transfer at work.Insertion loss is normalized to this. In a simulation, you'll usually start with a 2V source (or 2V/50 ohms current source, for a Norton equivalent), which when loaded with 50 ohms gives 1V and 20*log(1/1) = 0dB insertion loss, of course. If you get less than 1V output from your filter (peak in the passband), that's loss. (You probably won't measure any with ideal simulated components.)So topology, those values are plausible but you'll need quite high Q, which isn't so plausible. Narrow filter you want a coupled resonator topology. Example:https://www.jrmagnetics.com/rf/doubtune/doubccl_c.phpOf course this is only a 2nd order filter, not 3rd.Basic design, consider: 1kHz width, 77kHz center, 77/1 = Q required. The actual loaded Q of each resonator may be higher or lower than this, but they will all average to this (geometric average). The loaded Qs are spread apart a bit to get the desired filter profile (Butterworth in this case). The component Q must be many times higher than this -- if you use an ideal capacitor, and an inductor of Q = 77, you have 50% loss on each resonator, you'll actually get a loaded Q of 38, and you get a very sloppy bandwidth of more than 2kHz. Probably a lot worse than that because there's three of them.The impedance of the resonators doesn't matter much, because you'll be using an impedance matching network to go from 50 ohms to the resonator. The above uses a capacitive divider. Tapped or coupled inductors can be used, or any other divider sort of network you can put together without adding more resonant modes.The impedance of a resonator doesn't matter too much anyway, because the number of turns and thickness of wire is variable, for an inductor of a given size. Nominal impedances (say 20 to 2000 ohms) are easier to implement with real materials (because of resistivity of copper, parasitic capacitance and so on).But really, for such a narrow bandwidth, you may find it's better to use a wide filter that's easy to build, and use another method to narrow the bandwidth further. Example, say you use a 10kHz bandwidth (which can be implemented with Q ~ 30 commercial parts just fine), then detect it, or hetrodyne it down to baseband, and use an active filter (Rs and Cs and opamps). Or do it DSP with a microcontroller doing equivalent-time sampling, which might not be doable on an ATmega based Arduino, but pretty much anything ARM based will do.Or sticking with passive filters, you're probably not going to find a mechanical filter or resonator at quite that frequency (unless it's a standard thing that I don't know about -- in which case, bonanza!), but upconverting it to 455kHz to use AM BCB filters, or the low MHz for quartz crystals*, would be another option.*Or 32.768kHz, but you'd probably never get the bandwidth wide enough? The impedance is really high, too.Tim

author: ogden
author_rank: Super Contributor
timestamp: September 23, 2018, 05:26:43 pm
content: Yes, oldskool approach is impractical. I would suggestTayloe mixer(detector) + SDR approach. Much more fun definitely.Here you can taste (hear) how one of simplest DIY Software Defined Radio works:http://hackgreensdr.org:8901/Quite detailed description of hardware:http://hackgreensdr.org:8901/bunker-system.pdfDCF77 is so slow that you can do all the DSP on Arduino and have spare CPU time left.

author: petert
author_rank: Regular Contributor
timestamp: September 24, 2018, 02:45:09 pm
content: Thanks for all that great info. I'll need time to process all of it.SDR is definitely a route I want to go (I recorded the DCF77 radio signal using a soundcard before, and processing in software is no problem).But this is a project to learn more about analog electronics, so I want to stick with it.I saw that crystal oscillators can be used as resonating filter with a very narrow bandwidth. A pierce oscillator seems reasonably simple.http://thehackerworkshop.com/?p=364https://www.mikrocontroller.net/topic/78005(German, but useful info on crystal oscillators).PCB of a crystal filter with soldered BNC jacks:http://www.philipstorr.id.au/radio/technical/Crystals%20Techo.pdfTest a crystal and tune a pierce oscillator:https://www.electronicdesign.com/test-measurement/simple-tester-provides-readout-crystal-frequencyA crystal oscillator circuit with completely specified parts and values:http://www.z80.info/uexosc.htmI didn't find a calculator for such a pierce oscillator, any idea?

author: ogden
author_rank: Super Contributor
timestamp: September 24, 2018, 05:47:27 pm
content: Quote from: petert on September 24, 2018, 02:45:09 pmDo not try to build 77.5KHz carrier detector with needle-sharp bandpass filter. Learn heterodyne receivers instead - it's still analog electronics.

author: petert
author_rank: Regular Contributor
timestamp: September 26, 2018, 03:42:30 pm
content: Regarding impedance matching, I'll add a good video here for (future) reference:Measuring output impedance: