

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 actual values may vary depending on the specific model and manufacturer.
For a basic brushed DC motor, there are typically two terminals:
| Pin | Description |
|---|---|
| + | Positive terminal for power input |
| - | Negative terminal for power input |
For a brushless DC motor (BLDC), there may be additional wires for control and feedback:
| Pin | Description |
|---|---|
| U | Phase U connection |
| V | Phase V connection |
| W | Phase W connection |
| Hall A | Hall sensor output A (feedback) |
| Hall B | Hall sensor output B (feedback) |
| Hall C | Hall sensor output C (feedback) |
Below is an example of how to control a DC motor using an Arduino UNO and an L298N motor driver.
// Define motor control pins
const int IN1 = 9; // Motor driver input 1
const int IN2 = 10; // Motor driver input 2
const int ENA = 3; // Motor driver enable pin (PWM)
// Setup function to initialize pins
void setup() {
pinMode(IN1, OUTPUT); // Set IN1 as output
pinMode(IN2, OUTPUT); // Set IN2 as output
pinMode(ENA, OUTPUT); // Set ENA as output
}
// Loop function to control motor
void loop() {
// Rotate motor clockwise
digitalWrite(IN1, HIGH); // Set IN1 high
digitalWrite(IN2, LOW); // Set IN2 low
analogWrite(ENA, 128); // Set speed to 50% (PWM value: 128)
delay(2000); // Run motor for 2 seconds
// Rotate motor counterclockwise
digitalWrite(IN1, LOW); // Set IN1 low
digitalWrite(IN2, HIGH); // Set IN2 high
analogWrite(ENA, 128); // Maintain speed at 50%
delay(2000); // Run motor for 2 seconds
// Stop motor
digitalWrite(IN1, LOW); // Set IN1 low
digitalWrite(IN2, LOW); // Set IN2 low
analogWrite(ENA, 0); // Set speed to 0 (stop motor)
delay(2000); // Wait for 2 seconds before repeating
}
Motor Does Not Spin:
Motor Spins in the Wrong Direction:
Motor Overheats:
Motor Produces Noise or Vibrations:
Q: Can I power a DC motor directly from an Arduino?
A: No, the Arduino cannot supply enough current to drive a DC motor. Use a motor driver or external power supply.
Q: How do I control the speed of a DC motor?
A: Use PWM (Pulse Width Modulation) to vary the voltage supplied to the motor.
Q: What is the difference between brushed and brushless DC motors?
A: Brushed motors use physical brushes for commutation, while brushless motors use electronic commutation, making them more efficient and durable.
Q: Can I run a DC motor in reverse?
A: Yes, by reversing the polarity of the power supply or using an H-bridge circuit.
This concludes the documentation for the DC motor.