Electric Generator:
The electric generator is constructed somewhat like a conventional motor, though it functions in the reverse logic. A few generators can also operate as motors; they are termed as motor/generators. Generators, such as motors, are energy transducers of a special sort.
A classic generator generates ac whenever a coil is rotated speedily in a strong magnetic field. The magnetic field can be given by a pair of permanent magnets (shown in figure below). The rotating shaft is driven by a gasoline-powered motor, a turbine, or several other source of mechanical energy. The commutator can be used with a generator to generate pulsating dc output that can be filtered to acquire pure dc for use with precision equipment.
Figure: A simple kind of ac generator.