Using a simple multimeter to measure the volts of the battery:Can you explain in more detail?
1/15/17 4.19v --> 1/14/19 3.64v readVcc() reports 3.24v
1/14/17 4.18v --> 1/14/19 3.65v readVcc() reports 3.26v
It is odd that the Moteinos report different volts via the standard readVcc() and it's been this way the whole time. Not sure why there would be a 0.02v difference???
int readVcc() { // return vcc voltage in millivolts
long result;
byte saveADMUX;
// Read 1.1V reference against AVcc
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Convert
while (bit_is_set(ADCSRA, ADSC));
result = ADCL;
result |= ADCH << 8;
result = 1126400L / result; // Back-calculate in mV
int t = (int)result;
ADMUX = saveADMUX; // restore it on exit..
return t;
}
See page 314 of the data sheet for the Atmel 328 and you will find the internal reference voltage, aka the band gap voltage specification is that it is 1.0V min to 1.2V max 1.1V typical.
This is the internal reference voltage you are using for the ADC reference. Since there is a little discrepancy, I would suspect your bandgap voltage is not exactly 1.1 V.
I recall reading elsewhere that the band gap voltage varies from chip to chip, but is pretty stable. So if one wants the most accurate results, one needs to measure/calculate the band gap voltage of the device in question and account for that in software.