ADC2_VREF routed to a gpio pin lowers voltage 10mv under a ~800K Ohm load

tastynaysty
Posts: 2
Joined: Mon Sep 07, 2020 2:59 am

ADC2_VREF routed to a gpio pin lowers voltage 10mv under a ~800K Ohm load

Postby tastynaysty » Mon Sep 07, 2020 3:08 am

I want to use ADC2 VREF as the voltage source for a divider circuit that I will then read with ADC1. I use the following to accomplish the routing of the vref to the gpio.

Code: Select all

    esp_err_t status = adc2_vref_to_gpio( GPIO_NUM_25); 
When this pin is floating the voltmeter reads it at 1.112 but reads at 1.102 when I attach two voltage divider circuits that are about 1.56M OHMS each so about 800K Ohms from gpio25 ==> Ground . I have a unity gain op amp to make sure that reading by the ADC should not impact the circuit. Is it inadvisable to apply any load to this pin when the adc2_vref is routed to it? Should I just add another op amp at the output of gpio25?

ESP_Sprite
Posts: 4011
Joined: Thu Nov 26, 2015 4:08 am

Re: ADC2_VREF routed to a gpio pin lowers voltage 10mv under a ~800K Ohm load

Postby ESP_Sprite » Mon Sep 07, 2020 7:38 am

Yeah, I would not load that pin; just throw an unity gain amplifier at it and you should be good.

tastynaysty
Posts: 2
Joined: Mon Sep 07, 2020 2:59 am

Re: ADC2_VREF routed to a gpio pin lowers voltage 10mv under a ~800K Ohm load

Postby tastynaysty » Mon Sep 07, 2020 7:32 pm

ESP_Sprite wrote:
Mon Sep 07, 2020 7:38 am
Yeah, I would not load that pin; just throw an unity gain amplifier at it and you should be good.
Ok that makes sense to me. It felt a bit hack to put a load on it :).

If the value I measure at this pin without a load does not match the value burned into the efuse that sets vref is there a way to override that value so that I can give it a more accurate readings? I am seeing the estimates generated by

Code: Select all

 esp_adc_cal_raw_to_voltage(reading, adc_chars);
Return values that are always about 10mv too high and I am wondering if this is due to the fact that the efuse is not the same as that which I read from routing adc2 to gpio.

ESP_Sprite
Posts: 4011
Joined: Thu Nov 26, 2015 4:08 am

Re: ADC2_VREF routed to a gpio pin lowers voltage 10mv under a ~800K Ohm load

Postby ESP_Sprite » Tue Sep 08, 2020 6:52 am

Yes, I think there is an ESP-IDF call somewhere to set a custom vref voltage.

Who is online

Users browsing this forum: Google [Bot] and 31 guests