An AC generator converts mechanical energy to electrical energy using Faraday's law of electromagnetic induction. It contains a coil called an armature that rotates inside a magnetic field produced by magnets. As the armature spins, the changing magnetic flux induces an alternating current (AC) in the coils. Slip rings and carbon brushes allow the current to be conducted from the moving armature to an external circuit. The amount and direction of the induced current depends on the speed of rotation and position of the armature plane relative to the magnetic field.