Basic RC filter and line noise question. - Page 1
Forum section: electronics / beginners

author: jgalak
author_rank: Regular Contributor
timestamp: February 17, 2018, 08:28:24 pm
content: I am slowly working my way through Learning the Art of Electronics and am getting confused by an early assignment. This lab has you use a transformer to couple a 10kHz signal to a 60Hz line-based signal (see image). The signal is then to be filtered with a high-pass filter to "extract" the 10kHz signal from the 60Hz noise.The 60Hz signal was about 20 Vpp, the 10kHz signal was about 1.4 Vpp before the filter.Choosing an R value of 500Ohm (since the book generally suggests 1:10 ratio of output to input Z), and a cutoff frequency of about 1kHz, and using the formula f3db=1/(2*pi*R*C) I tried 300nF of capacitance and 470 Ohm resistance I should get a cutoff frequency of 1.13 kHz. That should be well below the 10kHz signal, and well above the 60 Hz noise. The result was very unpromising. The signal was still completely dominated by the line noise.After beating my head against this for a bit, I started just playing with capacitors, and also tried taking the input impedance from 500 Ohm to 50 Ohm, trying to match the output impedance. Eventually I settled on 10nF and 47 Ohm. That gave me a nice, clean, 10kHz signal, with only a hint of wiggle.However, by my math, that's a cutoff frequency of 338kHz! 33 times higher than the signal! This attenuated the 1.4 Vpp signal to 60 mVpp.What am I missing? am I using the formula wrong? Is my math off? It seems like the cutoff frequency should be somewhere between the noise frequency and the signal frequency, not way above both...I suspect I'm missing something obvious here, but haven't found what...

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 17, 2018, 10:16:28 pm
content: Quote from: jgalak on February 17, 2018, 08:28:24 pmThe pole is calculated by using the TOTAL resistance seen by the capacitor. In this case, your total resistance is 1000+50+47. Resulting pole is 14.5kHz

author: orolo
author_rank: Frequent Contributor
timestamp: February 19, 2018, 11:32:37 am
content: If I understand correctly, the final load is 50 Ohms.Consider that you have a RC filter, and that 60Hz is about 7.4 octaves below 10kHz. This means that, for a good HPF, the best you can expect is the noise being attenuated 6*7.4 = 44.4 dB with respect to the signal. Since the noise is about 20dB over the signal, the best final result is getting the noise about 24.4dB below the signal. If you look at the Fourier output of your circuit (C=10nF, R=47), you get about 24dB, which is almost optimal. You cannot expect much more from a simple RC filter than that.The problem with your values is that the output signal is too attenuated by the filter: it's about 4.2mV peak to peak, if I'm not mistaken. You can improve that.Playing a bit with series and parallel resistances, and voltage dividers, it's easy to compute the transfer function for the filter with 50 Ohms load.\$\displaystyle \frac{s\, 50 R_f C}{R_f + R_o + s C\left[50 R_f + (50+R_f)R_0\right]}\$Where Ro = 1050 the output impedance, Rf the filter resistance, C the filter capacitance. You can see there is a single zero at DC and a pole, typical highpass filter. The high-pass attenuation can be computed taking the limit with s to infinity and aproximating:\$\displaystyle \frac{50 R_f}{(50+R_f)R_o}\$If you make Rf = 47, you get an attenuation of 0.02. This is near to the minimum, which is at 25 Ohms. The best we can get is about 50/Ro = 0.047. If we take Rf = Ro = 1050, we achieve an attenuation of 0.045 (extremely close to optimal) and our formulas get simpler.So it's a good idea to take the filter resistor equal to 1050 Ohms.Now, to get optimal filtering, we should place the pole as close to 10kHz as possible. The pole is:\$\displaystyle R_f + R_o + sC\left[50R_f + (50+R_f)R_o\right]\$Solving, using Rf = Ro, the angular frequency is about \$2/R_o C\$. So, for a 10kHz frequency, C = 30nF. Probably you want to move the pole a bit, so perhaps a value of 15-25nF would give better attenuation.My suggestion: R = 1050 ohms, C=15nF. The output is 36mV p2p and the noise is 23dB below signal.

author: Aztlanpz
author_rank: Regular Contributor
timestamp: February 19, 2018, 01:53:43 pm
content: Can one use a dual port signal generator for this assignment?

author: jgalak
author_rank: Regular Contributor
timestamp: February 19, 2018, 03:08:30 pm
content: Quote from: Aztlanpz on February 19, 2018, 01:53:43 pmThis isn't a formal class, just self-study, so in a way, I can do whatever I want. However, the assignment seems to use a single port generator, and, more importantly, I don't have a dual port generatorI'm curious what you would do with a dual port unit? Is it just to avoid using a mains-driven transformer? I suppose you could do just that with two different single-port signal generators (I do have several).