An alternator is an electrical generator that converts mechanical energy to electrical energy in the form of alternating current.