adc reading huge variation
Posted: 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?
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?