A generator converts mechanical energy into electrical energy. An electric motor converts electrical energy back into mechanical energy. How does it work?
The diagram below illustrates Mr. Tesla's invention of the "Induction Motor".
Alternating current passes through the independent magnetic poles of the stator, causing a shifting of the magnetic poles (phase shift) to create points of maximum magnetic attraction that cause the armature to rotate. Concurrently, current is induced in the coils of the armature that have been wound to maximize this progressive shifting of the points of magnetic attraction, this causes the armature to rotate with enough torque to provide mechanical energy.
Today, there is a plentiful supply of all types of electric motors that are designed for many useful purposes. An induction motor does not require a commutator or brushes. Since there are no brushes to wear out, they have a long operating life. The exhaust fans located on the ceiling of a bathroom and/or utility room use small induction motors for their operation. The internet offers many choices for suppliers of electric motors. Some motors operate from a DC power source, some use AC power

