PUMP AUTOMATION

I want to automate 4 pumps using the arduino, 2 3hp pumps single phase 220vac and 2 5hp 3phase 220vac pumps. I plan to automatically stop and start this process using three hc sr04 sensor.

I did a basic ladder diagram to jog a pump if the start button is pressed. to have the pump running it would require a N.O contact parallel to the start button I can use the 13 and 14 pins on the contactor for this purpose and this would be fine, I could start and stop but if I add the sensor to this setup I would also add a relay, I think I would add the contact in series with the N.O aux contact or start button.

That contact in series could be N.C so that when the start button is pressed there is no open circuit or it could be open and when the sensor senses that the tank needs water it closes.

There would be an issue with that setup, It would start just fine and stops but then I would need to press the start button to start the pump again once the sensor tells it to stop because the N.O holding contact would now be open since the contactor would be de-energised.

I could add another contact in parallel to the start button from my relay board with a switching signal from the arduino but if I did that the circuit would be fully automated and I would have no use for the stop and start buttons, once the sensor tell the contact to bridge the start button it would autoamtically start the pump and stop it.

I need for it to be automatic but I also need to be able to get a 1st start using the start button and I need to stop the system using the stop button.

And my aim is to have the Mains power passing through the buttons like a regular control circuit so that if there is any issue at all I can ignore the arduino and just use start and stop functionality of the buttons to control the pumps.

attached is the simple drawing.
attached is the code I have so far

#define trigPin 8
#define echoPin 9
#define pump1 12
//#define pump2 11
#define pushButton1 10

long duration;
float distanceInch;
int buttonState = 0;


void setup() {
Serial.begin(9600);
pinMode(trigPin, OUTPUT); 
pinMode(echoPin, INPUT); 
pinMode(pump1, OUTPUT);
pinMode(pushButton1, INPUT);
}

void loop() {
buttonState = digitalRead(pushButton1);
digitalWrite(trigPin, LOW);
  delayMicroseconds(5);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distanceInch = (duration/2) / 74;
Serial.println(distanceInch);
delay(250);


if(distanceInch > 0 && distanceInch <= 25){
digitalWrite(pump1, LOW);}

if(distanceInch  > 40) {
  digitalWrite(pump1, HIGH);} 
  else
  {digitalWrite(pump1, LOW);}

  //if(buttonState == LOW)
//digitalWrite(pump1, LOW);
//for(;;){}
}

Can you draw a complete circuit diagram to go with that description? You refer to contactors and aux and various things as if you know your circuit, we dont.

The contactor is there as pump and the explanation states the aux contact in parallel with the start button, thats the one with #3 & #4

I added a contact around the start button thats the holding contact to keep the contactor that controls the pump energised.

Why not simply add a changeover switch to change between 'Manual' control (the panel switches) and 'Auto' (the arduino) control?

it is typical for systems like yours to have such a switch, usually is a 3 positon switch; Manual-OFF-Auto

I figured how to do it with motor controls and the arduino.

sherzaad:
Why not simply add a changeover switch to change between ‘Manual’ control (the panel switches) and ‘Auto’ (the arduino) control?

it is typical for systems like yours to have such a switch, usually is a 3 positon switch; Manual-OFF-Auto

This is a normal setup on an installation like this