3

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.

user30878
  • 185
  • 17
  • 2
    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. – user207421 Mar 11 '15 at 21:38

3 Answers3

5

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.

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • Both LPFs are active filter in here? – user30878 Mar 11 '15 at 22:13
  • 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 – Andy aka Mar 11 '15 at 22:24
  • 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. – Andy aka Mar 11 '15 at 22:29
  • And why other LPF need to be in 2nd or 3nd order? – user30878 Mar 12 '15 at 12:58
  • "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. – Andy aka Mar 12 '15 at 13:54
2

"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)

KyranF
  • 6,248
  • 16
  • 25
  • How to match input impedance of the ADC and output of LPF? – user30878 Jan 17 '17 at 10:00
  • @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. – KyranF Jan 17 '17 at 17:08
  • 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: http://www.ti.com/lit/an/spna061/spna061.pdf – KyranF Jan 17 '17 at 17:10
  • 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. – user30878 Jan 17 '17 at 23:46
  • @user30878 again, just double check the ADC specs for your chip, and you should be good – KyranF Jan 18 '17 at 01:28
  • I checked it, it's 6 mOhm – user30878 Jan 18 '17 at 07:34
  • @user30878 that doesn't make sense to me. Please read the question and comments/answers (one is from me too!) here: http://electronics.stackexchange.com/questions/107741/required-output-impedance-for-adc-input – KyranF Jan 18 '17 at 18:14
0

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.)

George Herold
  • 4,754
  • 1
  • 18
  • 25