3
\$\begingroup\$

I want to test my basic pH sensor circuit to find if there is a need for a low-pass filter. How I can test it?

The signal pathway is:

Sensor probe---> Buffer op-amp circuit ---> ADC ---> MCU

So is this correct way: Sensor probe ---> LP filter ---> Buffer op-amp circuit ---> ADC ---> MCU

or:

Sensor probe ---> Buffer op-amp circuit ---> LP filter ---> ADC ---> MCU

And a note I should use to active filter according to my old question. So I will use an active LP filter.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Are you asking where to put it, or how to test for whether it's needed? The answer to the second question is definitely yes, without any testing, by the Nyquist theorem: you have to bandwidth-limit with a high-order filter to less than half the sample rate of the ADC. \$\endgroup\$ – user207421 Mar 11 '15 at 21:38
5
\$\begingroup\$

You might have to put one before the op-amp and one before the ADC. The one before the ADC cleans up line noise as well as op-amp noise as well as performing a certain amount of alias reduction.

The one before the op-amp stops EMI getting in and upsetting the op-amp into producing false dc offsets (it's called input RFI rectification) - see this.

You might have to do some filtering in the MCU too but, a little bit of noise can be a good thing - see dithering

You might also need a low pass filter at the probe and this depends on how well the probe copes with noise at its power terminals (if it has any).

If the probe has an earth connection you might also need to consider isolation methods to avoid ground loops. There are plenty of things that may be relevant.

\$\endgroup\$
5
  • \$\begingroup\$ Both LPFs are active filter in here? \$\endgroup\$ – user30878 Mar 11 '15 at 22:13
  • \$\begingroup\$ They don't need to be. It depends on the noise, interferences and your sampling rate. More than likely the one before the opamp is passive and, again, depending on the ambient level of RFI may include inductors as well as R and C \$\endgroup\$ – Andy aka Mar 11 '15 at 22:24
  • \$\begingroup\$ In fact the filter before the opamp is highly likely to be passive and, usually, the filter before the ADC will be a 2nd or 3rd order active filter but, this may be possibly implementable using the opamp previously mentioned. \$\endgroup\$ – Andy aka Mar 11 '15 at 22:29
  • \$\begingroup\$ And why other LPF need to be in 2nd or 3nd order? \$\endgroup\$ – user30878 Mar 12 '15 at 12:58
  • \$\begingroup\$ "usually, the filter before the ADC will be a 2nd or 3rd order". Usually is the key word and it is usual, in most applications that the anti-alias filter needs 2 or 3 orders. It's a rule of thumb but I've seen systems with only a first order passive filter. \$\endgroup\$ – Andy aka Mar 12 '15 at 13:54
2
\$\begingroup\$

"How I can test it?" perhaps you don't even need one? build a prototype circuit and test the current arrangement, and see what the noise is like. For a supposedly non-moving reference, see what the ADC is reading like. If it stays steady, and noise is less than 1 LSB, then don't do anything.

If the noise is still sort of low, but you can see it oscillates around a particular value, try software averaging (take 10 samples, divide by 10, use the result as the 'reading').

If the noise is pretty bad, and averaging doesn't really help, you can then attempt the LPF.

The LPF would be best just before the ADC, so that it can filter out any strangeness emanating from the buffer op-amp as well as the original signal itself.

Be sure to check the expected input impedance of the ADC though, and ensure the output of the LPF still qualifies for this range, else the ADC may give incorrect values (may be off in scale, or slower than the input signal more than necessary, due to the sampling capacitors not getting charged quick enough, or too fast)

\$\endgroup\$
7
  • \$\begingroup\$ How to match input impedance of the ADC and output of LPF? \$\endgroup\$ – user30878 Jan 17 '17 at 10:00
  • \$\begingroup\$ @user30878 simply read your MCU's datasheet on the ADC peripheral section, and check the range of impedance the device works with. For example, it might be designed to work best with 10k source impedance. Your active low pass filter should have 10k ohm output impedence, using a series resistor going into the ADC. \$\endgroup\$ – KyranF Jan 17 '17 at 17:08
  • \$\begingroup\$ It's just a matter of how much current gets into your ADC sampling capacitors, there usually isn't a problem with too low impedance (I think..) but there are problems with too high impedance. Pick something reasonable below the requirements of your ADC. Also read more about this topic from texas instruments here: ti.com/lit/an/spna061/spna061.pdf \$\endgroup\$ – KyranF Jan 17 '17 at 17:10
  • \$\begingroup\$ The signal already buffered by op-amp of active filter for second time before going to ADC input. So I don't need more impedance matching here I think. \$\endgroup\$ – user30878 Jan 17 '17 at 23:46
  • \$\begingroup\$ @user30878 again, just double check the ADC specs for your chip, and you should be good \$\endgroup\$ – KyranF Jan 18 '17 at 1:28
0
\$\begingroup\$

All nice previous answers. I just wanted to add, that for me, I think about a filter when I run out of dynamic range. (signal + noise is hitting the PS rails.) Put the filter in front of the final analog gain stage... but only if you need it! Don't throw away bandwidth if you don't have to. (+1's everywhere.)

\$\endgroup\$

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.