

A DC motor is an electromechanical device that converts direct current (DC) electrical energy into mechanical energy, enabling rotational motion. It operates based on the principle of electromagnetic induction, where a magnetic field interacts with current-carrying conductors to produce torque. DC motors are widely used in applications such as robotics, fans, conveyor belts, and electric vehicles due to their simplicity, reliability, and ease of control.








Below are the general technical specifications for a typical DC motor. Note that specific values may vary depending on the motor model and manufacturer.
For a basic brushed DC motor, there are typically two terminals:
| Pin/Terminal | Description |
|---|---|
| Positive (+) | Connect to the positive terminal of the power supply or motor driver. |
| Negative (-) | Connect to the negative terminal of the power supply or motor driver. |
For brushless DC motors, additional wires may be present for hall sensors or control signals. Refer to the motor's datasheet for details.
Below is an example of controlling a DC motor using an Arduino UNO and an L298N motor driver.
OUT1 and OUT2 pins of the L298N driver.IN1 and IN2 pins of the L298N to Arduino digital pins 9 and 10, respectively.ENA pin of the L298N to Arduino digital pin 3 (for PWM speed control).VCC and GND pins.// Define motor control pins
const int IN1 = 9; // Motor direction control pin 1
const int IN2 = 10; // Motor direction control pin 2
const int ENA = 3; // Motor speed control (PWM) pin
void setup() {
// Set motor control pins as outputs
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENA, OUTPUT);
}
void loop() {
// Rotate motor in one direction
digitalWrite(IN1, HIGH); // Set IN1 high
digitalWrite(IN2, LOW); // Set IN2 low
analogWrite(ENA, 128); // Set speed to 50% (PWM value: 128 out of 255)
delay(2000); // Run for 2 seconds
// Stop the motor
analogWrite(ENA, 0); // Set speed to 0
delay(1000); // Wait for 1 second
// Rotate motor in the opposite direction
digitalWrite(IN1, LOW); // Set IN1 low
digitalWrite(IN2, HIGH); // Set IN2 high
analogWrite(ENA, 200); // Set speed to ~78% (PWM value: 200 out of 255)
delay(2000); // Run for 2 seconds
// Stop the motor
analogWrite(ENA, 0); // Set speed to 0
delay(1000); // Wait for 1 second
}
Motor Does Not Spin
Motor Spins in the Wrong Direction
Motor Overheats
Motor Vibrates but Does Not Rotate
Can I connect a DC motor directly to an Arduino? No, the Arduino cannot supply the required current. Always use a motor driver.
How do I control the speed of a DC motor? Use PWM signals to control the motor's speed via a motor driver.
What is the difference between brushed and brushless DC motors? Brushed motors use mechanical brushes for commutation, while brushless motors use electronic commutation, offering higher efficiency and durability.
Can I power a DC motor with a battery? Yes, ensure the battery voltage matches the motor's operating range and can supply sufficient current.