Skip to main content
EEtxe.1
Associate
October 13, 2020
Solved

Using an ADC how can I make the value of Vref- depend on the value of another input on a STM32H742 chip?

  • October 13, 2020
  • 4 replies
  • 1270 views

I need to implement an ADC to measure phase voltages, so I want to set the N phase as Vref- and get the values of other 3 phases (comparing with N phase) on the output of the ADC. I am using single-ended mode.

Is it possible to do this? How can I do it? 

Chip Number: STM32H742

This topic has been closed for replies.
Best answer by TDK

VREF- is always connected to VSS, so you can't change it. You could use the ADC in differential mode and hook up the N phase to one side. Or you could convert 4 channels quickly and do the math to find the difference between. In the latter case, you will have some error introduced by the delays between samples. May or may not be a problem depending on the frequency of the phases.

Be aware that all inputs to the ADC need to be within VREF- (VSS) and VREF+ (usually VDDA = VDD). You may need resistor dividers to ensure this happens.

4 replies

TDK
October 13, 2020

Include your chip number.

"If you feel a post has answered your question, please click ""Accept as Solution""."
EEtxe.1
EEtxe.1Author
Associate
October 14, 2020

Sorry, the chip number is STM32H742.

TDK
TDKBest answer
October 14, 2020

VREF- is always connected to VSS, so you can't change it. You could use the ADC in differential mode and hook up the N phase to one side. Or you could convert 4 channels quickly and do the math to find the difference between. In the latter case, you will have some error introduced by the delays between samples. May or may not be a problem depending on the frequency of the phases.

Be aware that all inputs to the ADC need to be within VREF- (VSS) and VREF+ (usually VDDA = VDD). You may need resistor dividers to ensure this happens.

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
October 14, 2020

Beware, the common mode voltage of STM32 ADC in differential mode does not span the entire VREF-..VREF+ range, sometimes being specified as VREF/2 +-10%. See Datasheet.

Don't ask me, why.

JW