arduino keeps crashin/resetting

So i have built my first bigger arduino project, and basically an a arduino uno that controls a bunch of relays ( ebay relay modules ), and a lcd 16/2 screen. And reads a few sensors, sutch as weight, ir ( module ), and a set of buttons and switches.., everything powerd by a external computer psu 12v, and 5v..,

anyway,. after a load of debugging and testing and problem solving i have got most of the functions working.., but when it counts the most it sort of crasher..,

the program is 2 main parts 1, is calibraition, and 2 is running..,
and once i have calibratet and start to run the machine it does begin , and then when it has reached the calibrated value , then everything goes sideways.., i beleve it crashes then resets, and somewhere inbetween the lcd starts to show random letters..,

and then i have to reset to restart at all..

i did a pullup on the resetpin to 5v througn 10k ohm..,
( the board runs on 12v pin-in)

the code :

const int weight = A0;          // pin that the sensor is attached to
const int bottleSwitch = 9;     // pin that the Bottle Switch is attached to
const int motor = 8;            // pin that the motor is attached to
const int valve = 7;            // pin that the valve is attached to
const int mode = 6;             // pin that the system mode switch is attached to
const int motorMan = 10;        // pin that the manual motor switch is attached to
const int manVal = 1;           // pin that the manual valve switch is attached to
const int setVol = A5;          // pin that the set volume is attached to


int vol = 0;
int goalVol = 500;
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  
  pinMode(weight, INPUT);
  pinMode(bottleSwitch, INPUT); 
  pinMode(mode, INPUT); 
  pinMode(motorMan, INPUT); 
  pinMode(manVal, INPUT); 
  pinMode(setVol, INPUT); 
  
  pinMode(motor, OUTPUT);  
  pinMode(valve, OUTPUT);  
 
  lcd.begin(16, 2);
  lcd.print("Marek");
  lcd.setCursor(0, 1);
  lcd.print("oil ver:1,4");
  delay(3000);
  lcd.clear();
}



void loop() {  
  
  if(digitalRead(mode) == HIGH){
    
    delay(10);
    
    digitalWrite(valve, HIGH);   
    
    delay(10);
    
    vol = analogRead(weight);
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Volume: ");
    lcd.print(vol);
    
    delay(50);
    
    if (vol > (goalVol-20)) {
     digitalWrite(valve, LOW);
     lcd.setCursor(0, 0);
     lcd.print("pause"); 
     delay(100);
    }
    
    digitalWrite(valve, HIGH);
    
   if (vol > goalVol) {
     digitalWrite(valve, LOW);
     lcd.setCursor(0, 0);
     lcd.print("pause");  
     
     
     delay(100);
     
     digitalWrite(motor, HIGH);
     delay (10);
     lcd.clear();
     lcd.setCursor(0, 1);
     lcd.print("next..");
     
     if(digitalRead(bottleSwitch) == HIGH){
       digitalWrite(motor, LOW);
       lcd.clear();
       lcd.print("stop");
     }
    }
  }else{
    
    lcd.clear();
    vol = analogRead(weight);
    lcd.setCursor(0,0);
    lcd.print("current volume : ");
    lcd.setCursor(0,1);
    lcd.print( vol );
    lcd.print(" units");
    delay(30);

    while(digitalRead(motorMan) == HIGH){
        digitalWrite(motor, HIGH);
        lcd.clear();
        lcd.setCursor(0,0);
        lcd.print("rotate...");
        lcd.print(digitalRead(motorMan));
        delay(10);
    }
       digitalWrite(motor, LOW);
    
    
    while(digitalRead(manVal) == HIGH){
      digitalWrite(valve, HIGH);
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("fill...");
      delay(10);
    }
      digitalWrite(valve, LOW);
    
    
    while(digitalRead(setVol) == HIGH){
      vol = analogRead(weight);
      goalVol=vol;
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("volume set");
      lcd.setCursor(0,1);
      lcd.print(vol);
      delay(1000);
    }  
  }
}

(deleted)

oobs sorry.., modified the first post and included the entire program..

Describe how the hardware is setup. What is connected and how? Schematic or drawing is best.

Are your buttons(?) connected with pull-down or pull-up resistors?

well the buttons / switches are pull down.., ( 10k ohm )
the relays are just connected to the board.., ( relay modules )
and the weight signal is coming from ina122p amplifier

i had some fuss with the photo sensor.., but finally connected it to the board through a relay.., ( the sensor doesn't give out a pure signal it sort of hovers .., but when i pass the signal through a relay i get proper on/off ( and a pulldown aswell ))

i sort of dont have any schematic / drawing because i just connect everithing when i come to it...,
i have everithing connected through a solderless board aswell, and it looks like a mess ( but what it looks like and how it works should not affect eachother..?? or)

I'm currently building a hydroponics garden using a sainsmart 4 relay module. I was having issues with the arduino resetting when the relay cut off and I believe my issue was that the relay coils when de-energizing was feeding back messing with the arduino causing it to reset. Idk what "ebay relay" you have but try using a separate power source for the relay and see if that fixes it. you could also try putting a diode in line with the positive just before the relay. On a side note, if your turning on a lot of relays at once, it may be draining more power than can be supplied at that instant. Try putting a large capacitor near the relay across the pos and neg to compensate for the power drain.

Also breadboard/solderless boards are not good for large projects, check all your connections to make sure its not the breadboard causing issues.