I am struggling to get the ADC on my Arduino UNO to take consistent analogue readings, even when connected directly to ground or 5V. Here is an image from Serial Plotter of what I am typically receiving when a wire is directly connected between 5V and A3 (where I am measuring from).
I have tried this with two different Arduino's, both powered from my laptop, and both are suffering from the same problem. I have also measured the voltage from the potentiometer with my oscilloscope and ensured that it reads the correct voltage, which it does with only 20mV peak-to-peak due to noise. I have also tried software averaging, but this approach feels like it isn't targeting the root of the problem and I would prefer to be able to accurately take measurements without hundreds of individual readings.
Could this be an issue with the ADC itself, my code, or purely unavoidable noise from my environment?
My code and connections can be seen in this Wokwi project, which seems to be functioning exactly as intended.
12 posts - 7 participants