About Me

Pilani, Rajasthan, India
I am an engineering student currently pursuing an undergraduate degree in Electronics & Instrumentation from BITS Pilani, Pilani campus. My hobbies are reading novels- fiction and non-fiction alike, playing and watching football, dabbling with new software and going through blogs. I love reading Electronics For You. It has helped me a lot in my college life. And sometimes, people around me.

Hope you find this blog useful. Thank you.

Tuesday, May 24, 2011

Driving Circuits for DC motors

For a first timer, the rotation of a motor’s shaft, at just a push of a button, is pure thrill! Especially,if he has designed the circuit himself. This post is dedicated to DC motors, their driving circuits and ends with a sample DIY (do it yourself) breadboard circuit.

DC motor

The typical DC motor used in robotics is a 2 wired object having a shaft at its end.  

Typical ratings of DC motors commonly used are given in terms of ‘maximum supply voltage’ for stable operation and no-load speed expressed in ‘rpm’ (revolutions per minute). These motors are generally internally geared to provide increased torque to carry the weight of the robot and the circuitry and the ‘payload’ if any. Another important property of DC motors is that they are current-intensive components. Hence, ‘turning a motor on’ draws a large amount of current  suddenly from the power source.

For more theory on DC motors and their functioning, this is a very good starting point. 

Reversing the polarity of input voltage reverses the direction of rotation of the shaft (WOAH!! REALLY ?!). Also, it is a good practice to be aware of the absolute maximum ratings of your DC motor before using it as they vary from motor to motor.

DC motor driving circuits

1) H bridge circuits: Directional control is achieved by a hardwired circuit with the help of switches. This type of circuit is an example of pure hardware based control. The following diagram illustrates the directional control of a single DC motor using such a circuit.


Disadvantage of such a circuit is that wiring becomes highly complicated by the addition of a single motor to an existing circuit. Also, the switches undergo a lot of wear and tear as the switching action brings about a large change in potential (~12 V) and current (~400-500 mA - varies from motor to motor).

2) IC based circuits : The IC very commonly used for motor control is L293D. All ICs are accompanied by a ‘datasheet’ which all the details that you need to know before using that IC. You can download the datasheet of the L293D IC manufactured by ST Microelectronics here. The most important parts of this datasheet for us would be the pinout diagram (Page 2), the absolute maximum (Page 2) and the typical characteristics (Page 3). Following is the pinout diagram (from the datasheet) of L293D.


The functions of the various pins in simple terms are:

EnableX (X = 1,2) enables that side of the IC. Driving the EnableX pin high (~5 V generally) allows us to use the corresponding side (left or right) of the IC.

InputX (X = 1,2,3,4) is the control input for the IC. Driving InputX high drives the OutputX pins to Vs volts and driving it low (~0 V) makes the OutputX pin go low.

Vs is the voltage you want to apply to the DC motor connected across the output pins.

GND is the common or the reference potential of the circuit.

Vss is the control input for the IC that determines the minimum voltage that can be applied across the motor i.e. the minimum value of Vs.

We can achieve bi-directional control of two motors safely using this IC. For unidirectional control (not generally the case), we can use a single IC for 4 motors, but this is generally not done as a lot of current flows through the IC as all motors run simultaneously (the worst case), which might smoke it up – smoking is injurious for humans and ICs both!


DIY Breadboard schematic

Following bread-board schematic made using Fritzing Alpha illustrates the typical connection. Open the image in a new tab/window and have a close look at the connections.


Please note, in the above circuit, I have used a 5 V regulator IC (7805 or TO-220) to obtain 5V from 9V. All you need to know right now is that, with the named part of the IC facing you, the left most pin is the Input pin (Pin 1), the centre pin is the Common or the Ground (Pin 2) and the last pin is the Output 5 V pin (Pin 3). For proper functioning of this IC, the input voltage should be at least 2 V greater than the regulated voltage (5 V in this case). This diagram should make the connections clearer.
Also, the connections to the input have not been shown. They have to be done using switches between 5 V and GND potentials. Try it out yourself!


Cost breakup


DC Motor – Rs. 150-200
L293D IC – Rs. 60-80 

Hope this post was useful. Trust me, you will find yourself using the same circuit in almost all your motor-driving endeavours.
See ya!






2 comments:

  1. Hi. I've just passed my boards and I am enthusiatic and eager to learn robotics. My knowledge is solely based on IIT-JEE level preperation of Physics and Mathematics. Will reading your blog will be sufficient, or do I need to hook up to other sources as well? So far I have understood whatever you've stated.

    ReplyDelete
  2. Hi. I've just passed my boards and I am enthusiatic and eager to learn robotics. My knowledge is solely based on IIT-JEE level preperation of Physics and Mathematics. Will reading your blog will be sufficient, or do I need to hook up to other sources as well? So far I have understood whatever you've stated.

    ReplyDelete