
This circuit consists of a DC motor powered by a 12V battery, with a diode for protection against reverse voltage and an LED indicator. The LED is connected in parallel with the motor to indicate when the motor is powered.
A DC motor is an electromechanical device that converts direct current (DC) electrical energy into mechanical energy, enabling rotational motion. It operates on the principle of electromagnetism, where a magnetic field is generated by current flowing through a coil, causing the motor's rotor to spin. DC motors are widely used due to their simplicity, reliability, and ease of control.

This circuit consists of a DC motor powered by a 12V battery, with a diode for protection against reverse voltage and an LED indicator. The LED is connected in parallel with the motor to indicate when the motor is powered.

This circuit is a motor control system powered by a 12V battery, utilizing an L298N motor driver to control four DC gearmotors. An ESP32 microcontroller is used to send control signals to the motor driver, enabling precise control of the motors for applications such as a robotic vehicle.

This circuit controls a DC motor using an ESP32 microcontroller and a 2-channel motor driver. The ESP32 outputs a PWM signal and a direction control to the motor driver, which in turn drives the motor with power from a 12v battery. The code provided sets up the ESP32 to output a PWM signal at a fixed duty cycle and a high direction signal, causing the motor to spin in one direction at a constant speed.

This circuit features an ESP8266 NodeMCU microcontroller interfaced with an L298N DC motor driver to control four DC motors. The motors are powered by a 12V battery, and the system includes three IR sensors for input. The ESP8266 uses its GPIO pins to send control signals to the L298N driver, which in turn controls the direction and speed of the motors based on the logic level signals received from the microcontroller.
Below are the general technical specifications for a typical DC motor. Note that actual values may vary depending on the specific model and manufacturer.
| Parameter | Specification |
|---|---|
| Operating Voltage | 3V to 24V DC (varies by model) |
| Rated Current | 100mA to 2A (depending on load) |
| Stall Current | Up to 10A (varies by motor size) |
| Speed | 1000 to 10,000 RPM (no load) |
| Torque | 0.1 to 10 Nm (varies by model) |
| Power Output | 0.1W to 100W |
| Motor Type | Brushed or Brushless DC |
| Shaft Diameter | 2mm to 6mm |
| Dimensions | Varies (e.g., 25mm x 20mm for small motors) |
DC motors typically have two terminals for electrical connections. These terminals are used to control the motor's direction and speed.
| Pin | Description |
|---|---|
| + | Positive terminal: Connect to the positive voltage supply. |
| - | Negative terminal: Connect to ground or negative voltage. |
For motors with additional features (e.g., encoders or speed sensors), there may be extra pins. 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.
// Define motor control pins
const int IN1 = 9; // Motor direction pin 1
const int IN2 = 10; // Motor direction 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 clockwise at 50% speed
digitalWrite(IN1, HIGH); // Set direction
digitalWrite(IN2, LOW);
analogWrite(ENA, 128); // Set speed (0-255)
delay(2000); // Run for 2 seconds
// Rotate motor counterclockwise at full speed
digitalWrite(IN1, LOW); // Reverse direction
digitalWrite(IN2, HIGH);
analogWrite(ENA, 255); // Set speed to maximum
delay(2000); // Run for 2 seconds
// Stop the motor
digitalWrite(IN1, LOW);
digitalWrite(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:
Arduino Resets When Motor Starts:
Q: Can I connect a DC motor directly to an Arduino?
A: No, the Arduino cannot supply the high current required by a DC motor. Use a motor driver or an H-bridge circuit.
Q: How do I control the speed of a DC motor?
A: Use PWM (Pulse Width Modulation) to vary the voltage applied to the motor, which controls its speed.
Q: What is stall current, and why is it important?
A: Stall current is the maximum current the motor draws when it is not rotating. Ensure your power supply and driver can handle this current to avoid damage.
Q: Can I use a DC motor for precise positioning?
A: DC motors are not ideal for precise positioning. Use a stepper motor or a DC motor with an encoder for such applications.