Undersampling with a microcontroller ADC
Analog-to-digital converters on microcontrollers aren't usually meant for high-frequency signals. The most common use case is a temperature sensor or something slow moving like that where you don't need a really high sample rate. At best you might want to sample audio signals. VESNA for instance has an ARM STM32F103 microcontroller that does at most 1 Msample/s.
The digital bandwidth of this ADC is limited to 500 kHz, half of its sampling frequency as per Shannon sampling theorem. However the theorem also says that you can undersample a band limited signal that is centered around an arbitrarily high frequency. In practice of course, you are limited with the analog bandwidth of the signal path in front of the analog-to-digital conversion.
The analog bandwidth isn't specified anywhere in the datasheets (at least nowhere I could find it). So I attempted to measure it using a signal generator and a simple bias circuit in front of an analog input pin of the microcontroller.
The ADC was set to the maximum settings possible.
Below is an amplitude Bode plot of the system I measured:
This shows that the -3 dB frequency is surprisingly high, at around 42 MHz. This is not something I expected - I thought the roll-off would start not much beyond the Nyquist frequency. Also, the specified sampling time of 0.11 μs gave me the impression that the analog bandwidth would be below 10 MHz. Actually, above 10 MHz the attenuation I saw might as well come from stray capacitances in the circuit and not from the converter itself.
Also interesting is the slight dip in amplitude between fs and 2fs. I'm not sure what is happening there. It is reproducible over two different microcontrollers.
If these measurements are correct this makes for interesting possibilities of using the ADC on VESNA for sampling band-limited high-frequency signals.
A signal at k times fs sampled with fs appears as a DC signal. So with the right amount of bad luck you can end up with any DC value between -A and A where A is the amplitude of the input signal. Your frequency is probably not exactly k fs so the signal ADC "sees" is a very low frequency signal which again can be misinterpreted as a signal with amplitude smaller than A. At least that's my guess.