cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 ADC differential mode, using Vref/2 as INN ?

ADesp.1
Associate II

Hello, 
Just a quick question as I need confirmation :
Using a STM32H7 ADC in a differential input mode, does this circuit work ? 

ADesp1_1-1752243111385.png

 

The output of the op-amp is Vout = G * (Vin[+] - Vin[-]) + 1.65 .
Then the ADC output should be between :

  • [0 - INT16_MAX] when op-amp output is between 1.65V and 3.3V.
  • [INT16_MIN - 0] when op-amp output is between GND and 1.65V.

But from the datasheet it says that CMV (average between INP and INN) should be around Vref+/2. I'm not sure that's true here.
So can you confirm this wont work and I should do single-ended and substract 1.65V from the result ?

Regards, Adrien

 

2 REPLIES 2
waclawek.jan
Super User

Is the "opamp" in the above schematics a gain-block, i.e. an amplifier with a built-in feedback set to a fixed gain?

> can you confirm this wont work

ST won't guarantee ADC parameters if the common-mode voltage is outside the datasheet-prescribed range (i.e. close to VREF+/2). 

> should do single-ended and substract 1.65V from the result ?

Yes.

But you always can connect the nominally 1.65V node to another input of ADC, perform two single-ended conversions and subtract them in software. This compensates for the possibility that voltage at that 1.65V node is not exactly 1.65V, e.g. due to tolerances of parts used.

JW

> [0 - INT16_MAX] when op-amp output is between 1.65V and 3.3V.

> [INT16_MIN - 0] when op-amp output is between GND and 1.65V.

In differential mode, this won't be the case. It'll only be 0 when signal is 0 and INN is 3.3V. If INN if fixed, you lose half of the output range. Output is an unsigned integer, not signed.

 

I've used differential mode when the common mode is not fixed at VREF+/2 and have not noticed any degradation in performance, but as you saw it doesn't match the datasheet. Up to you if you're willing to live with the uncertainty.

 

Using single ended mode here to capture both and subtract makes the most sense.

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