Choice of R vs C values in op amp filter - Page 1
Forum section: electronics / beginners

author: jmw
author_rank: Frequent Contributor
timestamp: September 17, 2018, 10:44:35 pm
content: I'd like to take the PWM output of a microcontroller and use it to control an adjustable current source for LEDs or Nixie tubes. I'm doing this by filtering the PWM through a low-pass filter and using that signal to drive an op-amp & MOSFET combo in its saturation region to make a current source. For effect, I want smooth but just barely visible (50-100 ms rise time from 0-3.3 V) transitions, so I chose a cutoff frequency of 10 Hz in the filter.Using this filter calculatorhttp://sim.okawa-denshi.jp/en/OPseikiLowkeisan.htm,I tried a Sallen-Key design with Q=1/sqrt(2) and it gave me a design with R1,R2 = 30k,18k and C1,C2 = 1u,470n. I have heard that class I C0G/NP0 caps are superior in filter applications due to lack of voltage effects, but 1u is pretty big for C0G. So another design is R1,R2 = 300k,180k and C1,C2=100n,47n. I also remember that high resistances >100k in op amp circuits are more susceptible to noise. Can someone explain the relationship between high impedances and noise?Finally, what are your opinions on what approach is best?1. Use high-R and low-C parts in the filter so C0G caps are an option2. Distortion from X7R/X5R etc. caps are fine for this application, so use low-R and high-C parts3. Do ramping and smoothing in the MCU so the filter can have a higher cutoff frequency and lower-valued parts all around

author: basinstreetdesign
author_rank: Frequent Contributor
timestamp: September 18, 2018, 06:34:01 am
content: Quote from: jmw on September 17, 2018, 10:44:35 pmThermal noise is generated in any conductor or resistor at all times.https://en.wikipedia.org/wiki/Johnson%E2%80%93Nyquist_noiseIt originates from the thermal agitation of the charge carriers (electrons) within the resistor. Just sitting on a desk, a resistor is generating a wide-band, white noise called Johnson or Nyquist noise voltage with power equal toP = v^2 = 4kTBR Watts where:k is Boltzmanns constant, 1.38064852×10−23 J/KT is absolute temperature in degrees kelvin above absolute zero,B is the frequency bandwidth in Hertz that the noise voltage may be limited to by external circuitry, andR is the resistor value in Ohms.The noise voltage appears in series with the resistor if the resistor is considered as ideal and noiseless.So a 100K resistor at room temp generates 128 nV RMS if limited to 10 Hz bandwidth. A typical audio system with a 47K input impedance and 20KHz bandwidth has an input noise level about 3.9 uV RMS or -108dB with respect to 1V RMS.https://daycounter.com/Calculators/Thermal-Noise-Calculator.phtmlEven if the system is absolutely noiseless (impossible) it can't get any quieter than that.This is why wide-band transmission systems are designed around a low impedances such as 50 or 75 Ohms.Since you are dealing with a BW of only 10 Hz and driving LEDs you should not be worrying about noise levels in op-amp circuits at all. The noise voltages are just way too small to be bothered with.Quote from: jmw on September 17, 2018, 10:44:35 pm#1 - Sure - go for it.#2 - Depends on the linearity you need. If you are making a precision VU meter then I would worry about distortion.#3 - Depends on your sensitivity to parts cost and how much spare MCU compute-bandwidth you have. If doing that will allow you to use only a 1st-order filter and save 30 precious cents in parts in a high-volume device then there's that option, too.Hope this helps

author: sdouble
author_rank: Frequent Contributor
timestamp: September 18, 2018, 09:20:24 am
content: as already mentioned, going for such a low bandwidth system, I would not worry too much about thermal noise.Go for your CGO cap specially if you'll have to deal with several volts in the 2-stage LPF.

author: ogden
author_rank: Super Contributor
timestamp: September 18, 2018, 10:35:51 am
content: Quote from: sdouble on September 18, 2018, 09:20:24 amRight. Much more important is choice of opamp. Note that output is connected to input through R1 and C1. In case of insufficient GBW or insufficient output drive, your lowpass Sallen-Key filter can start to act as notch filter passing through hi-frequency components. That's why it is advised to put in front of Sallen-Key filter one (buffered) RC filter stage,making 3rd order filter.You are suggested to play withAnalog Devices filter wizard. TI also have similar online tool.