Generator

A diesel generator is a device that converts mechanical energy obtained from an external source into electrical energy as the output. … Instead, it uses the mechanical energy supplied to it to force the movement of electric charges present in the wire of its windings through an external electric circuit.