You need to power the relays separately. Any change in the supply voltage to the Arduino will change the analog input reference voltage, by default.I suggest to use 5V step-down regulators so that everything is powered by the 12V supply.
Connect all the grounds, and make sure that you have an inductive kick diode on the pump.
From the image that I uploaded
The images are incomprehensible. Please post a hand drawn wiring diagram or schematic.
What pump are you using? I can't read the specs on it.
Could this fritzing diagram help?
I take the 12V & Gnd. to both 5V supply and the motor driver.5V & Gnd from the supply to the µprocssor. Then only the ONE digital line from the processor to the motor driver. Ground out the other driver data line. Hook up motor, done.