cancel
Showing results for 
Search instead for 
Did you mean: 

Insights on possible values for ADC input voltage swing using external VREF

Chubs
Associate III

Hello Community,

We are designing a simply cost sensitive Temperature sensing solution using low-cost Linear Thermistors TMP61Q1 from TI, and wish to use the internal ADCs on STM32G474RCT3 MCUs, this is an LQFP64 package with a dedicated VREF Buffer Pin which can drive output loads at 2.048V, 2.5V, 2.9V with 6.5mA.

We wish to understand in detail, can we use this VREF BUFF pin and add an external voltage reference of say 1V & then reduce the ADC input voltage swing to 0-1V for the entire 12-bit dynamic range?

Or can we set the VREF Buffer to 2.048V & use the ADC with VREF Internal channel such that the ADC Voltage swing becomes 0 to 2.048V for entire 12-bit range?

Or can we simply supply VDDA 1V & keep the ADC maximum voltage swing between 0 to 1V for the entire 12-bit resolution?

Chubs_0-1691158017477.png

 

Kindly guide us with this use case, as the sensor output has a limited voltage swing & using a non-inverting amplifier is not a feasible option cost-wise.

Both I & my team are fairly new to the Analog circuit design & are looking forward for a good starting point to understand the ADCs on STM32G474 from the community.

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
Nikita91
Lead II

On default VREF+ pin in an input. You can connect an external reference to this input, then the max level for the ADC input is the VREF+ voltage. EDIT: You can't use an external référence of 1V.

The VREFBUF is not a pin but a switch to connect the internal reference voltage to the VREF+ pin.

The VREFBUF is used to set the VREF+ pin as output. The max level for the ADC input is also the VFERF+ voltage.  In this mode the allowed VREFBUF voltage depends on the VDDA voltage.

In your case  you must use an external reference connected to the VREF+ pin and ignore VREFBUF.

View solution in original post

14 REPLIES 14
TDK
Guru

There are limits on the range of allowable voltages on VREF+ which can be found in the datasheet. If you are tying VDD to VDDA, generally it's going to be limited to 2V+.

TDK_0-1691157893031.png

If you handle VDDA separately, you can get down to 1.62V.

TDK_1-1691157952404.png

In either case, you can't get down to 1V for the entire 12 bit swing.

https://www.st.com/resource/en/datasheet/stm32g474cb.pdf

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

Also be aware that the internal temperature sensor will measure the junction temperature of the chip, not ambient temperature. Even under low power settings, there can be a significant delta between the two.

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

We do not intend to use the internal temperature sensor, we are using 4 x external TMP61 thermistors for remote sensing, & these sensors when used with Voltage divider design have a very low voltage swing over entire temperature range.

Thanks for your inputs @TDK .

Chubs
Associate III

Idea is to use reduce the input voltage swing of the ADC from 0-3.3V to a lower range to maximize the ADC dynamic range use.

Now can we simply set the VREF Buffer to 2.048V range & use this as a reference of ADC 1 while keeping the Vdda as 3.3V for other ADCs to have a complete input voltage swing of 0-3.3V?

This could provide us with:

ADC1: 0 to 2.048V
ADCx: 0 to 3.3V

Is this a valid line of thought?

Nikita91
Lead II

On default VREF+ pin in an input. You can connect an external reference to this input, then the max level for the ADC input is the VREF+ voltage. EDIT: You can't use an external référence of 1V.

The VREFBUF is not a pin but a switch to connect the internal reference voltage to the VREF+ pin.

The VREFBUF is used to set the VREF+ pin as output. The max level for the ADC input is also the VFERF+ voltage.  In this mode the allowed VREFBUF voltage depends on the VDDA voltage.

In your case  you must use an external reference connected to the VREF+ pin and ignore VREFBUF.

MasterT
Senior III

No needs to lower Vref, your IC has:

"6 x operational amplifiers that can be used in
PGA mode, all terminals accessible"

There are also app. note from ST - AN5306 explains how to use OPA

Hello @Nikita91@MasterT 

Can we keep the VREF+ for different ADCs different on the same STM32G474? We have a total of 5 ADCs on this MCU & wish to configure different input voltage swing on these ADCs for maximum flexibility.

Consider the following use case that we want to achieve:
VDDA: 3.3V
VREFBUFF: 2.048V
VREF+ Pin: 1V from external source
ADC1: 0 to 1V range
ADCx: 0  to 3.3V range

Kindly guide with references that describe how to use these pins to maximize the flexibility of interfacing different Analog signals to the ADCs.

Nikita91
Lead II

You can't use VREFBUF and external référence at the same time.

There is only one reference for all ADC channels.

Temperature acquisition is slow. One can imagine switching external references to VREF+. But you say you are reluctant to add external components.

As @MasterT  points out you can use one of the MCU's internal OPAs and a PGA to amplify the only problematic channel: ADC1.

Chubs
Associate III

Hello @Nikita91 & @MasterT,

Thank you for your suggestions & insights, it helps me gain better clarity about the ADC use cases.

Kindly guide me based on the following use case:

I'm considering setting the internal reference voltage buffer (VREFBUF) to 2.048V and the ADC supply voltage (VDDA) to 3.3V. My goal is to configure each ADC to use either VREFINT (which would be set by VREFBUF of 2.048V) or VDDA (which is 3.3v) as the reference voltage independently.

From my understanding of your guidance, the Reference Manual (RM0440), each ADC can independently select its reference voltage by programming the VREFEN bit in the ADCx_CCR register. If VREFEN is set to 1, the ADC uses VREFINT as its reference voltage (thus 2.048V), and if VREFEN is set to 0, the ADC uses VDDA (thus 3.3V). This implies that each ADC can have a different full-scale voltage range, depending on the value of VREFEN.

So in theory, I could configure some ADCs to have a 0 to 2.048V range (by setting VREFEN to 1 for those ADCs) and other ADCs to have a 0 to 3.3V range (by setting VREFEN to 0 for those ADCs). Is this understanding correct?

Is this the correct approach?

(The issue with the OPAMPs is we do not have those pins available anymore, I only have ADC1 & ADC2 pins accessible)