ESP32: VDD or VDD3P3 as voltage reference - Page 1
Forum section: electronics / general

author: Watth
author_rank: Frequent Contributor
timestamp: February 08, 2025, 05:11:51 pm
content: 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!

author: peter-h
author_rank: Super Contributor
timestamp: February 09, 2025, 07:51:14 am
content: 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.

author: hans
author_rank: Super Contributor
timestamp: February 09, 2025, 11:18:14 am
content: 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.

author: nctnico
author_rank: Super Contributor
timestamp: February 10, 2025, 12:32:54 am
content: 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.

author: peter-h
author_rank: Super Contributor
timestamp: February 10, 2025, 08:14:12 am
content: Unless you somehow generate a negative rail, the low end of an ADC or DAC is not going to be much goodSame on STM32.

author: Lindley
author_rank: Regular Contributor
timestamp: February 10, 2025, 10:36:07 am
content: 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.

author: peter-h
author_rank: Super Contributor
timestamp: February 10, 2025, 11:45:19 am
content: 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?

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 10, 2025, 09:25:29 pm
content: Quote from: peter-h on February 10, 2025, 11:45:19 amI don't think it is. The ADS1115 is currently €0.5754 per 1000 at LCSC.

author: peter-h
author_rank: Super Contributor
timestamp: February 10, 2025, 09:31:44 pm
content: Yes; good point. The 1115 is a lot cheaper than the 1118. Both will be good chips for this purpose.