Auto Switch is a device that, when it detects a malfunction or outage in the primary source, switches the power supply from the primary source to a backup source automatically. The ATS activates a standby power source, such as an uninterruptible power supply, when a primary power system fails. In order to run electric equipment until grid power is restored, an ATS can also start up longer-term backup power systems, such as nearby diesel generators.