Issues with Millis function and sensors

/////////////////////////////////////////////////////////////////////////////////////
////////////////////////////EC Sensor Library////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////

#include "DFRobot_EC.h"
#include <EEPROM.h>
#define EC_PIN A1
float voltage,ecValue,temperature = 25;
DFRobot_EC ec;


/////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////LCD Library///////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
#include "Arduino.h"


const byte switchState = 0;
const int pump1 = 2;           //for PH down
const int pump2 = 3;           //for nutrients (EC / PPM)
const int pump3 = 4;           //for PH up
const int pump4 = 5;           //for nutrients circulation
const int pump5 = 6;           //Seedling circulation pump
//const int pump6 = 7;           //Seedling circulation pump
//const int lamps = 7;          //Lamps
//const int fans = 8;           //cooling fan (5v)


/////////////////////////////////////////////////////////////////////////////////////
/////////////////////PH Sensor Values and Set-up/////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////

float calibration_value = 21.34-.18; // .68 Here we attend the calibration adding or deducting values
int phval = 0;
unsigned long int avgval;
int buffer_arr[10], temp;
int ph_Read = A7;


////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////PUMPS Values//////////////////////////////////////
          ///////////////////////////////////////////////////////////

unsigned long prev_Time_1 = 0;
unsigned long prev_Time_2 = 0;
unsigned long prev_Time_3 = 0;
unsigned long prev_Time_4 = 0; //Circulation each dosing
unsigned long prev_Time_5 = 0;
//unsigned long prev_Time_6 = 0; //Circulation each 60 min

const unsigned long inter_on = 8000;
const unsigned long inter_off = 32000;
const unsigned long inter_circulation_on = 60000;
const unsigned long inter_circulation_off = (60000*10);
const unsigned long inter_seedling_on = 60000;
const unsigned long inter_seedling_off = (60000*10);

byte pump1_state = HIGH;
byte pump2_state = HIGH;
byte pump3_state = HIGH;
byte pump4_state = HIGH;
byte pump5_state = HIGH;
//byte pump6_state = HIGH;

byte customChar0[8] = {  //Circulation//
  0b01110,
  0b10001,
  0b10001,
  0b10000,
  0b10000,
  0b10001,
  0b10001,
  0b01110
};
byte customChar1[8] = {  //Seedling//
  0b01110,
  0b10001,
  0b01001,
  0b00100,
  0b00010,
  0b10001,
  0b10001,
  0b01110
};
byte customChar2[8] = {  //Arrow Down//
  0b00100,
  0b00100,
  0b00100,
  0b00100,
  0b00100,
  0b11111,
  0b01110,
  0b00100
};
byte customChar3[8] = { //Arrow UP//
  0b00100,
  0b01110,
  0b11111,
  0b00100,
  0b00100,
  0b00100,
  0b00100,
  0b00100
};

void setup()
{
  Serial.begin(9600);
  ec.begin();
  while(!Serial);
  lcd.begin();
  lcd.createChar(0, customChar0); //Arrow UP//
  lcd.createChar(1, customChar1); //Arrow Down//
  lcd.createChar(2, customChar2); //Circulation//
  lcd.createChar(3, customChar3); //Seedling// 
  lcd.backlight();
  lcd.setCursor(2, 1);
  lcd.print("/./.ROOMMATE././");
  lcd.setCursor(2, 2);
  lcd.print("/////DOSING/////");
  delay(2000);
  lcd.clear();

  //pinMode(switchPHDWN,INPUT);
  digitalWrite(pump1,HIGH);
  pinMode(pump1,OUTPUT);
  digitalWrite(pump2,HIGH);
  pinMode(pump2,OUTPUT);
  digitalWrite(pump3,HIGH);
  pinMode(pump3,OUTPUT);
  digitalWrite(pump4,HIGH);
  pinMode(pump4,OUTPUT);
  digitalWrite(pump5,HIGH);
  pinMode(pump5,OUTPUT);
  //digitalWrite(pump6,HIGH);
  //pinMode(pump6,OUTPUT);
   }

void loop()
 {
  unsigned long current_Time = millis();

  ////////EC Sensor Lecture///////////
  {
    static unsigned long timepoint = millis();
    if(millis()-timepoint>1000U)                  //time interval: 1s
    {
      timepoint = millis();
      voltage = analogRead(EC_PIN)/1024.0*5000;   // read the voltage
      Serial.print("voltage:");
      Serial.print(voltage);
      //temperature = readTemperature();          // read your temperature sensor to execute temperature compensation
      ecValue =  ec.readEC(voltage,temperature);  // convert voltage to EC with temperature compensation
      Serial.print("  temperature:");
      Serial.print(temperature,1);
      Serial.print("^C  EC:");
      Serial.print(ecValue,2);
      Serial.println("ms/cm");
    }
    ec.calibration(voltage,temperature);
 }
 
  ////////////PH Sensor Lecture////////////////
  
  for (int i = 0; i < 10; i++)
  {
    buffer_arr[i] = analogRead(A7);
    delay(100);
  }
  for (int i = 0; i < 9; i++)
  {
    for (int j = i + 1; j < 10; j++)
    {
      if (buffer_arr[i] > buffer_arr[j])
      {
        temp = buffer_arr[i];
        buffer_arr[i] = buffer_arr[j];
        buffer_arr[j] = temp;
      }
    }
   }
  avgval = 0;
  for (int i = 2; i < 8; i++)
    avgval += buffer_arr[i];
  float volt = (float)avgval * 6.00 / 1024 / 9;  //5.0 volts
  float ph_act = -5.70 * volt + calibration_value;
  Serial.print(" PH= ");
  Serial.print(ph_act);
  Serial.print("  ");
  Serial.println(millis());
  
  ////////////////////////////////////////////////////////////////////////////
  ///////////////////////////CALIBRATION//////////////////////////////////////
          ///////////////////////////////////////////////////////////
  
  float Set_PH = 7.0;    
  float Dose_PHAdj =.30;   

  float Set_EC = 1.5;
  float Dose_ECAdj =.20;
  
  ////////////////////////////////////////////////////////////////////////////
  /////////////////////////LCD DISPLAY INFORMATION////////////////////////////
          ///////////////////////////////////////////////////////////

 lcd.setCursor(0,0);
 lcd.print("PH Level=");
 lcd.setCursor(10,0);
 lcd.print(ph_act);
 lcd.setCursor(0,1);
 lcd.print("EC Level=");
 lcd.setCursor(10,1);
 lcd.print(ecValue);
 lcd.setCursor(0,2);
 lcd.print("PH Volt=");
 lcd.setCursor(9,2);

 if((pump5_state == HIGH) &&
   (current_Time - prev_Time_5 >= inter_seedling_off))
   {
    pump5_state = LOW;
    prev_Time_5 = current_Time;
    digitalWrite(pump5,pump5_state);
    Serial.print("PUMP5_ON!!Seedling");
    Serial.print("-");
    Serial.println(millis());
    lcd.setCursor(19,0);
    lcd.write((byte)1);  
   }
   else if
   ((pump5_state == LOW) &&
   (current_Time - prev_Time_5 >= inter_seedling_on))
   {
    pump5_state = HIGH;
    prev_Time_5 = current_Time;
    digitalWrite(pump5,pump5_state);
    Serial.print("PUMP5_OFF!!");
    Serial.print("-");
    Serial.println(millis());
    lcd.setCursor(19,0);
    lcd.print(" "); 
   }

  ////////////////////////////////////////////////////////////////////////////
  ////////////////////////////////Circulation/////////////////////////////////
          ///////////////////////////////////////////////////////////

 if((pump4_state == HIGH) &&
   (current_Time - prev_Time_4 >= inter_circulation_off))
   {
    pump4_state = LOW;
    prev_Time_4 = current_Time;
    digitalWrite(pump4,pump4_state);
    Serial.print("PUMP4_ON!!Seedling");
    Serial.print("-");
    Serial.println(millis());
    lcd.setCursor(19,1);
    lcd.write((byte)0);  
   }
   else if
   ((pump4_state == LOW) &&
   (current_Time - prev_Time_4 >= inter_circulation_on))
   {
    pump4_state = HIGH;
    prev_Time_4 = current_Time;
    digitalWrite(pump4,pump4_state);
    Serial.print("PUMP4_OFF!!");
    Serial.print("-");
    Serial.println(millis());
    lcd.setCursor(19,1);
    lcd.print(" "); 
   }
   
/////////////////////////////////////////////////////////////////////////////
 ////////////////////////////Pump1_PH DOWN////////////////////////////////////
          ///////////////////////////////////////////////////////////
        
  if((ph_act >= (Set_PH+Dose_PHAdj)) && 
    (pump1_state == HIGH) &&
    (current_Time - prev_Time_1 >= (inter_off)))
    {
    pump1_state = LOW;
    prev_Time_1 = current_Time;
    digitalWrite(pump1,pump1_state);
    Serial.print("PUMP1_ON!!PH DOWN");
    Serial.print("-");
    Serial.println(millis());
    lcd.setCursor(18,0);
    lcd.write((byte)2);
    }
    else if
      ((pump1_state == LOW) &&
      (current_Time - prev_Time_1 >= inter_on))
      {    
      pump1_state = HIGH;
      prev_Time_1 = current_Time;
      digitalWrite(pump1,pump1_state);
      Serial.print("PUMP1_OFF");
      lcd.setCursor(18,0);
      lcd.print(" ");
      }

/////////////////////////////////////////////////////////////////////////////
 ////////////////////////////Pump3_PH UP////////////////////////////////////
          ///////////////////////////////////////////////////////////
        

  if((ph_act <= (Set_PH-Dose_PHAdj)) && 
    (pump3_state == HIGH) &&
    (current_Time - prev_Time_3 >= (inter_off)))
    {
    pump3_state = LOW;
    prev_Time_3 = current_Time;
    digitalWrite(pump3,pump3_state);
    Serial.print("PUMP1_ON!!PH DOWN");
    Serial.print("-");
    Serial.println(millis());
    lcd.setCursor(17,0);
    lcd.write((byte)3);
    }
    else if
      ((pump3_state == LOW) &&
      (current_Time - prev_Time_3 >= inter_on))
      {    
      pump3_state = HIGH;
      prev_Time_3 = current_Time;
      digitalWrite(pump3,pump3_state);
      Serial.print("PUMP1_OFF");
      lcd.setCursor(17,0);
      }


 ////////////////////////////////////////////////////////////////////////////
 /////////////////////////////Pump2_EC UP////////////////////////////////////
         ///////////////////////////////////////////////////////////

  if((ecValue <= (Set_EC-Dose_ECAdj))&& 
    (pump2_state == HIGH) &&
    (current_Time - prev_Time_2 >= inter_off))
    {
    pump2_state = LOW;
    prev_Time_2 = current_Time;
    digitalWrite(pump2,pump2_state);
    Serial.print("PUMP2_ON!!EC UP");
    Serial.print("-");
    Serial.println(millis());
    lcd.setCursor(18,1);
    lcd.write((byte)3);
    }
    else if
      ((pump2_state == LOW) &&
      (current_Time - prev_Time_2 >= inter_on))
      {
      pump2_state = HIGH;
      prev_Time_2 = current_Time;
      digitalWrite(pump2,pump2_state);
      Serial.print("PUMP1_OFF");
      lcd.setCursor(18,1);
      lcd.print(" ");
      }
 }