I'm not surprised that you have problems measuring the pH of a fish tank. The conductivity of fresh water is very low, which makes the impedance of the measurement very high, so it becomes sensitive to electrical noise, and the measurement will easily pick up the hum from the motor. Add to that the low ionic strength of the solution, which makes the reading very sensitive to motion in the water, and you have recipe for unstable readings, especially if the sampling rate is low and you get aliasing.
To measure the pH of nearly pure water with a glass electrode, remove a sample and add some potassium chloride. This increases the conductivity without changing the pH.