

A DC motor is an electromechanical device that converts direct current (DC) electrical energy into mechanical energy, enabling rotational motion. It operates using the interaction between a magnetic field and electric current in its windings to generate torque. DC motors are widely used due to their simplicity, reliability, and ease of control.








Below are the general technical specifications for a typical DC motor. Note that actual values may vary depending on the specific model.
For a basic brushed DC motor, there are typically two terminals:
| Pin/Terminal | Description |
|---|---|
| Positive (+) | Connect to the positive terminal of the power supply. |
| Negative (-) | Connect to the negative terminal of the power supply. Reversing polarity changes the rotation direction. |
For brushless DC motors, additional control pins may be present, such as Hall sensor outputs or PWM inputs, depending on the motor design.
Below is an example of controlling a DC motor using an Arduino UNO and an L298N motor driver.
// Example: Controlling a DC motor with Arduino UNO and L298N motor driver
// Define motor control pins
const int motorPin1 = 9; // IN1 on L298N
const int motorPin2 = 10; // IN2 on L298N
const int enablePin = 11; // ENA on L298N (PWM pin)
void setup() {
// Set motor control pins as outputs
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
pinMode(enablePin, OUTPUT);
}
void loop() {
// Rotate motor in one direction
digitalWrite(motorPin1, HIGH); // Set IN1 high
digitalWrite(motorPin2, LOW); // Set IN2 low
analogWrite(enablePin, 128); // Set speed (0-255, 128 = 50% duty cycle)
delay(2000); // Run for 2 seconds
// Stop the motor
analogWrite(enablePin, 0); // Set speed to 0
delay(1000); // Wait for 1 second
// Rotate motor in the opposite direction
digitalWrite(motorPin1, LOW); // Set IN1 low
digitalWrite(motorPin2, HIGH); // Set IN2 high
analogWrite(enablePin, 128); // Set speed (50% duty cycle)
delay(2000); // Run for 2 seconds
// Stop the motor
analogWrite(enablePin, 0); // Set speed to 0
delay(1000); // Wait for 1 second
}
Motor Not Spinning:
Motor Overheating:
Noisy Operation:
Inconsistent Speed:
Q: Can I connect a DC motor directly to an Arduino?
A: No, the Arduino cannot supply enough current to drive a motor directly. Use a motor driver or transistor circuit.
Q: How do I reverse the motor's direction?
A: Swap the positive and negative connections on the motor terminals, or use an H-bridge circuit.
Q: What is the difference between brushed and brushless DC motors?
A: Brushed motors use mechanical brushes for commutation, while brushless motors use electronic commutation, offering higher efficiency and durability.
Q: Can I control the speed of a DC motor without a motor driver?
A: Yes, you can use a transistor or MOSFET circuit with a PWM signal, but a motor driver is more convenient and safer.
This documentation provides a comprehensive guide to understanding, using, and troubleshooting DC motors in various applications.