Author Topic: ESP32: VDD or VDD3P3 as voltage reference  (Read 1403 times)

0 Members and 1 Guest are viewing this topic.

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 249
  • Country: fr
ESP32: VDD or VDD3P3 as voltage reference
« on: February 08, 2025, 05:11:51 pm »
Hello!
I'm quite a novice in the enchanted world of MCU.
While exploring Esp32 MCUs' and their dev boards' respective datasheets, I found out that as VDD is the power source for the MCU (what typically comes from a voltage regulator), VDD3P3 is VDD but filtered by a capacitor and an inductor.
My understanding is that VDD3P3 is used as a voltage reference for DAC and ADC.
Therefore, when using a potentiometer or any other type of analog sensors, does this mean VDD3P3 should be used as reference? Or is it unnecessary? Or even to be avoided?
Thanks for reading!
Because "Matth" was already taken.
 

Online peter-h

  • Super Contributor
  • ***
  • Posts: 4523
  • Country: gb
  • Doing electronics since the 1960s...
Re: ESP32: VDD or VDD3P3 as voltage reference
« Reply #1 on: February 09, 2025, 07:51:14 am »
I don't know about the ESP32 specifically but lower pin count ARM32 packages don't have a dedicated VREF pin for the ADCs/DACs and use VDD. This is obviously a compromise and you will get less accuracy and more noise.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1720
  • Country: 00
Re: ESP32: VDD or VDD3P3 as voltage reference
« Reply #2 on: February 09, 2025, 11:18:14 am »
The idea of LC filter is to clean up high frequency noise from other components or switching regulators. This rail is then used as power for the ADC/DAC and a voltage reference (as is the case on my small pin count MCUs)

You can use that filtered rail to also power other analog parts, assuming it wont inject interference back into the rail of course. A steady potentiometer or stable opamps should be completely fine to add. Alternatively if BOM cost is not a big concern, you could also duplicate the LC filter circuit and that for your analog parts.

Whether its necessary is hard to say. I wouldn't expect it to influence 10-bit performance all that much. But it also depends how noisy the original power rail was and how the analog circuit was implemented.

For example a potentiometer circuit has very little "Power Supply Rejection Ratio" (PSRR). If you then buffer, amplify, etc. that signal, even with opamps that typically have very good PSRR values, it will still remain noisy signal.
You would have to clamp the bandwidth (as with almost all analog signals) to make it less noisy. That could be as simple as adding a small capacitor between the wiper terminal and ground (or whatever reference the potentiometer uses) to throw out all that HF junk, or add some RC low-pass etc.
 
The following users thanked this post: Watth

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28634
  • Country: nl
    • NCT Developments
Re: ESP32: VDD or VDD3P3 as voltage reference
« Reply #3 on: February 10, 2025, 12:32:54 am »
Which ESP32 chip is it about? The one (ESP32 S3) I'm familiar with has a 1.1V internal reference which is pretty inaccurate. So a trick I deploy is using an external supply voltage to power sensors (which outputs depends on the supply voltage)  and also measure the supply voltage itself. That way I can scale the measurement results to the supply voltage and cancel any errors due to the ADC reference voltage and supply voltage. Also keep in mind that the bottom and top part of the ADC range on the ESP32 is likely to be useless. Make sure to read the online documentation about the ADC very carefully; Espressif doesn't try to hide anything about how bad the ADC in the ESP32 is.
« Last Edit: February 10, 2025, 12:35:29 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: Watth

Online peter-h

  • Super Contributor
  • ***
  • Posts: 4523
  • Country: gb
  • Doing electronics since the 1960s...
Re: ESP32: VDD or VDD3P3 as voltage reference
« Reply #4 on: February 10, 2025, 08:14:12 am »
Unless you somehow generate a negative rail, the low end of an ADC or DAC is not going to be much good :) Same on STM32.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 
The following users thanked this post: Watth

Offline Lindley

  • Regular Contributor
  • *
  • Posts: 223
  • Country: gb
Re: ESP32: VDD or VDD3P3 as voltage reference
« Reply #5 on: February 10, 2025, 10:36:07 am »
Its well documented that the ESP32 ADC has poor performance, particularly at the top and bottom of the range.
For decent ADC  its best to add one of these little  modules, simple to use,  worked well for our needs.

 
The following users thanked this post: Watth

Online peter-h

  • Super Contributor
  • ***
  • Posts: 4523
  • Country: gb
  • Doing electronics since the 1960s...
Re: ESP32: VDD or VDD3P3 as voltage reference
« Reply #6 on: February 10, 2025, 11:45:19 am »
I use the ADS1118 which is super accurate, out of the box Vref is better than 0.1%. Zero error is basically zero.

That's an amazing price. I wonder if it is a counterfeit chip?
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 
The following users thanked this post: Watth

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16144
  • Country: fr
Re: ESP32: VDD or VDD3P3 as voltage reference
« Reply #7 on: February 10, 2025, 09:25:29 pm »
I use the ADS1118 which is super accurate, out of the box Vref is better than 0.1%. Zero error is basically zero.

That's an amazing price. I wonder if it is a counterfeit chip?

I don't think it is. The ADS1115 is currently €0.5754 per 1000 at LCSC.
 

Online peter-h

  • Super Contributor
  • ***
  • Posts: 4523
  • Country: gb
  • Doing electronics since the 1960s...
Re: ESP32: VDD or VDD3P3 as voltage reference
« Reply #8 on: February 10, 2025, 09:31:44 pm »
Yes; good point. The 1115 is a lot cheaper than the 1118. Both will be good chips for this purpose.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf