Motor Driver

    1. What is a Motor driver and why do we need it?

      Micro-controllers provide a number of GPIO (General Purpose Input Output) pins. These pins can be controlled to give a ‘High’ or a ‘Low’ as per requirement using some software like Arduino . Now your DC motor is also rated at 5V. Therefore ,you assume that the motor could be controlled easily by setting one terminal at a ‘High’ and the other at ‘Low’and the sense of rotation could be controlled by just reversing the terminals. Theoretically speaking , this is correct but practically it is not feasible. Can you tell the reason? Well, the reason is simple.The microcontroller is not capable of supplying the current demanded by your motor. The small current(in range of milli amperes) supplied by your microcontroller is negligible compared to the current drawn by your motor. As a result , the motor will try to extract maximum power possible from the microcontroller, resulting in increased heat dissipation leading to the frying of your microcontroller.
      Here is where the motor driver plays its role. The motor driver magnifies the small powered signals from the micro-controller into powerful signals capable of driving motors. Therefore , it protects your microcontroller from getting burnt while controlling motors .The motor driver also enhances your control on your motors like deciding the sense of rotation of motors. For eg.The enable pins in the L298 motor driver IC helps in the control of two motors using dual H bridge.

    2. What is stall current?

      The current drawn by a motor is directly proportional to the load it is subjected. If you leave a motor running freely without any load acting on its shaft , it will draw minimum current . But if you go on increasing the load on the motor ,the motor will react by drawing more current in order to carry the load until it reaches a stage where it could n’t provide enough torque to carry the load. As the torque provided by the motor is directly proportional to the current supplied by your power supply, the current drawn by the motor also reaches a peak. The current corresponding to the maximum torque is called the stall current. The stall current is the maximum current that the motor driver must provide for most efficient use of the motor.

    3. What is the principle of the motor driver?

The motor driver works on an H-bridge circuit shown in Fig.1 .

S1 S2 S3 S4 Motor
CLOSED OPEN OPEN CLOSED Will run forward
OPEN CLOSED CLOSED OPEN Will run backward
OPEN CLOSED CLOSED OPEN Will run backward
CLOSED CLOSED LOW LOW Won’t run
CLOSED CLOSED CLOSED CLOSED Won’t run

H-bridge

3. What is an L298 motor driver IC and what are its pins for?

The L298 motor driver IC is shown in Fig.2.According to Its datasheet , it has 15 pins which are used for the following purposes:

Pin No. Name Purpose
1 Current sensing A Measures the current drawn by Motor A
2,3 Output 1 & 2 Output given by motor driver as an input for the motor
4 Supply voltage,Vs External supply voltage i.e. battery
5,7/td> Input 1 & 2 Input given to the motor driver by the microcontroller for motor A.
6 Enable A Microcontroller gives instructions to the driver on how to run the motor A.
8 GND Ground
9 Logic voltage supply Voltage supply from the arduino board.
10,12 Input 3&4 Input given to the motor driver by the microcontroller for motor B.
11 Enable B Microcontroller gives instructions to the driver on how to run the motor B.
13,14 Output 3 & 4 Output given by motor driver as an input for the motor
15 Current sensing B Measures the current drawn by Motor B

L298 motor driver

4.What is a Motor shield?

A lot of wires often make a circuit messy and hard to work on. Motor drivers have got a lot of pins .Connecting each pin with separate wires is really annoying. A Motor shield is an answer to this problem. The Motor shield brings all the connections required to drive a motor on a single board in a proper manner so that it is convenient to operate on.