cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F302 ADC Pin Negative Injection Current

vielster
Associate II

Recently started working on an STM32F302, and am having a really odd issue with the ADC. It seems that there is current coming out of the ADC pin. We have a 10k resistor with an anti-aliasing filter feeding the channel, and we see current flowing out from the ADC through the resistor. This manifests as voltage "surges" on the ADC channel. We can measure this electrically with a DMM or o-scope on the pin.

If we add channels multiple times to the sequence, the current increases, and if we remove the channel from the sequence entirely, the current goes to zero. Additionally, it does appear to be worse, not dependent on the channel, but where the channel falls in the sequence of samples.

The current values seem small (on the order of 20μA), so this can be alleviated somewhat by decreasing the impedance of the sensed input, and eliminated completely by buffering the input, but obviously this is not ideal. Do you have any recommendations on ways to address this that don't involve major hardware changes?

7 REPLIES 7
TDK
Guru

Sounds like charge injection when the multiplexer switches channels.

You can sample for a longer time which will mitigate it. No solution to avoid it other than buffering which you’ve mentioned.

Also see AN2834 in the event your input drops below ground.

If you feel a post has answered your question, please click "Accept as Solution".
vielster
Associate II

That was our initial thought as well. However, we have updated the sequence to simply stay on a single channel, and increased to the max sample time, and rather than improving, it actually gets worse. We also updated the sequence to have a channel with high voltage inserted between sampled channels (which if it is current coming through the mux when switching, we assumed should make this worse) and the behavior stayed the same.

> This manifests as voltage "surges" on the ADC channel.

The ADC behaves as a 6-10pF capacitor, which during conversion (i.e. ADC clock / (number of samples + a few cycles)) is disconnected from the input pin and charged internally to VREF/2, and then when conversion finishes, connected to the input pin for the duration of sampling period through a few tens of ohms switch. So, from a high impedance source with zero voltage, you'll see pulses at the rate of the sampling, flowing out of the pin; if the source is at VREF, current should flow into the pin; and if the source is approximately at VREF/2, pulses should diminish.

Is this what you observe?

JW

With our 10k input impedance, even at 10pf, I'd expect that to settle out very quickly. At 1MHz, that's still 10 time constants, and we're only sampling at something on the order of 15KHz (slowest setting).

Additionally, I could buy this if it were (a) consistent over time and we simply saw a consistent bias that decreased as we approached vref/2 and (b) happened on the channel no matter where it is in the sequence. However, we see the amount of current vary over time scales on the order of seconds, and the severity is changed by changing the sequence of the pins being sampled.

This is our first time working with the F302 mixed signal series (fairly new), and haven't seen anything like this on previous implementations, so we're just a bit confused.

We're planning to do some higher speed sampling of the hardware, and get more high rate data from the ADC today to see if it gives us anything else to go on. I'm concerned that it's just an artifact of the F302 hardware, and we'll need to move to low impedance sources, but maybe we'll find a solution.

Thanks for the help. Any additional insight is welcome.

Did you actually look at the pin using a fast enough oscilloscope?

JW

Yes, we've been using a 50MHz scope for capture. We took a brief look yesterday, and do see obvious pulses on the o-scope at the sampling rate, but they are not even close to the magnitude we are seeing in the samples (we see 10s of mV of drift).

We've been able to limit this effect by reducing the frequencies as much as plausible, so not sure how much time we're going to spend on this in the near term, but we'll undoubtedly get back to it when we go through our re-spin discussions, at which point I'll try and get some more detailed captures and such up for more discussion.