Automatic digital controller for the protection and control of a single-phase pump