plz help me out .I am in damn need of assistance

const int button1Pin=2;//push button for foot switch
const int relay1Pin=4;//220 volt spring return solenoid valve no 1
const int relay2Pin=7;//1/2 hp ac motor
const int relay3Pin=8;//220 volt spring return solenoid valve n0 2

int button1State=0;
int relay1State=0;
int relay2State=0;
int relay3State=0;

void setup() {
pinMode(button1Pin,INPUT);
pinMode(relay1Pin,OUTPUT);
pinMode(relay2Pin,OUTPUT);
pinMode(relay3Pin,OUTPUT);
}

void loop() {
button1State=digitalRead(button1Pin);
if(button1State==HIGH) {
digitalWrite(relay1Pin,LOW);
delay(20000);
digitalWrite(relay2Pin,LOW);
delay(1000);
digitalWrite(relay3Pin,LOW);
delay(6000);
digitalWrite(relay3Pin,HIGH);
delay(1000);
digitalWrite(relay2Pin,HIGH);
delay(1000);
digitalWrite(relay1Pin,HIGH);

}

}

I have used three arduino uno boards to drive three pressing units separately.I have used foot switch as a cycle start button. If i press foot switch of pressing unit no 1,automatically other two pressing units starts working on its own and i have not used external power supply to drive the relay boards instead i have supplied 5 volt power from relay board itself.Some times end of the cycle won’t complete i mean relay no.3 doesn’t work at the end of cycle and again cycle stars on its own.
I have used 220 volt spring return solenoid valve (Relay 1 and 3) and 220 volt 1/2 hp ac motor(Relay 2).I have given common 12 volt power supply to all boards of vcc port. Plz refer my project photos.

Plz help me out from this problem and basically i am mechanical engineer and i know little bit of electronics.

Thank you

IMG_20161202_165930499[1]__1480758721_116.203.21.37.jpg

Try here

And mind your language. ;)