Water level indicator and pump controller

Why are you using voltage-dividers on your buttons??
Why don't you use current-limiting resistors with the LEDs??

What type of relais is this?
grafik

I can't read anything

You are using IO-pin 0 and IO-pin 1 for your level-sensors

IO-pin 0 and IO-pin 1 are used for the serial connection.
You should never connect anything to IO-pin 0 and IO-pin 1
because this interferes with serial output

If you want to keep so many LEDs and switches you should use an Arduino Mega 2560 or an 16 channel I2C-IO-expander like MCP23017

there are three water level sensors - floating reed switches - inputs

and there are three buttons - inputs

  1. pause - can be temporary stop water pump
  2. Auto/Manual - when power turn on - Auto mode is active, if i want to run the water pump manually, press one time
  3. SEMI AUTO - this button uses for at the time of water level below high sensor, when i press this button, pump start to run till water comes to high sensor and auto off

and there are three LED's for water level indicators

Four LED's for displaying Auto/Manual/Running/Standby (standby led is fading up/down when the system is standby)

1 is for PAUSE indicator
1 is for SEMI AUTO indicator

and there is an another LED for Timer ON, it means, just turn on the pump, Timer is also starts to count down some desired time, however pump not stopped via sensors, timer supports stop the water pump automatically.

MY PROBLEM IS this code is working properly, after 5-10 minutes power turn on, when goes the water level passing low sensor, pump not automatically turn ON,

but as soon as we power on the system, the water level goes down passing low sensor, the pump turn ON automatically,

actually i cant understand what is this problem..

pls help me..

i am assembling on a Bread board, I connected an LED for water motor, temporary

your wiring has multiple errors that might cause the software to fail so please answer these questions:

if you have TINKERKAD account, you can run simulator online,
it's working well

did you see my problem, why sensor not working after 10-15 minutes..
it's working well within 1-3 minutes after turn On the power

then, shall i connect another pins to check this problem..

No I don't have a tinker-cad account
I will not create a tinker-cad account
If you want me to run a simulation
rebuild your circuitry in the WOKWI arduino simulator

so, shall i connect another three pins to take inputs (sensors) if it works well?
what do you think..?

Which inputs do you mean. You should develop the habit of
qouting the post you are referring to and
precisely naming the things you are writing about

i use pin no 0, 1, and 2 for water level sensors 0- Low, 1 - Mid and 2 - High..

Yes and you should connect the sensors that is currently connected to IO-pin 0 and the sensor that is currently connected to IO-pin 1 to a different IO-pin.

OK, I will check tomorrow, I am from Sri Lanka, sometimes you will realise at onec my English, knowledge is poor.. that's why. Sorry...

Thank you..

This is an exception:
You should go on writing in english because this is the english speaking / writing forum.
Just to make sure that you will understand what I write here I translated it to singhalesian and to tamil

Write descriptively in your native language, then use google-translate to translate it. The grammar will not be brilliant, but it will be easier to understand as you can describe it in more detail.

ඉන්පසු google-translate භාවිතා කරන්න.
ඔබේ මව් භාෂාවෙන් විස්තරාත්මකව ලියන්න, ඉන්පසු එය පරිවර්තනය කිරීමට google-translate කරන්න. ව්‍යාකරණ දීප්තිමත් නොවනු ඇත, නමුත් ඔබට එය වඩාත් විස්තරාත්මකව විස්තර කළ හැකි බැවින් එය තේරුම් ගැනීමට පහසු වනු ඇත.

பின்னர் google-translate ஐப் பயன்படுத்தவும்.
உங்கள் தாய்மொழியில் விரிவாக எழுதவும், பின்னர் கூகுள் மொழியாக்கம் செய்ய அனுமதிக்கவும். இலக்கணம் புத்திசாலித்தனமாக இருக்காது, ஆனால் நீங்கள் அதை இன்னும் விரிவாக விவரிக்க முடியும் என்பதால் புரிந்துகொள்வது எளிதாக இருக்கும்.

Try changing this

To this

 bool isTimerUp = isAuto && runWaterMotor && (millis() - motorStarTime) >= motorMaxRunTimeInMilliseconds;

It is not clear to me why the timer is up only when we are in Auto. I guess it should be also in semiAuto, so possibly the suggestion should be

 bool isTimerUp = runWaterMotor && (millis() - motorStarTime) >= motorMaxRunTimeInMilliseconds;

no, I have used timer also for this project, as soon as possible turn on the water pumps, it stops when the water level reaches HIGH sensor at the AUTO mode,

however, one of the two sensors MID or HIGH, blocked by debris in floating water or any caution, mortor never stops know..? So that's why as soon as the water pumps turn ON the timer is also starts the count down the time desired time given by the code.

I have used digital pin 0, 1 and two for water level sensors (floating sensor),

I have used all digital pins and analogues pin for this project, you can see my project

my problem is, This project is working properly in first 3-5 minutes after connecting usb power to the computer, however, though the water level goes LOW by passsing LOW sensor , its not working about 10-15 minutes later THAT IS MY PROBLEM

Thanking you,
waiting your replies

there are three water level sensors - floating reed switches - inputs

and there are three buttons - inputs

  1. pause - can be temporary stop water pump
  2. Auto/Manual - when power turn on - Auto mode is active, if i want to run the water pump manually, press one time
  3. SEMI AUTO - this button uses for at the time of water level below high sensor, when i press this button, pump start to run till water comes to high sensor and auto off

and there are three LED's for water level indicators

Four LED's for displaying Auto/Manual/Running/Standby (standby led is fading up/down when the system is standby)

1 is for PAUSE indicator
1 is for SEMI AUTO indicator

and there is an another LED for Timer ON, it means, just turn on the pump, Timer is also starts to count down some desired time, however pump not stopped via sensors, timer supports stop the water pump automatically.

MY PROBLEM IS this code is working properly, after 5-10 minutes power turn on, when goes the water level passing low sensor, pump not automatically turn ON,

but as soon as we power on the system, the water level goes down passing low sensor, the pump turn ON automatically,

actually i cant understand what is this problem..

pls help me..

can you take an idea about my project now..?

Put some serial prints in there. setWaterMotorRunStatus would be a good place to start since that appears to be where the decision on pumping is made.