Aquaponic Help

A few switches for safety is a good idea.

The pH sensor is a very high impedance sensor. The sensor is in the water, and the water is connected (more or less) to earth ground. The Arduino is also connected or at least coupled with the mains and earth ground. If there is a difference between the Arduino ground and the water you might have problems. That is why some pH sensors have output signals that are isolated from the ground level.
Search for: "ph probe ground loop galvanic isolated"