In electricity, generator is a generic term for any machine or arrangement producing charges or currents.