

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








The specifications of a motor vary depending on its type and intended application. Below is an example of a DC motor's typical 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 |
| Motor Type | Brushed DC Motor |
For a basic DC motor, the pin configuration is straightforward:
| Pin | Description |
|---|---|
| Pin 1 | Positive terminal (+) for power input |
| Pin 2 | Negative terminal (-) for power input |
For more advanced motors, such as stepper motors or brushless DC motors, additional pins may be present for control signals, feedback, or phase connections.
Below is an example of how to control a DC motor using an Arduino UNO and an L298N motor driver:
// Example: Controlling a DC Motor with Arduino UNO
// Connect the motor to the L298N motor driver
// IN1 and IN2 are control pins for the motor
const int IN1 = 9; // Connect to IN1 on the motor driver
const int IN2 = 10; // Connect to IN2 on the motor driver
const int ENA = 5; // Connect to ENA (PWM pin) on the motor driver
void setup() {
pinMode(IN1, OUTPUT); // Set IN1 as output
pinMode(IN2, OUTPUT); // Set IN2 as output
pinMode(ENA, OUTPUT); // Set ENA as output
}
void loop() {
// Rotate motor forward
digitalWrite(IN1, HIGH); // Set IN1 high
digitalWrite(IN2, LOW); // Set IN2 low
analogWrite(ENA, 128); // Set speed (0-255)
delay(2000); // Run motor for 2 seconds
// Rotate motor backward
digitalWrite(IN1, LOW); // Set IN1 low
digitalWrite(IN2, HIGH); // Set IN2 high
analogWrite(ENA, 128); // Set speed (0-255)
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
delay(2000); // Wait for 2 seconds
}
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, motors typically require more current than an Arduino can supply. Use a motor driver or H-bridge circuit to safely control the motor.
Q: How do I choose the right motor for my project?
A: Consider the required torque, speed, voltage, and current ratings. Match these parameters to your application's needs.
Q: What is the purpose of a motor driver?
A: A motor driver acts as an interface between the motor and the control system, allowing you to control the motor's speed and direction safely.