Just set up a replacement "Piduino" - a RPi3 connected by USB to an Arduino Uno. The previous one was the victim of a Diet Big Gulp - spilled on the voltage divider breadboard. Whoops. The tiny breadboard with the voltage divider began to rust inside so it got really difficult to keep it working correctly.
This is for the plot named "Indoor 12V Lighting System" at https://www.SDsolarBlog.com/montage
I built a new Uno/breadboard from scratch and swapped it in with the breadboard stuck onto the plastic case. All nice and tidy.
But the analog inputs were really strange. It would read really close, but then minor changes to the software would produce wildly varying results.
Imagine my surprise when this morning I discovered that I had plugged the divider's analog input to A4 instead of to A1 where it belonged.
Now that it has been fixed all is well. As long as the correct pin is being used in the
digitalRead it seems not to matter, perhaps.
Here is the plot from before then after I moved the input to the correct location:
The actual voltage was falling from 12.7 down to 12.5, and after moving the pin it settled down to the correct reading. Then I turned on the charger while the sun is up. It is tracking the voltmeters perfectly now.
Clearly, the problem was that I was reading the wrong pin. My fault, obviously. But it got me wondering just how much they affect each other.
So my question is about why I was getting any readings at all? I would have hoped that the analog inputs were truly separate from each other. Instead, it appears as if there is crosstalk of some kind.
Is this a common issue?
I see that it has been pointed out that this was discussed in this Q&A:
But since that does not call it an imperative, just "one of the problems with using analog" I would have assumed that this is not common, so perhaps there is an implied answer there.
It would be a project all by itself to use half the small breadboard to distribute ground to all the other analog pins. And I've never seen this referenced in any of the documentation. Nor is there a tag for crosstalk.
So my question still stands: Is this common when measuring a DC voltage?