A method for preventing or limiting biofouling of a water sensing apparatus comprises the generation of peroxide in the vicinity of a sensor 1 of the water sensing apparatus. Preferably, the sensor is submerged in water. The peroxide may be generated from an aqueous solution having oxygen dissolved within. An electrochemical method may be utilised to generate the peroxide, wherein the peroxide can be generated at the cathode 2 of an electrochemical cell. A catalyst, such as a quinone, may be immobilised on the cathode. The cathode can comprise indium tin oxide (ITO) and may be transparent to visible light. Alternatively, the cathode can comprise carbon and/or glassy carbon. Suitably, the sensor is an electrochemical sensor and the peroxide is generated electrochemically at the cathode of the electrochemical sensor. A water sensing apparatus comprising a sensor and a peroxide generator is also claimed. The sensor can be an optical sensor (11, Fig. 1B).