4 Channel voltmeter

I’m playing around in making a 4 channel voltmeter using an ADS1115 (16bit ADC), The idea is I want to monitor 4 6V batteries that are wired in series to give 24V output. My thought was take a tap of each battery through a resistor divider and subtract Battery 1 from Battery 2 and so on, So far I’ve only added 2 batteries (The others will be added). This seems to be working but with a slight glitch when battery 1 start to decrease battery 2 readings drop slightly lower then back to what it was reading in the first place.
I want to be able to store the minimum readings from each battery which I will need to add the code for that which should be easy enough.
But the trouble I know I will have is battery 2 will actually read lower than the voltage dropped to giving false readings.
This is what I get from the serial port which is sent out every .5 seconds, only battery one voltage is been altered so far just for testing has you can see form the data been sent battery 2 drops then back to normal.

--------------------------
BATTERY 1: 6.59
BATTERY 2: 6.43
--------------------------
BATTERY 1: 6.59
BATTERY 2: 6.43
--------------------------
BATTERY 1: 6.59
BATTERY 2: 6.43
--------------------------
BATTERY 1: 6.59
BATTERY 2: 6.43
--------------------------
BATTERY 1: 6.59
BATTERY 2: 6.43
--------------------------
BATTERY 1: 6.57
BATTERY 2: 6.45
--------------------------
BATTERY 1: 5.75
BATTERY 2: 6.34
--------------------------
BATTERY 1: 5.36
BATTERY 2: 6.36
--------------------------
BATTERY 1: 5.04
BATTERY 2: 6.36
--------------------------
BATTERY 1: 4.62
BATTERY 2: 6.35
--------------------------
BATTERY 1: 4.15
BATTERY 2: 6.35
--------------------------
BATTERY 1: 3.70
BATTERY 2: 6.29
--------------------------
BATTERY 1: 3.21
BATTERY 2: 6.23
--------------------------
BATTERY 1: 3.00
BATTERY 2: 6.43
--------------------------

This is my code so far

#include <Adafruit_ADS1015.h> //Include the libarary for 16Bit A/D converter
#include <Wire.h>  //Needed for I2C tft
#include <LiquidCrystal_I2C.h>
#define AVG_NUM 16   //Number of samples to take for ADC reading
Adafruit_ADS1115 ads;  /* Use this for the 16-bit version */
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address
#define ENABLE_SERIAL // Enable only for debugging 
float refresh_rate = 500UL;// * 60UL; send out every half second
unsigned long lastUpdate = 0; // Keep track of last update time
//**************************************************************************************|
int CS = 1; //Line counter
int16_t Battery1; // battery voltage 1
int16_t Battery2; ///Battery voltage 2
int16_t Battery3; //Battery voltage 3
int16_t Battery4; //Battery voltage 4
float Battery_status1; //subtract battery voltage 1 form battery 2
float Vmultiplier =  0.00188;  // used to convet readings this is calculated
float R2 = 2001.00;     // !! resistance of R2 !!
float R1 = 10000.00;     // !! resistance of R1 !!
float Sum_Battery1 ; //Stores the avergae batter 1
float Sum_Battery2; //stores the average battery 2

void setup() {
#ifdef ENABLE_SERIAL /// only used for debugging purposue
  Serial.begin(9600);
  Serial.println("");
  Serial.println("=====================================");
  Serial.println("METER TIME TEST");
  Serial.println("=====================================");
#endif //#ifdef ENABLE_SERIAL
  ads.setGain(GAIN_ONE);        // 1x gain   +/- 4.096V  1 bit = 2mV      0.125mV
  //ads.setGain(GAIN_TWOTHIRDS);  // 2/3x gain +/- 6.144V  1 bit = 3mV      0.1875mV (default)
  ads.begin();  //start the 16bit A/D converter
  lcd.begin (20, 4); // for 20 x 4 LCD module
  lcd.setBacklightPin(3, POSITIVE);
  lcd.setBacklight(HIGH);

}

void loop() {
  //Get battery 1 readings
  for (int i = 0; i < AVG_NUM; i++) {      // loop through reading raw adc values AVG_NUM number of times
    Battery1 = ads.readADC_SingleEnded(0);        // read the input pin
    Sum_Battery1 += Battery1;
    // delayMicroseconds(50);             // pauses for 50 microseconds
    Sum_Battery1 = Sum_Battery1 / AVG_NUM * Vmultiplier / (R2 / (R1 + R2));; // store sum for averaging
  }
  //Get battery 2 readings
  for (int b = 0; b < AVG_NUM; b++) {      // loop through reading raw adc values AVG_NUM number of times
    Battery2 = ads.readADC_SingleEnded(1);        // read the input pin
    Sum_Battery2 += Battery2;
    // delayMicroseconds(50);             // pauses for 50 microseconds
    Sum_Battery2 = Sum_Battery2 / AVG_NUM * Vmultiplier / (R2 / (R1 + R2));; // store sum for averaging
  }
  Battery_status1 = Sum_Battery2 - Sum_Battery1; //subtract the battery 1 from battery 2

  write_to_tft(); // Write the values to the LCD
  // only used for debugging
#ifdef ENABLE_SERIAL
  if (millis() > (lastUpdate + refresh_rate))  {
    CS = CS + 1;
    lastUpdate = millis();
    Serial.print("BATTERY 1: ");
    Serial.println(Sum_Battery1);
    Serial.print("BATTERY 2: ");
    Serial.println(Battery_status1, 2);
    Serial.println("--------------------------");

  }
#endif //#ifdef ENABLE_SERIAL
} // end loop


/* ========== dsiplay the data ============================================================= */
void write_to_tft() {
  lcd.setCursor(0, 0);
  lcd.print(Sum_Battery1, 2);
  lcd.print(" V  ");
  lcd.setCursor(0, 1);
  lcd.print(Battery_status1, 2);
  lcd.print(" V  ");


}

The question is, Is there a better method for reading from the ADS1115 or how cold I prevent capturing false data with the minimum value that I want to store ?
Thanks

But the trouble I know I will have is battery 2 will actually read lower than the voltage dropped to giving false readings.

How so?

This is what I get from the serial port which is sent out every .5 seconds, only battery one voltage is been altered so far just for testing has you can see form the data been sent battery 2 drops then back to normal.

[/quote]

So there is some cross-talk between the readings?

How are you ensuring there is no issues with grounding? Star ground?

Also have you compared the readings you get with what a multimeter says connected to the input of the ADC? I suspect the unit is correctly reading the voltage its connected to, relative to local ground, and that local ground may not be the same as the negative terminal of the batteries.

The readings are correct and stable comparing it to my fluke meter. The serial data coming in is me adjusting the battery voltage down on battery one, Because I want to be able to hold and store the minimum voltage reading of each battery on the lcd. So when battery one falls the recorded voltage is lower than the actual reading on battery 2. I have added some code to record the minimum voltage on the LCD, I will try and explain.

Battery 1 = 6.79V stable Battery 2 = 6.70V stable Overall voltage of both batteries 13.49V stable.

So when I adjust battery one to 6.15V battery 2 reading went down on battery two to 6.65V then back to 6.70V so minimum recorded voltage of battery 2 was 6.65V but battery 2 did not get altered. I think the issue is caused by the maths while it catches up with the readings with this line of code

Battery_status1 = Sum_Battery2 - Sum_Battery1; //subtract the battery 1 from battery 2

So I think it's nothing to do with the star ground or grounding the readings are stable and read the same has my fluke meter.

Here are the readings without nothing been changed so you can see how stable they are I did alter battery one slightly.

--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.69
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 6.15
BATTERY 2: 6.70
COMBINED VOLTAGE:12.84
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.66
BATTERY 2: 6.66
COMBINED VOLTAGE:12.32
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.26
BATTERY 2: 6.69
COMBINED VOLTAGE:11.95
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.25
BATTERY 2: 6.69
COMBINED VOLTAGE:11.94
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.25
BATTERY 2: 6.69
COMBINED VOLTAGE:11.94
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.25
BATTERY 2: 6.69
COMBINED VOLTAGE:11.94
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.25
BATTERY 2: 6.69
COMBINED VOLTAGE:11.94
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.25
BATTERY 2: 6.69
COMBINED VOLTAGE:11.94
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.25
BATTERY 2: 6.69
COMBINED VOLTAGE:11.94
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.25
BATTERY 2: 6.69
COMBINED VOLTAGE:11.94
BATTERY 2 MIN VOLT:6.69
--------------------------
BATTERY 1: 5.25
BATTERY 2: 6.69
COMBINED VOLTAGE:11.94
BATTERY 2 MIN VOLT:6.69
--------------------------