DC motor

A DC motor is an electric motor which converts electrical energy to mechanical energy. A DC motor works on a direct current and works on the principle that, when a current-carrying conductor is placed in a magnetic field, it experiences a torque and has the tendency to rotate. The direction of the current flowing in the conductor decides the direction rotation of the conductor.

We will not go into much detail about the internal workings of a DC motor, as this is beyond the scope of this chapter; I suggest you read more about it later.

For this chapter, we will use a 9V DC motor, as shown in the following diagram:

Get Internet of Things with Raspberry Pi 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.