cancel
Showing results for 
Search instead for 
Did you mean: 

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

EEtxe.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

4 REPLIES 4
TDK
Guru

Include your chip number.

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

Sorry, the chip number is STM32H742.

TDK
Guru

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".

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