Electronic means for switching from one power supply to another power supply