Engineering Knowledge

Free software, projects, tutorials & more!
Home     Links     Site Map     Contact Us     About      

 You are here: Home > Projects > DC Motor Control & Interfacing 

   

 DC Motor Control & Interfacing 

By Engneering Knowledge administrator Rev1.0

Copyright© Engneering Knowledge  2007. All rights reserved.

Interfacing and controlling of a simple DC motor is an interested subject to many hobbyists and engineers, many of them used DC motor to move mechanical part, automated task, or just for fun and learning. In this project, we will build an interfacing circuit to control the speed and direction of any DC drive.

To be able to modify the design to fit your system requirements, and to do all the system by your self ("DIY"). However, you should know some basic principles about DC motor control.

A permanent magnet DC motor responds to both voltage and current. The steady state voltage across a motor determines the motor’s running speed, and the current through its armature windings determines the torque. Apply a voltage and the motor will start running in one direction; reverse the polarity and the direction will be reversed. If you apply a load to the motor shaft, it will draw more current, if the power supply does not able to provide enough current, the voltage will drop and the speed of the motor will be reduced. However, if the power supply can maintain voltage while supplying the current, the motor will run at the same speed. In general, you can control the speed by applying the appropriate voltage, while torque is controlled by current. In most cases, DC motors are powered up by using fixed DC power supply, therefore; it is more efficient to use a chopping circuit.

 Explanation:
Think how you ride your bicycle. There are times when you pedal, and times when you coast. When coasting you are using the stored energy, when you feel you are going too slow you pedal again for some time and then coast again. This pedal-coast-pedal cycle is called PWM. The amount of time you pedal is called the on time. The amount of time you coast is called the off time. The total time is the sum of on time and off time.


Consider what happens when a voltage applied to a motor’s windings is rapidly turned ON and OFF in such a way that the frequency of the pulses produced remains constant, but the width of the ON pulse is varied. This is known as Pulse Width Modulation (PWM). Current only flows through the motor during the ON portion of the PWM waveform. If the frequency of the PWM input is high enough, the mechanical inertia of the motor cannot react to the ripple wave; instead, the motor behaves as if the current were the DC average of the ripple wave. Therefore, by changing the width of pulse, we can control the motor speed.

 Tip:
If the source of motor supply voltage is not the same source for logic supply voltage; don’t forget to make the ground common for both supplies.

 

To design the circuit we need a DC motor driver chip L293D, 555 timer chip to modulate the pulse width in order to control the motor speed and a few discrete components.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

L293D consist of dual H-Bridge channel and built-in freewheeling diode, according to the manufacturer datasheet; it can operate a motor with a maximum of 36v at 600mA and 5 kHz switching frequency. It has two control inputs, one enable input and one output per each channel. Control inputs are used to control the direction while the enable input is used for PWM. In addition, it has four ground center pins connected together and used as a heat sink.


It’s a good idea to connect the two control inputs by means of inverter, so when we apply the logic value 1 the motor will start running in a certain direction, when we apply the logic value 0 it will inverse the direction! Note that I have constructed this inverter by using 400Ω and 500Ω in order to get the output very close to 5V. However, you can use a higher resistors value to avoid draw useless current, it is always depends on your projects and the way you evaluate the circuit!

 

A variant resistor in 555 timer circuit will allow the operator to change the motor speed instantly. And one more time, you can change the resistors value to fit your projects requirements! You can use the following equations to determine exactly resistors and duty cycle:

T: Total time.
TH: Pulse width.
TL: Time between two pulses.

C: C1 in the schematic.
Ra: R2+R3 in the schematic.
Rb: R1 in the schematic.
DC: Duty Cycle.

 Invitation: Share your knowledge with others. 

If you know how to build the circuit by another simulation software, build it and send it to contact@engknowledge.com . All credit will be yours.

For your reference, I have built a model in MATLAB® SimuLink® to simulate a DC motor, I have constructed the H-Bridge connection using IGBT transistor, and some logic gates to control and switching the appropriate transistor in order to flip the rotation direction when the operator click on the switch. Download the model here. 

 

When you change the switch status, the voltage across the motor will be inversed, which will lead the output to be inversed as well. changing the duty cycle, will change the motor output current and power. The default duty cycle value is 25%, run the model and write down exactly the current when the system reach the steady state condition, now change the duty cycle value, make it 10% or 90% and see how the current value will change! To be able to see the difference you have to zoom in Y-axes. Actually, I have tried to change the duty cycle during run time, but I could not find a solution! If you know how to do it, just drop me the hint. Just notice how much the motor draw electrical current at start up due to motor inertia.


 

 

 

Light Control System               *Very Informative!

 

Power Supply Design              *Very Informative!

 

 

 

*Sponsored Link.

 

 DC Motor Control & Interfacing 

By Engneering Knowledge administrator Rev1.0

Copyright© Engneering Knowledge  2007. All rights reserved.


 You are here: Home > Projects > DC Motor Control & Interfacing