AnsweredAssumed Answered

STM32F100C4T6B Optimizing ADC Sample Time to Reject Noise

Question asked by dcharlan on Apr 10, 2013
Latest reply on Apr 10, 2013 by baird.hal.001
Hello all,

I am using an STM32F100C4T6B in the battery pack of an uninterruptible power system for the purpose of measuring the battery voltage, current, and temperature. When the UPS is operating from battery it’s dc-dc converter produces high frequency repetitive noise which is induced on the battery current ADC measurement input of the STM32F100C4T6B.

The noise induced on the battery current ADC input has the characteristic of a 20MHz ringing type noise event which has a duration of approximately 200nS, and this event repeats at approximately regular intervals of 4uS.  See the attached pdf file showing the noise waveform.

So, my question is: Is there an optimal setting for the STM32F100C4T6B’s ADC that would help to better filter out this noise ?

Does the ADC’s sample-hold internal circuitry peak charge an internal capacitor, thus capturing the peak of the ringing noise event, or will the the internal sample-hold capacitor integrate the input noise over the sampling time ?

I presently have the sampling time configured for the maximum of 239 clocks, which is approximately 20uS.  So, will this in theory integrate the noise event over a longer sampling time, thus integrating out the peaks and minimums, or would it be better to configure the ADC to sample as fast as possible, i.e. 125nS sampling time, so as to attempt to sample the peaks and minimums of the noise event on separate conversions and then apply additional filtering using a firmware averaging type filter to eliminate the noise ?

My present code has a 20uS sampling time and measures 3-channels, battery voltage, current, and temperature, in a multi-channel continuous scan mode.  The DMA controller automatically pushes the ADC conversion result data to an array in ram.  A 177 sample coherent averaging filter is applied in the firmware so as to smooth the measurements, thus eliminating most of the effect of the noise.

I’m really looking to see if anyone has suggestions or recommendations for a more optimal method of rejecting the noise I’m experiencing on the battery current measurement ADC input in my UPS application.  I want to know more details of how the STM32F100C4T6B’s internal ADC and sample-hold circuitry actually functions.