Anti-aliasing filter with NTC

Hello everyone, I want to make a temperature sensor by NTC with a digital filter of a sampling rate 10 ms on a stm32 "blue pill". The signal present at the input of the ADC is noisy at high frequency which requires an anti-aliasing filter before the conversion to satisfy the Nyquist theorem.
Any active LPF filter can be used as an anti-aliasing filter, but I have a problem with the filtering, there are strange values at the output of the op_amp even with a buffer configuration (or voltage follower) .
With the buffer circuit I read 4095 at the output of the ADC which equals 3.3v. I tried another op_amp and it's the same thing even with a +12v/-12v power supply, and I didn't understand where the problem is, I think something is missing in the circuit!
buffer

A capacitor from the voltage divider tap to ground will strongly reduce the high frequency noise.

yeah i try a second order sallen key topology and doesnt work, now i just try to realise a buffer to confirm that the circuit is going to work with an RC

image

with a buffer circuit i saw that there is not a voltage folowing exist i read 4095 in the output of the op-amp!!

Use a ~ 4 uF cap for an RC time constant of 20 ms.

okay i will try

i try with a 4.2µf and always no voltage folowing!

Did you connect the grounds? Use your multimeter to check continuity?

Post a clear, focused photo of your wiring.

This is NOT an aliasing problem. Aliasing (and Nyquyist) is related to signal frequency and sampling frequency. Temperatures don't change instantly and you probably don't care about the frequency of the temperature changes. :wink:

Aliasing will foul-up the frequency information but you can still find the peaks (1), or average, or the current-instantaneous value.

You're basically measuring slowly-changing DC (although the noise may not be slow).

What are you reading (on average) without the op-amp buffer? If you're reading 4095 something is "seriously wrong". Do you have a multimeter to check the voltage? Maybe the thermistor is shorted or the 10K resistor isn't really 10K. Or maybe your temperature is super-super high! :stuck_out_tongue:

How much noise are you getting?

A capacitor across the 10K resistor should help with noise and if that's not enough you can use some software smoothing.

With a 12-bit ADC, you are probably going to get some noise.

I have no idea why your buffer isn't working. But you shouldn't need a buffer unless you have a long wire-run and you're picking-up noise over the wires. In that case, a buffer near the sensor makes lower impedance over the wires which will help with noise pick-up. A shielded cable or just twisted wires will also help.

(1) You can "miss" a peak but over-time if the peaks are about the same you can "find" one.


this 2 pictures with your configuration jremington (with 4095 reading always);

DVDdoug without any filter a good ripple is present at the input of the adc (several techniques are possible to reduce this noise there "an averaging algorithm, a capacitor between the input and the ground, refference less noisy...") the value of low frequency voltage <4hz that I need to read is mixed with the high frequency noise that comes from the default 133khz source is great to sample without loss of information

I decided to make an active low pass filter with fc=50hz before the adc and it doesn't work for me.
but before I have to successfully make a buffer to pass to the filter and it doesn't work as well. I saw an article Measuring Temperature using PT100 and Arduino - Engineering Projects with PT100 and there's nothing wrong.
I read the temperature value correctly but too noisy.

Leave out the ancient LM747. It actually degrades the signal, since the output is not rail to rail.

That is, if it works at all when powered by 5V in a single supply configuration.

+1
That circuit is just plain silly.

Why an NTC anyway. There might be much better digital solutions.
Leo..

+1
The 741 is by far not a good choice. Minimum recommended power supply is +-10V, and the 741 then still some head room of at least(!) 2V between output and supply. So you probably measure something totally independent from the temperature ...
If you like to go with the NTC, fine, but select an OpAmp that runs at 5V single power supply and can manage the voltage at your voltage divider ...

1 Like

yes sure this is the problem i change from lm741 to lm358 (single power supply) and the buffer it work, but when i visualising the output and the input of the low pass filter fc=31hz I have not seen a filtring the signals are almost identical, I will try to fix this problem

You don't need a buffer amp.

So far we have only seen you adding problems.
The LM358 is another non rail2rail opamp. It's output can only swing to 3.5volt on a 5volt supply.
But that might have saved the input of that 3.3volt processor.
Don't use an opamp with an NTC. Use digital filtering (smoothing) if you have to.
Or except the low quality/resolution of an NTC and that A/D.
Leo..

I am making a fire detection and ixtenction system (an end-of-study project), I am not very interested in digital sensors I prefer to build analog sensors if is the case, a ntc (for the temperature) and an infrared emitter receiver (for the smoke) I know it's two physico-chemical procedures that have little variation over time, my questions why shouldn't I make a low step filter before sampling? how can I sample in low frequency compared to that of the signal with a good quality of precision? I have to quote that in the report and thank you very much in advance.
and thank you wawa I didn't pay attention in the datasheet I'm going to power it in 5v.

If you insist on using an opamp (I would give you a minus for that), then use at at least a 10k resistor between opamp output and analogue input. Without that you could fry the input of the MCU.

Many samples, and averaging them, is the same as a low-pass filter.
Read up about smoothing code and circular buffers.

You should only use a 10-100n ceramic cap from analogue input to ground, close to the processor, to filter out RF noise.
Leo..

+1
Good point. Actually no need to use a buffer, input resistance of ADC is high in comparision to NTC and resistor of voltage divider.

You can. Matter of fact according to sampling theory you have to (provided the signal can contain frequencies above half sampling frequency).
Additionally you may add some digital smoothing.

thank for every one for yours helps, the filter does its job successively (with lm358 5v vcc ) i visualise the input and the output of the filter and i made a noise on ntc, the output is more smooth then input, secondly the noise present in the analog read with or without filtering is a thermal noise in addition with a small contification noise, these noises present during the analog to didital conversion stage will be filtred after with an FIR or IIR digitals filters.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.