Anti-Aliasing Filter.

I think everyone has seen at least once on TV how the wheels of a fast-moving car rotate slowly or even turn the other way. As a child I was very curious about this, but I found the answer much later, when I started figuring out how an ADC works.

First, let's look at what an ADC has in common with a spinning wheel on a TV screen.
When watching TV we see a moving picture, but I have known since childhood that the motion comes from changing frames, of which there are 24 per second.
An ADC, in turn, digitizes a continuous signal at specific moments in time. So it becomes clear that what they have in common is
discreteness. Frames replace each other on the TV screen, and ADC samples come one after another, i.e. these processes are not continuous!!!

Now, as for the spinning wheels, let's look at two consecutive frames.
Anti-Aliasing Filter.

At first glance no questions arise and everything seems right, BUT the wheel can get from state one to state two by making 1.25 turns, 2.25 turns, 3.25 turns and so on. This is exactly the case when the wheels of a fast car turn slowly: the illusion arises because we only see the state of the wheel in the frames, but we don't see what happened between them.

Here another interesting question arises: why do we decide that the wheels are turning slowly? Maybe that's how they should turn?
And here our real-life experience of watching cars on the street helps us: based on it, we understand that the wheels really are turning slowly.

The same thing happens with an ADC: since the samples are discrete, we don't see the real signal, and the situation is similar to the one described above for the wheel: a "fast" signal will look like a "slow" one on the oscilloscope screen. In the picture below, the real signal is drawn in red and the signal displayed on the oscilloscope screen in blue.
Anti-Aliasing Filter.

But since an oscilloscope is a measuring instrument, this effect has to be fought in this case, and this is done with an anti-aliasing filter, which cuts off all frequencies above the Nyquist frequency and is often just a simple RC network. For those who don't know, aliasing is an effect that causes different continuous signals to overlap and become indistinguishable when sampled, or in other words, spectrum overlap.

But this whole article would not have been written if it weren't for the circuit below, which I came across the other day.
Anti-Aliasing Filter.

In this case a differential input is used to reduce noise, but I was interested in the purpose of the capacitor marked with an arrow. What is it for?
If the same voltage is applied to both ADC inputs, the ADC should theoretically output zero, but in practice, because of tolerances of the filter components, the ADC result will deviate from the expected value. To reduce this effect, a capacitor connecting the two inputs is installed.

P.S. After this article was published, one of the site's visitors asked why the ADC in his circuit gives an incorrect result in the middle of the range and sent me the schematic of his anti-aliasing filter.
Anti-Aliasing Filter.

To answer this question, you need to know that the ADC input is essentially a capacitor, and it is important that it can charge and discharge quickly. In this case, if the filter cutoff frequency is calculated correctly, the resistor value should be reduced by an order of magnitude so that the charge of the ADC capacitor can change quickly, and the capacitor value increased accordingly so that the filter cutoff frequency stays the same.