

A motor is a device that converts electrical energy into mechanical energy. It is a fundamental component in countless applications, ranging from industrial machinery to household appliances, robotics, and automotive systems. Motors are available in various types, such as DC motors, AC motors, and stepper motors, each suited for specific tasks and performance requirements.
Common applications of motors include:








The technical specifications of a motor vary depending on its type and intended application. Below is an example of a DC motor's general specifications:
| Parameter | Value |
|---|---|
| Operating Voltage | 6V - 12V |
| Rated Current | 0.5A - 2A |
| Stall Current | 2A - 5A |
| Rated Speed | 1000 - 5000 RPM |
| Torque | 0.1 - 1.5 Nm |
| Power Output | 0.5W - 20W |
| Motor Type | Brushed DC Motor |
For a typical DC motor with two terminals:
| Pin Name | Description |
|---|---|
| Terminal 1 (Positive) | Connect to the positive voltage supply. |
| Terminal 2 (Negative) | Connect to ground or negative voltage. |
For motors with additional control features (e.g., stepper motors or motors with encoders), refer to the specific datasheet for pin details.
Below is an example of controlling a DC motor using an Arduino UNO and an L298N motor driver:
// Arduino code to control a DC motor using PWM signals
// Connect the motor to the L298N motor driver outputs
// IN1 and IN2 control the motor direction
// ENA controls the motor speed via PWM
const int ENA = 9; // PWM pin for motor speed control
const int IN1 = 8; // Motor direction control pin 1
const int IN2 = 7; // Motor direction control pin 2
void setup() {
pinMode(ENA, OUTPUT); // Set ENA as output
pinMode(IN1, OUTPUT); // Set IN1 as output
pinMode(IN2, OUTPUT); // Set IN2 as output
}
void loop() {
// Rotate motor in forward direction
digitalWrite(IN1, HIGH); // Set IN1 high
digitalWrite(IN2, LOW); // Set IN2 low
analogWrite(ENA, 150); // Set speed (0-255)
delay(2000); // Run motor for 2 seconds
// Rotate motor in reverse direction
digitalWrite(IN1, LOW); // Set IN1 low
digitalWrite(IN2, HIGH); // Set IN2 high
analogWrite(ENA, 150); // Set speed (0-255)
delay(2000); // Run motor for 2 seconds
// Stop the motor
digitalWrite(IN1, LOW); // Set IN1 low
digitalWrite(IN2, LOW); // Set IN2 low
analogWrite(ENA, 0); // Set speed to 0
delay(2000); // Wait for 2 seconds before repeating
}
Motor Does Not Spin:
Motor Spins in the Wrong Direction:
Motor Overheats:
Excessive Noise or Vibration:
Q: Can I connect a motor directly to an Arduino?
A: No, Arduino cannot supply the required current to drive a motor. Always use a motor driver or relay module.
Q: How do I control the speed of a motor?
A: Use PWM signals to control the motor's speed. Most motor drivers support PWM input.
Q: What is the difference between a DC motor and a stepper motor?
A: A DC motor provides continuous rotation and is controlled by voltage or PWM. A stepper motor moves in discrete steps and is ideal for precise positioning.
By following this documentation, you can effectively integrate and troubleshoot motors in your projects.