
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. It operates on the principle of electromagnetic induction, where a magnetic field interacts with a current-carrying conductor to produce rotational motion. DC motors are widely used due to their simplicity, reliability, and ability to provide precise speed and torque 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 Arduino UNO and a BTS7960 motor driver, with additional components for voltage and current sensing. The Arduino reads sensor data and controls the motor driver to regulate the motor's operation, while a Nockenschalter switch and various resistors and capacitors provide additional control and stability.

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.
Below are the general technical specifications for a typical DC motor. Note that actual values may vary depending on the specific model.
For a basic brushed DC motor, there are typically two terminals:
| Pin/Terminal | Description |
|---|---|
| Positive (+) | Connects to the positive terminal of the power supply. |
| Negative (-) | Connects to the negative terminal of the power supply. |
For brushless DC motors, additional control pins may be present, such as Hall sensor outputs or PWM inputs. Refer to the motor's datasheet for specific 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 and L298N motor driver
// Define motor control pins
const int ENA = 9; // PWM pin for speed control
const int IN1 = 8; // Direction control pin 1
const int IN2 = 7; // Direction control pin 2
void setup() {
// Set motor control pins as outputs
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, 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 Not Spinning:
Overheating:
Erratic Speed or Direction:
Noisy Operation:
By following this documentation, users can effectively integrate and operate a DC motor in their projects while avoiding common pitfalls.