The reverse conversion of electrical energy into mechanical energy is done by an electric motor, and motors and generators have many similarities. In fact many motors can be mechanically driven to generate electricity, and very frequently make acceptable generators.
Main article: Jedlik's dynamo
In 1827, Hungarian Anyos Jedlik started experimenting with electromagnetic rotating devices which he called electromagnetic self-rotors. In the prototype of the single-pole electric starter (finished between 1852 and 1854) both the stationary and the revolving parts were electromagnetic. He formulated the concept of the dynamo at least 6 years before Siemens and Wheatstone but didn't patent it as he thought he wasn't the first to realize this. In essence the concept is that instead of permanent magnets, two electromagnets opposite to each other induce the magnetic field around the rotor. It was also the discovery of the principle of self-excitation.
] Faraday's disk
Faraday disk, the first electric generator. The horseshoe-shaped magnet (A) created a magnetic field through the disk (D). When the disk was turned this induced an electric current radially outward from the center toward the rim. The current flowed out through the sliding spring contact m, through the external circuit, and back into the center of the disk through the axle. In the years of 1831–1832, Michael Faraday...