A simple device that prevents the direction of current from changing is called:

Rotor

Commutator

Armature

Detector