design and construction of an automatic changeover switch between mains supply and inverter