4
\$\begingroup\$

I'm interested to sample an AC signal in the range of 5kHz - 20KHz with the STM32L432KC microcontroller. This microcontroller has a hardware oversampling feature, i.e it can take the average of several ADC samples without CPU overhead, increasing the number of bits.

The ADC runs at full speed (5.33 MSPS) when in oversampling mode. With an oversampling rate of x64 I should get 15bits of resolution at 83kS/s although the ADC is only 12bits.

My questions about designing the ADC driver are:

  • Should I design the ADC driver so that it can drive the ADC at 5.33MS/s although my signal is only 20kHz? I ask because the ADC is a SAR type and the internal capacitor needs to be charged quick enough.

  • Should I design the ADC driver for 15bits although the ADC only has 12bits?

EDIT:

I attached a snippet from the datasheet + schematic of an ADC driver. My main question is how fast does the ADC driver need to be, the signal changes much slower than the ADC is sampling.

ADC input impedance

ADC Driver

\$\endgroup\$
  • \$\begingroup\$ Your driver needs to be able to drive the load the ADC represents at 5.33 MS/s. But the analog bandwidth doesn't have to be designed for 5.33 MS/s. \$\endgroup\$ – Arsenal Aug 22 '17 at 10:59
  • \$\begingroup\$ At 5.33MSPS, the sampling time is ~31nS. This means the driver needs to be able to charge the internal capacitor from 0V to Vref within 31nS (worst case) ? \$\endgroup\$ – sled Aug 22 '17 at 11:05
  • \$\begingroup\$ Look at table 62 in the datasheet. Input impedance should be less than 50 kohm, input capacitance is typically 5 pF. Just make sure your driver can drive 5 pF without significant signal loss and you're done. \$\endgroup\$ – Bimpelrekkie Aug 22 '17 at 11:06
  • 1
    \$\begingroup\$ If this is a true average, it will have a nasty frequency response, so expect higher-frequency components of the signal to be distorted. \$\endgroup\$ – Simon Richter Aug 22 '17 at 11:55
  • 1
    \$\begingroup\$ The capacitor for the reliable results must to be charged quicker than that minimum calculations. IMO you should consider if you really need the 15 bits resolution and if your input circuit is precise enough for it. In most designs I see that people care about the resolution, but do not about the quality of the signal provided. And eventually they end up with the practical (real) 5-8bits resolution. It is same as very high resolution of the digital camera with low quality lenses. \$\endgroup\$ – P__J__ Aug 22 '17 at 13:04
1
\$\begingroup\$

You design the buffer amplifier to fit your signal, not the sampling rate of the ADC. But the buffer's output impedance has to match the ADC's input impedance requirements at the sampling frequency.

As a side note: Oversampling will reduce noise (which the STM32 ADCs have a lot of) but not the non-linearities of the ADC. You will still get just 12bit resolution, but with less noise.

\$\endgroup\$
  • 1
    \$\begingroup\$ "You will still get just 12bit resolution" no, you get the 15 bits. Even if the output is only accurate down to 12 or fewer bits or due to adc nonlinearities, it will have a resolution of 15 bits. \$\endgroup\$ – jms Dec 5 '17 at 9:43

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.