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

Commutator

Armature

Detector

Rotor