adc reading huge variation

Neywiny
Posts: 1
Joined: Fri Oct 05, 2018 5:17 pm

adc reading huge variation

Postby Neywiny » Sun Sep 15, 2019 4:26 pm

I have a potentiometer hooked up onto pin 33 of my huzzah, "analog input A9 on ADC #1. It can also be used to connect a 32 KHz crystal." (adafruit pinout)

I use ADC 2 for my wifi stuff so even if switching ADC would work for reading voltages it would not work for my application. For testing I'm just sending the adc value over serial from the ReadAnalogVoltage sketch with a 100ms delay and revised scaling factors.

With almost 800 samples I'm seeing a variation of ~0.11v. I've measured the pin with my multimeter, it's stable to the millivolt so 110mV is on the ESP not the circuit. I've tried setting the attenuation, I did the analogSetCycles up to 255, no improvement. I don't really know where to go from here.

Now admittedly I am reading ~2.7v on my 3.3v output from the board, which may be causing something but it's also consistent to the millivolt range so it should at least give a consistently wrong value, right?

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: adc reading huge variation

Postby ESP_Dazz » Thu Oct 10, 2019 3:41 am

Have a look at the ADC calibration library. Although it's part of ESP-IDF, these functions should still be callable as long as you include the library's header file in your sketch.

Who is online

Users browsing this forum: No registered users and 91 guests