DC Motor:
Magnetic fields can generate considerable mechanical forces. Such forces can be harnessed to do work. The device which converts dc energy into rotating mechanical energy is a dc motor. In this logic, a dc motor is a form of transducer. The motors can be of microscopic in size or as big as a house. A few tiny motors are being considered for use in medical devices which actually can flow in the bloodstream or be installed in body organs. The others can pull a train at freeway speeds.
In a dc motor, the source of electricity is associated to a set of coils generating magnetic fields. The attraction of reverse poles, and the repulsion of like poles, is switched in such a manner that a steady torque, or rotational force, outcomes. The greater the current which flows in the coils, the stronger is the torque, and then the more electrical energy is required. One set of coils, termed as the armature coil, goes approximately with the motor shaft. The other set of coils, termed as the field coil, is stationary which is as shown in figure below. In few motors, the field coils are substituted by a pair of permanent magnets. The direction of the current in the armature coil is reversed in every half-rotation by the commutator. This remains the force going in the similar angular direction. The shaft is carried all along by its own angular momentum therefore it doesn't come to a stop during those instants whenever the current is being switched in polarity.
Figure: Simplified drawing of a dc electric motor. The straight lines represent wires. Intersecting lines point out connections only whenever there is a dot at the point where the lines cross.