The commercially available borehole pump control systems are very clever. They use the fact that the current drawn by the motor drops when the pump runs dry. The control monitors the current and switches off the motor when the current drops below a certain preset value. The problem is that the voltage of the municipal power supply is not consistent and tends to vary from 180V to 240V.
This means that when the voltage is low the pump control will think that the pump has run dry almost immediately after it turns it on. In the winter many people's boreholes are low so need to pump whenever there is water in the borehole, which obviously doesn't happen when the voltage is low.
The only way to get the borehole to pump when the voltage is low is to set the current cut-off down. The obvious problem with this is that the controller then will never switch off the motor when the voltage goes back to ~240V, causing the motor to burn out.
My solution to this problem is to measure the water flowing into the storage tank instead. When the flow rate drops below a certain amount my controller turns off the motor, preventing the motor and pump from damage. This simple solution was slightly hindered by the impossibility of getting a reasonably priced flow switch in Zim. I got round this by making my own using PVC piping and some polystyrene. I would like to replace my home-made switch with a decent quality bought one but so far it has functioned flawlessly.
Explanation of picture
The Raspberry pi runs a simple Python program I wrote to monitor the sensors, control the motor and log all activity for troubleshooting. The sensors are the flow switch and a float switch in the storage tank. The float switch just tells the controller when the storage tank is full so it knows to stop pumping. I found I needed to add the 100?F capacitors to remove minor fluctuations from the sensors which the pi was sensitive enough to pick up. Switching of the motor is done by the pump control relay. The motor start capacitor is a standard borehole component used to start the motor spinning.
Finally the wireless dongle connects the pi to the house wifi allowing me to monitor, and if neccessary control, the system from the couch. The wireless dongle is not neccessary for the system to operate as it functions autonomously. It is just there during the testing period so I can monitor it easily. At this time the system has been running faultlessly for a month, I would like to monitor it for at least half a year before I am satisfied that it will not fail.