Using an ADC how can I make the value of Vref- depend on the value of another input on a STM32H742 chip?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-13 8:43 AM
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
Solved! Go to Solution.
- Labels:
-
ADC
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-14 6:25 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-13 4:21 PM
Include your chip number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-13 10:31 PM
Sorry, the chip number is STM32H742.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-14 6:25 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-14 7:26 AM
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
