Conventional continuous current flows from the battery. The commutator itself is the red and blue curved segments. The brushes are dark gray and contacting the commutator contacts, and the rotor winding is violet. As the motor rotates, the commutator contacts will turn through 180° and the current flowing in the winding will reverse. However the fixed magnetic field that the rotor is in has also switched polarity relative to the rotor winding, and so rotation continues in the same direction.
A commutator is an electrical switch that periodically reverses the current in an electric motor or electrical generator. Commutators enable motors to run on, and generators to produce, direct current instead of alternating current. More generally, commutators can be used to convert between direct and alternating current.
It typically consists of a set of copper contacts, fixed around the circumference of the rotating part of the machine (the rotor), and a set of spring-loaded carbon brushes fixed to the stationary part of the machine (the stator) that complete the electrical circuit from the rotor's windings to the outside of the machine. Friction between the copper contacts and the brushes eventually causes wear to both surfaces. The carbon brushes, being made of a softer material, wear faster and are designed to be replaced easily without dismantling the machine. The copper contacts are usually inaccessible and, on small motors, are not designed to be repaired. On large motors the commutator may be re-surfaced with abrasives. Each segment of the commutator is insulated from the adjacent segments; a large motor may contain hundreds of segments.