Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Motor-Driver: Examples, Pinouts, and Specs

Image of Motor-Driver
Cirkit Designer LogoDesign with Motor-Driver in Cirkit Designer

Introduction

A Motor-Driver is an electronic circuit designed to control the operation of a motor by regulating its speed, direction, and sometimes torque. It acts as an interface between a microcontroller (or other control systems) and the motor, enabling precise control over the motor's performance. Motor-Drivers are essential in applications where motors are used, as they provide the necessary current and voltage levels that microcontrollers cannot directly supply.

Explore Projects Built with Motor-Driver

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32 and L298N Motor Driver Controlled Battery-Powered Robotic Car
Image of ESP 32 BT BOT: A project utilizing Motor-Driver in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled Dual Motor Driver for Robotic Vehicle
Image of ESP 32 BT BOT: A project utilizing Motor-Driver in a practical application
This circuit is designed to control four DC gearmotors using an L298N motor driver module, which is interfaced with an ESP32 microcontroller. The ESP32 uses its GPIO pins to send control signals to the L298N driver, enabling the independent operation of the motors, such as direction and speed control. Power is supplied by a 12V battery connected to the motor driver, with the ESP32 receiving its power through a voltage regulator on the L298N module.
Cirkit Designer LogoOpen Project in Cirkit Designer
DC Motor Control System with BTS7960 Motor Driver and Arcade Buttons
Image of Hanif: A project utilizing Motor-Driver in a practical application
This circuit controls a DC motor using a BTS7960 motor driver, powered by a 12V power supply and regulated by a DC-DC step-down converter. The motor's operation is controlled via two arcade buttons and a rocker switch, allowing for user input to manage the motor's direction and power.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 and L298N Motor Driver-Based Wi-Fi Controlled Robotic Car
Image of ESP 32 BT BOT: A project utilizing Motor-Driver in a practical application
This circuit is a motor control system using an ESP32 microcontroller and an L298N motor driver to control four DC gear motors. The ESP32 provides control signals to the L298N, which in turn drives the motors, powered by a 12V battery, enabling bidirectional control of the motors for applications such as a robotic vehicle.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Motor-Driver

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP 32 BT BOT: A project utilizing Motor-Driver in a practical application
ESP32 and L298N Motor Driver Controlled Battery-Powered Robotic Car
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP 32 BT BOT: A project utilizing Motor-Driver in a practical application
ESP32-Controlled Dual Motor Driver for Robotic Vehicle
This circuit is designed to control four DC gearmotors using an L298N motor driver module, which is interfaced with an ESP32 microcontroller. The ESP32 uses its GPIO pins to send control signals to the L298N driver, enabling the independent operation of the motors, such as direction and speed control. Power is supplied by a 12V battery connected to the motor driver, with the ESP32 receiving its power through a voltage regulator on the L298N module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Hanif: A project utilizing Motor-Driver in a practical application
DC Motor Control System with BTS7960 Motor Driver and Arcade Buttons
This circuit controls a DC motor using a BTS7960 motor driver, powered by a 12V power supply and regulated by a DC-DC step-down converter. The motor's operation is controlled via two arcade buttons and a rocker switch, allowing for user input to manage the motor's direction and power.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP 32 BT BOT: A project utilizing Motor-Driver in a practical application
ESP32 and L298N Motor Driver-Based Wi-Fi Controlled Robotic Car
This circuit is a motor control system using an ESP32 microcontroller and an L298N motor driver to control four DC gear motors. The ESP32 provides control signals to the L298N, which in turn drives the motors, powered by a 12V battery, enabling bidirectional control of the motors for applications such as a robotic vehicle.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Robotics: Controlling the movement of robotic arms, wheels, or other actuators.
  • Industrial Automation: Driving conveyor belts, pumps, or other machinery.
  • Consumer Electronics: Used in devices like drones, electric toys, and home appliances.
  • Automotive: Powering electric windows, wipers, and other motorized systems.
  • CNC Machines: Controlling stepper or DC motors for precision machining.

Technical Specifications

Below are the key technical details for the Custom Motor-Driver:

General Specifications

  • Input Voltage Range: 5V to 36V
  • Output Current (per channel): Up to 2A continuous, 3A peak
  • Number of Channels: Dual-channel (can control two motors independently)
  • Control Logic Voltage: 3.3V or 5V compatible
  • Supported Motor Types: DC motors, stepper motors
  • PWM Frequency: Up to 20 kHz
  • Thermal Protection: Built-in over-temperature shutdown
  • Dimensions: 40mm x 30mm x 15mm

Pin Configuration and Descriptions

The Motor-Driver has the following pin layout:

Pin Name Type Description
VCC Power Input Connect to the motor power supply (5V to 36V).
GND Power Ground Common ground for the motor power supply and logic circuit.
IN1 Logic Input Control signal for Motor 1 direction (HIGH for forward, LOW for reverse).
IN2 Logic Input Control signal for Motor 1 speed (PWM signal for speed control).
IN3 Logic Input Control signal for Motor 2 direction (HIGH for forward, LOW for reverse).
IN4 Logic Input Control signal for Motor 2 speed (PWM signal for speed control).
OUT1 Motor Output Connect to one terminal of Motor 1.
OUT2 Motor Output Connect to the other terminal of Motor 1.
OUT3 Motor Output Connect to one terminal of Motor 2.
OUT4 Motor Output Connect to the other terminal of Motor 2.
ENA Enable Input Enable pin for Motor 1 (HIGH to enable, LOW to disable).
ENB Enable Input Enable pin for Motor 2 (HIGH to enable, LOW to disable).

Usage Instructions

How to Use the Motor-Driver in a Circuit

  1. Power Connections:

    • Connect the VCC pin to the motor's power supply (ensure it matches the motor's voltage rating).
    • Connect the GND pin to the common ground of the power supply and the microcontroller.
  2. Motor Connections:

    • Connect the motor terminals to the OUT1 and OUT2 pins for Motor 1, and OUT3 and OUT4 for Motor 2.
  3. Control Connections:

    • Connect the IN1 and IN2 pins to the microcontroller's GPIO pins to control Motor 1.
    • Similarly, connect the IN3 and IN4 pins to control Motor 2.
    • Use the ENA and ENB pins to enable or disable the respective motors.
  4. Logic Voltage:

    • Ensure the control logic voltage (3.3V or 5V) matches the microcontroller's output voltage.
  5. PWM for Speed Control:

    • Use a PWM signal on IN2 (Motor 1) or IN4 (Motor 2) to control the motor's speed.

Example Code for Arduino UNO

Below is an example of how to control a DC motor using the Motor-Driver and an Arduino UNO:

// Define motor control pins
const int ENA = 9;  // Enable pin for Motor 1
const int IN1 = 7;  // Direction pin for Motor 1
const int IN2 = 6;  // Speed (PWM) pin for Motor 1

void setup() {
  // Set motor control pins as outputs
  pinMode(ENA, OUTPUT);
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);

  // Initialize motor in stopped state
  digitalWrite(ENA, LOW);  // Disable motor
  digitalWrite(IN1, LOW);  // Set direction to forward
  digitalWrite(IN2, LOW);  // No speed (stopped)
}

void loop() {
  // Example: Run motor forward at 50% speed
  digitalWrite(IN1, HIGH);  // Set direction to forward
  analogWrite(IN2, 128);    // Set speed to 50% (128 out of 255)
  digitalWrite(ENA, HIGH);  // Enable motor
  delay(5000);              // Run for 5 seconds

  // Stop the motor
  digitalWrite(ENA, LOW);   // Disable motor
  delay(2000);              // Wait for 2 seconds

  // Example: Run motor in reverse at 75% speed
  digitalWrite(IN1, LOW);   // Set direction to reverse
  analogWrite(IN2, 192);    // Set speed to 75% (192 out of 255)
  digitalWrite(ENA, HIGH);  // Enable motor
  delay(5000);              // Run for 5 seconds

  // Stop the motor
  digitalWrite(ENA, LOW);   // Disable motor
  delay(2000);              // Wait for 2 seconds
}

Important Considerations and Best Practices

  • Power Supply: Ensure the motor power supply voltage matches the motor's specifications.
  • Heat Dissipation: The Motor-Driver may heat up during operation. Use a heat sink or cooling fan if necessary.
  • Current Limits: Do not exceed the maximum current rating (2A continuous, 3A peak) to avoid damage.
  • Decoupling Capacitors: Add capacitors near the VCC and GND pins to reduce noise and voltage spikes.
  • Wiring: Use thick wires for motor connections to handle high currents.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Motor Not Running:

    • Check if the ENA/ENB pins are set HIGH to enable the motor.
    • Verify the power supply voltage and connections.
    • Ensure the motor is properly connected to the output pins.
  2. Motor Running in the Wrong Direction:

    • Swap the IN1 and IN2 signals (or IN3 and IN4 for Motor 2).
    • Check the logic levels sent by the microcontroller.
  3. Motor Speed Not Changing:

    • Ensure the PWM signal is correctly configured on the IN2 or IN4 pins.
    • Verify the PWM frequency is within the supported range (up to 20 kHz).
  4. Overheating:

    • Reduce the motor load or use a cooling mechanism.
    • Check for short circuits or excessive current draw.

FAQs

  • Can this Motor-Driver control stepper motors? Yes, it can control stepper motors by driving the coils in sequence. However, additional logic may be required.

  • What happens if the current exceeds the rated limit? The Motor-Driver has built-in thermal protection and will shut down to prevent damage. Reduce the load and allow it to cool before resuming operation.

  • Can I use this Motor-Driver with a 3.3V microcontroller? Yes, the control logic is compatible with both 3.3V and 5V systems.

  • Is it possible to control two motors independently? Yes, the dual-channel design allows for independent control of two motors.