1. An electric motor controller configured to be coupled to an electric motor, said controller configured to control the electric motor to produce torque when direct current (DC) link voltage has up to 100% voltage ripple; said controller comprising:a first power input connection, a second power input connection, and a third power input connection, each of said first, second, and third power input connections selectively and separately couplable to a single-phase alternating current (AC) power source by a system controller based on a commanded operating mode of a plurality of operating modes for the electric motor received from a thermostat, each of said first, second, and third power input connections associated with a different operating mode, wherein the same amount of AC input voltage from the AC power source is applied regardless of which of said first, second, and third power input connections is activated;
an energized line detection device comprising a single current transformer that includes a primary winding and a secondary winding, each of said first, second, and third power input connections coupled to a respective turn of said primary winding such that a magnitude of voltage generated by transforming current at said primary winding and applied to said secondary winding varies according to whichever of said first, second, and third power input connections is coupled to the AC source by the system controller, said secondary winding configured to output an isolated stepped-down voltage; and
a microprocessor coupled downstream from said energized line detection device and configured to:
measure the magnitude of the voltage output at said secondary winding;
determine which of said first, second, and third power input connections is coupled to the AC power source by the system controller based on the magnitude of the voltage;
associate the power input connection determined to be coupled to the AC power source with the particular operating mode commanded by the thermostat; and
apply an operating profile to drive the electric motor in accordance with the commanded operating mode.