Our first pond automatic refiller worked on the simple principle of a cork floating on the water's surface turning a switch on and off. It seemed simple, and for a while was very effective. However, over time it jammed up with little bits of grit getting caught in the moving parts. At first these were remedied by a quick scrub with a toothbrush, but eventually the grit got into the switch and non-accessable parts.
My second design is based on measuring the current flowing through the water. To do this I use a simple high gain transistor amplifier, which then feeds through a solid state relay to drive the solenoid to inject water.