A DC motor is a rotating electrical machine that can convert DC power into mechanical energy (DC motor) or convert mechanical energy into DC power (DC generator). It can realize the conversion of direct current and mechanical energy of the motor. When it operates as a motor, it is a DC motor that converts electrical energy into mechanical energy. A generator is a DC generator that converts mechanical energy into electrical energy.