1
\$\begingroup\$

I would like to read an analog input from temperature sensor or pressure sensor that measure the value from a slow process with let's say 1s of rise time. I know that using a low pass filter is a common approach when designing a circuit for reading analog values, however I am not sure what would be the approach towards choosing the cut off frequency.

I know the answer would be that it depends on the type of noise that you are expecting, therefore in addition I'd like to provide some more details.

  1. Let's say we'd like to filter out the common radio frequencies. What would be the common cut off frequency in this case? Would a cut off frequency of 1MHz be sufficient?

  2. What if the system is located near live wires with with distance of 10cm and relatively high currents of 1-3A. I guess we would also like to filter out the 50-60Hz. What would be the reasonable cut off frequency in this case? Would a cut off frequency of 10Hz be sufficient?

Choosing that low cut off frequencies brings its own problems. The low pass filter will introduce slow rise times and will prevent measuring fast dynamics in processes. A common 10Hz low pass filter would have a rise time of ~10ms, which means we would require at least 50ms before measuring a stable analog value on a step response. Since my process is pretty slow, I can comfortably introduce a 500ms sample time.

Is filtering the 50Hz noise with a low pass filter really necessary. Can I only filter the RF spectrum with a low pass filter and introduce additional digital filter(software window filter) to filter out the 50Hz. Would this be a better approach?

I know that ADC input capacitance should be considered as well for a precise measurement, but I don't think it is really necessary with such low sampling times of 0.5s. But I am not 100% sure.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Phill, these kinds of problems (very close to DC) tend to have significant, unique 1/f noise problems (which is correlated and can be helped by correlated double sampling.) Chopping and then following that up with a low pass filter is an approach, as well. Just a low pass filter alone is probably one of the worst (but obvious) ways to address the problem. But then, details matter. So I can't just suggest a bright-line answer, either. A full exposition of your environment and not just the sensors would be required to know better what to suggest, I think. \$\endgroup\$
    – jonk
    Jul 9 at 20:55
2
\$\begingroup\$

If you want to sample at 500 ms intervals, then your sampling rate is 2 Hz and you should design a low pass filter with a cut off less than 1 Hz to avoid aliasing.

However, I would turn this logic around and instead ask how fast your hardware can sample? Do you have a sampling clock in your ADC? If so, choosing a higher rate (maybe 1 KHz) and then using a 1 Hz digital low pass filter (which can be very sharp and have higher rejection then an analog filter) combined with a 10 Hz analog low pass filter would give you much better noise rejection than trying to reject everything with a single filter.

Conversely if this is a raw ADC with no clock that you just periodically read out then a digital filter will not work well. In that case you probably want a out a 1 Hz low pass.

\$\endgroup\$
4
  • \$\begingroup\$ The hardware speed of the ADC is not a problem. I'll be using an STM32 with an ADC with max. clock speed of 42MHz. I thought I'd only use the samples every 0.5s but I guess it would be better if I use all the samples and just use digital filter with a window of 0.5s. Would you agree that it would be better to use the low pass filter for RF frequencies only and reject the 50Hz noise using digital filter? \$\endgroup\$
    – Phill Donn
    Jul 10 at 17:47
  • \$\begingroup\$ @PhillDonn That is a very fast ADC for an application like this. Often MHz class ADCs have a minimum sampling rate. If so you'll have to use at least that rate. \$\endgroup\$ Jul 11 at 14:34
  • \$\begingroup\$ The ADC has inbuilt registers for controlling the sample rate through software. I was thinking more like 1kSps or 10kSps with a 100Hz or 1kHz low pass filter. With these registers I believe I can go as low as 42kSps. If I want to go even lower I can make the ADC sampling interrupt driven therefore sampling time in the sense of hardware capability has full range so I don't think it's an issue. I am more puzzled by wether or not if there are some standard low pass filters for filtering RF noise and what are their cut off frequencies. How do you choose the cut off frequency? \$\endgroup\$
    – Phill Donn
    Jul 12 at 15:21
  • \$\begingroup\$ There are no standard low pass filters, you pick one for the bandwidth you need. There is no way to have one filter that works for every possible sampling rate. \$\endgroup\$ Jul 12 at 15:33
-2
\$\begingroup\$

The lower the cutoff frequency the better.If you want only DC values you can use a supercapacitor of the order of some Farads

\$\endgroup\$
5
  • 2
    \$\begingroup\$ A 1 F supercapacitor, even if it were perfectly linear and avoided leakage (it doesn't do these things since it's optimized for energy storage rather than signal processing), would present an unacceptably low cutoff frequency with any sort of sensible resistance (e.g. 100 ohms -> 1.5 millihertz). The signal is "pretty slow", but your proposed filter is excessive and will make that signal's variation unmeasurable. "1s of rise time" and "only DC" are not compatible. \$\endgroup\$
    – nanofarad
    Jul 9 at 15:57
  • \$\begingroup\$ Yes but the low cutoff frequency removes any AC component which is what the op wants. \$\endgroup\$
    – Miss Mulan
    Jul 9 at 16:00
  • \$\begingroup\$ Yes, and it also removes the AC component at the frequency of interest. \$\endgroup\$
    – nanofarad
    Jul 9 at 16:05
  • 1
    \$\begingroup\$ My question was more prone towards the approach of choosing the cut-off frequency in my case, rather than choosing a filter with the lowest possible cut off frequency. \$\endgroup\$
    – Phill Donn
    Jul 9 at 16:08
  • \$\begingroup\$ Yes but the "1 s of rise time" introduces some AC component which is what the OP also wants. \$\endgroup\$
    – tim
    Jul 9 at 16:10
-2
\$\begingroup\$

If you wish to cancel any AC just see my answer below.If you want only some AC of a specific frequency then you should use a band-pass filter with high Q factor of your desireable resonant frequency.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Sorry, but this answer has as little sense as the previous one. And the problem seems to be in the frivolous use of AC and DC terms. Is 5V changing by 0.5V over 1 hour a DC or AC? What about 1 minute? 1 second? If OP wants to read variable values from temperature sensor it automatically means there is some signal bandwidth that has to pass through. Also, "resonant" ?! What resonance (amplification) has to do with filtering (attenuation)? So called resonant filters are not in the OP question. You should really watch for the meaning of technical terms before you use them. \$\endgroup\$
    – Maple
    Jul 9 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.