cancel
Showing results for 
Search instead for 
Did you mean: 

ADC DC-bias auto-adjusts above 0 volts on F4 and H7, is there any documentation?

Robmar
Senior III

Both F407 and H743 ADC input add DC-bias to AC connected inputs, very handy, but I would like to have the specifications for this feature, perhaps even a circuit diagram explaining how the MCU averages the AC input above ground as needed.

I have read the Intro to ADCs AN4861 and the datasheets but must have overlooked the relevant information.

1 ACCEPTED SOLUTION

Accepted Solutions

No, you are the one totally misunderstanding what I wrote and  making a bunch of assumptions.

Lets stop wasting each other time on this matter, I think the situation is clear.

As the application note AN2834 for ST ADC's states, the devices have limitations, not all of which can be solved End.

View solution in original post

28 REPLIES 28
TDK
Guru

There's no internal DC bias happening except through the protection diodes, though I wouldn't really call that DC biasing. You need to DC-bias the signal after the AC coupling capacitor with a resistor bridge.

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

We have DC bias resistors on the boards but it works perfectly without.

The protection diodes will of course stop currents from negative voltages entering the chip, but how would they raise the pin voltage by in our case, 0.6 volts?

 

ADC sampling capacitor is during conversion charged to an unspecified potential (maybe VREF+/2, maybe not, I am not an expert), which it then dumps into your decoupling capacitor. Under certain circumstances that might mimic DC bias.

JW

Sure, but as the topic states, I'm looking for technical facts, not gossip!! haha.  This needs to be detailed, and I can't find any real details on the ADC input circuit.

Thinking about this, the sampling capacitor is charged by the positive current from our input signal due to diode protection, which is always half the average signal voltage.

That would then automatically bias our AC input signal to just were it's needed regardless of amplitude (up to Vref/2 of course).

In that case, why even bother with bias resistors?

But how can the pin voltage shift positive as it's blocked by the protection diode, no?

TDK
Guru

The protection diodes won't do that, but a floating input will be influenced by any number of things. You're probably primarily seeing:

  • Injected current from sampling switch (see section 4.4 in pdf, especially 4.4.4)

https://www.st.com/resource/en/application_note/an2834-how-to-optimize-the-adc-accuracy-in-the-stm32-mcus-stmicroelectronics.pdf

That, plus the protection diodes, will cause the voltage to drift to somewhere above GND. How much depends on circuit capacitance, sampling time, and other things.

Also note that nothing is truly isolated, so there will exist a path to GND or VCC or some other voltage which will slowly cause the voltage to drift.

If you feel a post has answered your question, please click "Accept as Solution".
Robmar
Senior III

Okay, hard facts, thanks.

So that app note says the ADC input circuit is "not perfect" that the input switch has capacitance on the two transistors, and "Practically the firmware must not program the ADC in continuous mode but only in single mode and must ensure that there will be a time gap between conversions with duration
equal to tC."

So and how can we do that when sampling two signals at 384 KHz?

Robmar
Senior III

We do of course have to use DMA for the sampling of the two streams because we don't have the option to use the H743 as an ADC, it has to earn it's keep handling many noisy tasks from updating the external LCD via LTDC over 16 lines (RGB565), and run USB coms and audio.

You're going to tell me there is no solution I think.  Still it is very convenient that the voltage "slowly drifts" to the centre of our AC signal voltage, almost by design!

Our DC bias correction code works on each batch of samples, so corrects as it goes, of course if we centre bias the input signal to VDD/2 (1.65v) then the offset will be fixed.

Of course the bias resistors will add noise to the input signals, so what is the down-side of letting it automatically centre the DC offset?

 

That wasn't a blanket requirement, but rather a suggestion to solve a specific case. There are other solutions suggested as well.

If you're happy with the quality of the data coming in without DC biasing, and the risks that come with it, you can get away without it. Take care to limit the amount of injected current to datasheet limits. Without DC biasing, you won't know exactly where the input range is and can cause the signal to be outside of the limits. Particularly startup/shutdown or other spikes could cause issues. The protection diodes will only bring it up to around -0.3V (or down to (VDDA + 0.3). Maybe it'll work for a while and fail. Maybe it'll work forever. Up to you if you want to accept that risk.

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