An electrical generator is a device that produces electrical energy from a mechanical energy source. The process is known as electricity generation.
Before the connection between magnetism and electricity was discovered, generators used electrostatic principles. The Wimshurst machine used electrostatic induction or "influence". The Van de Graaff generator used the triboelectric effect to separate electric charges using the friction between insulators. Electrostatic generators are inefficient and are useful only for scientific experiments requiring high voltages.
In 1831-1832 Michael Faraday discovered that a potential difference is generated between the ends of an electrical conductor that moves perpendicular to a magnetic field. He built the first electromagnetic generator based on this effect, using a copper disc rotating between the poles of a horseshoe magnet. It produced a small direct current.
The dynamo was the first electrical generator capable of delivering power for industry, and is still the most important generator in use in the 21st century. The dynamo uses electromagnetic principles to convert mechanical rotation into an alternating electric current.
The first dynamo based on Faraday's principles was built in 1832 by Hippolyte Pixii, a French instrument maker. It used a permanent magnet which was rotated by a crank. The spinning magnet was positioned so that its north and south poles passed by a piece of iron wrapped with wire. Pixii found that the spinning magnet produced a pulse of current in the wire each time a pole passed the coil. Furthermore, the north and south poles of the magnet induced currents in opposite directions. By adding a commutator, Pixii was able to convert the alternating current to direct current.
In 1866 Werner von Siemens invented a self-excited generator that used an electromagnet instead of a permanent magnet. In 1867 Cooke and Wheatstone produced a new version of the Pixii design, also replacing the spinning magnet with a spinning coil that acted as an electromagnet. Electromagnets could develop a stronger magnetic field, and thus a stronger electric output. In addition, electromagnets provided the ability to regulate the power generated, by adjusting the power fed into them. Of course with the coil now turning, it was somewhat more difficult to take the power out of the circuit, but a well designed commutator was all that was needed.
However, both of these designs suffered from a similar problem: they induced "spikes" of current followed by none at all. Antonio Pacinotti, an Italian scientist, fixed this by replacing the spinning coil with a toroidal one, which he created by wrapping an iron ring. This meant that some part of the coil was continually passing by the magnets, smoothing out the current. Zénobe Gramme reinvented this design a few years later when designing the first commercial power plants, in Paris in the 1870s. His design is now known as the Gramme dynamo. Various versions and improvements have been made since then, but the basic concept of a spinning endless loop of wire remains at the heart of all modern dynamos.
It is important to understand that the generator creates an electric current, but does not create electric charge, which is already present in the conductive wire of its windings. It is somewhat analogous to a water pump, which creates a flow of water but does not create the water itself.
Other types of electrical generator exist, based on other electrical phenomena such as piezoelectricity, and magnetohydrodynamics.
The construction of a dynamo is similar to that of an electric motor, and it is possible to build a machine that functions as either.
See also distributed generation.