The device that is used to convert mechanical energy to electrical energy is called a generator.
Step 2: Working principle of an electric generator
The electric generator works on the principle of electromagnetic induction i.e., when a coil is rotated in the presence of a uniform magnetic field, the current is induced in it.