arduino based automatic 3-phase selector