Dc Motor Driver Circuit



The proposed circuit can be considered almost a perfect DC motor speed controller. It is basically a PWM (Pulse Width Modulated) motor driver that incorporates two separate stages for the generation of the pulses. An external variable DC voltage source is effectively translated into a varying PWM signal. The two thick lines on the left are the main DC power supply (probably from some battery source or maybe a DC adapter). Once the power is routed through this circuit, you get a 5 volt potential difference across the ground and the line marked +5V. And you get 12 volts potential difference across the +12V line and ground.

DC Motor Driver Circuit

Circuit

Motor Drives

Motor drives are circuits used to run a motor. In other words, they are commonly used for motor interfacing. These drive circuits can be easily interfaced with the motor and their selection depends upon the type of motor being used and their ratings (current, voltage).

Major components in Motor Drives

  • For DC Motors.

The major motor drive components for DC motors are: a controller, a motor driver IC or a motor driver circuit, the desired DC motor being used, power supply unit and the necessary connections to the motor.

  1. Controller: The controller can be a microprocessor or a microcontroller.
  2. Motor Driver IC or Motor Driver Circuits: They are basically current amplifierswhich accept the low current signal from the controller and convert it into a high current signal which helps to drive the motor.
  3. Motor: Motor is defined as an electric or mechanic device that can create a motion. While interfacing with the controller; some of the motors like DC motor, stepper motor and brushless dc motor may require a driver IC or driver circuit. DC motor is a type of motor that can convert DC into a mechanical power. In a brushless DC motor, it consists of a DC power source, an inverter producing an AC signal to drive the motor. While stepper motor is a brushless DC electric motor that converts electrical pulses into discrete mechanical motions.
  4. Power Supply Unit: Provides the required power to the motor drive.
  • For servo motor

Servo motor is a type of actuator device that consists of a motor and a sensor to control velocity, acceleration etc. The major motor drive components for a servo motor are a controller, power supply unit, servo motor and the necessary connections with the motor.

Commonly, motor drive for a servo motor is also known as Servo motor controller or Servo Motor Driver. Usually, 8051 controllers are used for controlling a servo motor driver with a single servo motor. If there are multiple servo motors; then PIC, ATMEGA etc. can be used.

DC Motor Driver Circuits

Motor Driver circuits are current amplifiers. They act as a bridge between the controller and the motor in a motor drive. Motor drivers are made from discrete components which are integrated inside an IC. The input to the motor driver IC or motor driver circuit is a low current signal. The function of the circuit is to convert the low current signal to a high current signal. This high current signal is then given to the motor. The motor can be a brushless DC motor, brushed DC motor, stepper motor, other DC motors etc.

Features

  • High level functionality.
  • Better performance.
  • Provides high voltage.
  • Provides high current drive.
  • Includes protection schemes to prevent the failure of motors due to any faults.

Need for Motor Driver Circuits/ICs

In motor interfacing with controllers, primary requirement for the operation of the controller is low voltage and small amount of current. But the motors require a high voltage and current for its operation. In other words we can say the output of the controller or processor is not enough to drive a motor. In such a case direct interfacing of controllers to the motor is not possible. So we use a Motor Driver Circuit or Motor Driver IC.

Not only in the case of controllers, while connecting motors with 555 timer ICs or 74 series ICs; they also cannot provide the large current required by the motor. If direct connection is given, there might be a chance of damage to the IC.

Types of DC Motor Driver Circuits

1. Transistor Based DC Motor Driver Circuit

Transistor based DC motor driver circuit is one of the simple DC motor driver circuit. It uses a power transistor (D880), DC motor and a resistor for its operation. Let IN be the input to the base of the transistor. To the collector of the transistor, the DC motor is connected. Emitter of the transistor is placed to ground. Normal Vcc given to the circuit is 12volt. Here the main point to note is that, check the DC motor being used. While choosing the transistor and the DC motor; the current rating must be noted. Always the current rating of the DC motor must be smaller than that of the transistor being used. Application of this motor driver circuit is for single direction control of the motor; e.g. Line following Robot.

Input (IN)

Motor Action

0 volt

Motor Stops

5V

Motor is in Action

2. H Bridge Circuit

H bridge circuit is one of the other commonly used motor driver circuit. In robotic applications, were the DC motor has to run in backward and forward direction; H bridge circuits play a major role. The name H Bridge is used because of the diagrammatic representation of the circuit.

Usually the H bridge circuit contains 4 switches S1, S2, S3 and S4. These switches can be relays, or P channel and N channel BJTs, MOSFETs, or they can be N channel MOSFETs only. Here a basic H bridge circuit is shown in the figure below were NPN transistors are placed at the high voltage and PNP transistors to the low voltage.

Transistor Based H-Bridge Circuit

  • Components

The components used in the circuit are NPN and PNP power transistors, resistors, diodes, a DC motor, and a power supply of about 12V.

  • Input

Input 1 and Input 2 are the inputs to the H bridge circuit.

  • Operation

IN1

IN2

A

B

Motor Action

0

0

0

0

Stop

0

1

0

Vcc

Anticlockwise

1 (5V)

0

Vcc

0

Clockwise

1

1

Vcc

Vcc

Brake

3. Using L293D

L293D is a dual H bridge motor driver IC. This 16 pin motor driver IC can drive the motors in anti-clockwise and clockwise direction. The connection of the DC motors to L293D IC is given below.

Pin Description of L293D

  • 1 and 9 are Enable Pins.
  • 2, 7, 10, 15 are Input pins.
  • 3,6,11,14 are output pins
  • 4, 5, 12, 13 are the Ground pins.
  • 8 and 16 pins are for Vcc.

Operation of L293D controlling two DC motors

  • Enable pins should be connected to +5v for the motor driver to start its operation. If these pins are connected to GND then the motors will stop its operation. Enable 1, 2 drives the H bridge circuit on the left side while the Enable 3, 4 drives the H Bridge on the right side.
  • Consider the motor placed at the left (to pin 3 and 6). The operation is described in the table below. Its enable pin is Pin1. Input pins are pin2 and pin7.

Pin1

Pin2

Pin7

Action of Motor

+5 volt

0 volt

0 volt

Stop

+5 volt

0 volt

+5 volt

Clockwise

+5 volt

+5 volt

0 volt

Anti-clockwise

+5 volt

+5 volt

+5 volt

Stop

0 volt

-

-

-

  • The same operation takes place while controlling the motor placed at the right side (pin11 and 14). Here the enable pin will be pin9; input pins are pin 10 and 15.

4. Using ULN2003

Dc Motor Driver Ic

ULN2003 can be used as a motor driver IC. It contains high current and voltage Darlington arrays. This driver IC can be used for driving stepper motors. This is because stepper motor needs more current for its operation in the motor drives. The circuit below shows the ULN2003 with a stepper motor. The input to ULN2003 are K= {0011, 0110, 1100, 1001}; and L= {1001, 1100, 0110, 0011}. These input sequences will energize the two adjacent phases of the stepper motor.

  • Reverse voltage protection

Hook up the power supply backwards with most motor drivers and you can throw them in the trash. Not so with the Basic Motor Driver. It is fully reverse voltage protected up to 40V.

  • Simple enable/direction interface

Each motor (or stepper motor phase) is controlled by only 2 inputs: ENABLE and DIRECTION. The ENABLE input can be driven by a PWM output to control the average motor current. The DIRECTION input controls the direction of current flow. These four digital pins completely control 2 brush DC motors or 1 bipolar stepper motor. This interface is compatible with other popular Arduino motor driver shields. See the Connections section below for how to hook up these signals.

  • Use external power or Arduino power

You can either use an external voltage source (8V-30V) or use the Vin power from the Arduino. NOTE: For external voltages greater than 15V you must cut jumper J17 when the shield is plugged in to an Arduino (the Ruggeduino is OK up to 24V). See the diagram below in the Connections section for the location of this jumper.

  • Terminal blocks included and assembled
Circuit

The L298P motor driver, 2-pin 3.5mm terminal blocks, protection diodes and resistors, etc. are all pre-assembled to the board. To use as an Arduino shield, you will need to purchase and solder either pin headers or stacking headers. You will need two 6-pin headers and two 8-pin headers. To use as a standalone motor driver, either solder wires directly to the board or solder in a 6-pin terminal block.

Circuit
  • Configurable control pins for driving multiple motors
Circuit

Within a few minutes you can modify the Basic Motor Driver to use different control pins (simple soldering required). Together with stacking headers this means you can stack multiple Basic Motor Driver shields together and independently control multiple motors. Since the Arduino has 6 PWM outputs you can stack up to 3 shields together and independently have PWM control over 6 DC motors or 3 stepper motors. More info below.

  • Parallel phases for double the current

Dc Motor Driver Circuit Using Mosfet

For driving one DC motor you can connect the two output phases in parallel and get twice the current output. See our application note for more details.

Here are some sample programs for demonstrating the applications of the Basic Motor Driver. They are provided as INO files (i.e., sketches) for use with the Arduino development environment.

Driver

Brushless Dc Motor Driver Circuit Diagram

  • Basic DC Motor Control: INO file: rmcbasic.ino

This sketch demonstrates how simple it is to use the Basic Motor Driver to control the direction and rotation of two brush DC motors.

  • Stepper Motor Control: INO file: stepperdemo.ino

This sketch demonstrates keyboard control of a stepper motor. Open up the serial monitor (or any other terminal program) and use single-keystroke commands to control stepper motor speed, direction, and power. See the documentation in the sketch for usage notes.

The sketches above make use of the built-in Stepper library that comes with the Arduino software. The AccelStepper library is another library for controlling stepper motors and has more features and more examples.

NOTE: The AF_Motor library is only designed to work with the Adafruit motor shield and will not work with the Basic Motor Driver or other motor drivers that directly control motor driver pins.

Basic Control

The following Arduino pins are used by default to control the two motor outputs.