Hello,
I had some similar problems with recording data over a analog Pins
the analog pins arent that stable so by taking some samples and average it we can improve the sensors quality. For my Voltagedivider I used only one pin, First i wanted to measure over a Difference Amp but that involves extra 7805 Voltage regulator. By boosting the signal youll also improve the signals you dont want. So i left the Amp out of my design.
secondly i used 1 for loop for the calculation of a voltage divider and sampled it around 750x. the code is added in the lower section of the screen.
you can place it in the top of the Void loop.
int vn=0;
for(vn=0;vn<MAX_AV_READ_VOLTAGE;vn++)
{
Volt +=analogRead(pin2);
}
Volt/=MAX_AV_READ_VOLTAGE;
VCalc = Volt * 0.054985713;
more is less.
sincerly yours
B