Patent ID: 7608945

Claim:
An apparatus for controlling a power supply, comprising: a plug adapted to be connected to a power source; a plurality of electrical outlets; a communication interface; a programmable device configured for outputting a control signal; an encoder receiving the control signal via the communication interface and converting the control signal to a selecting signal, and then outputting the selecting signal; and a selecting circuit electrically coupled between the electrical outlets and the plug, the selecting circuit receiving the selecting signal to control the plug to selectively connect to one or more electrical outlets to be needed; wherein the selecting circuit includes a power supply source, a plurality of switches, a plurality of transistors, and a plurality of relays, bases of the transistors are correspondingly coupled to output pins of the encoder, emitters of the transistors are grounded, collectors of the transistors are connected to the power supply source, the collector of each of the transistors is connected to an end of a corresponding one of the relays, another end of each of the relays is grounded, each of the electrical outlets is electrically connected to the plug via a corresponding one of the switches, and each of the relays controls a corresponding one of the switches.