Leuterio ECE43 EXP1 ECET421La PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

_________DC Motor Control with Computer and Microcontroller Interfacing_________

I. Introduction

Basically, Electrical DC Motors are actuators that convert electrical energy into mechanical energy.
Such can have its rotation speed and direction controlled through various ways, most popularly through PWM and
basic motor drivers. In this experiment, the rotation speed and direction of the DC Motor in a conveyor was
controlled through a microprocessor (Arduino Uno) and programmed GUI’s. The mechanisms and processes
found in DC Motor control were aimed to be investigated yielding an improved understanding of DC Motor
control and operations.

II. Objectives

• To control the direction of rotation of a DC motor using H-bridge circuit.


• To control the speed of rotation of a DC motor using Pulse width modulation.
• To create an Arduino programming to control the DC motor.
• To create a computer program user interface to send data control to Arduino

III. Discussion

A DC Motor was placed as the actuator of a conveyor. Upon connecting the DC Motor to the L293D
driver, the said configuration was connected to the microcontroller. For the first part, a program to control the
direction of the DC Motor was coded and uploaded to the microcontroller. The circuit is configured in such a way
that the IN1 and IN2 of the motor driver was connected to the pin 1 and pin 2 of the microcontroller consecutively.
Sending characters serially provide control for the motor’s rotary direction. An input of ‘A’ made the motor rotate
in a clockwise direction while an input of ‘B’ made the motor rotate in a counter clockwise direction. An input of
‘C’ on the other hand, caused the motor to stop. This happens as the L293D IC works on the basic principle of H-
bridge. The microprocessor was programmed to send logic 1 to pin 1 and logic 0 to pin 2 when it receives ‘A’, to
send logic 0 to pin 1 and logic 1 to pin 2 when it receives ‘B’ and to send logic 0 to both pin 1 and pin 2 when it
receives ‘C’. As the basic principle of H-bridge is applied on the said IC, it acts as if it has four switches namely S1,
S2, S3 and S4. When the S1 and S4 switches are closed, then a positive voltage will be applied across the motor. By
opening the switches S1 and S4 and closing the switches S2 and S3, this voltage is inverted, allowing invert operation
of the motor. The values in IN1 and IN2 controls such switching mechanism hence changes the direction of DC
motor rotation.
The next activity was controlling the DC motor speed. The circuit is configured in such a way that
the EN1 of the motor driver was connected to the pin 9 of microcontroller. A program to control the speed of the
DC Motor rotation was coded and uploaded to the microcontroller. The input PWM was received as the serial
input was programmed to be written to pin 9. Such was done through pulse width modulation (PWM). RPM
variation is performed by increasing or decreasing the time interval when the control signal has the logic value 1
(tON). Thus, at a duty-cycle of 100%, the motor will have the maximum rpm, tON will be maximal and tOFF will be
zero. In inputing these to the microcontroller, 255 equates 100% duty-cyle and 0 equates 0%. It was observed that
the DC Motor rotation speed increased as the input value approached 255 and decreased as the input decreased.
The DC Motor stopped rotating when the serial input was zero.

For the last two activities, GUI’s were programmed to create an interface that will serially
communicate with the motor driver. The first GUI was created to control the direction of motor direction while
the second GUI was programmed to control DC motor rotation speed with the help of a slider.

The main obstacles found in this experiment was programming; errors were encountered before the
correct code was successfully uploaded to the microcontroller. Another was confusion with setting up the circuits
as there as an IC motor driver involved. Such can be improved though practice and improved understanding of
the circuits being used.

Sheet ____ of ____


IV. Conclusion

A DC Motor can be controlled with the help of a microcontroller and L293D Motor Driver. L293D
IC works on the basic principle of H-bridge. The H-bridge mechanism acts like four switches namely S1, S2, S3
and S4 are switched to give different operations such as clockwise, counter-clockwise, brake, free run and short. Pulse width
modulation (PWM) provides another way to control DC Motor. The motor rpm can be varied by increasing or
decreasing the time interval when the control signal has the logic value 1, or the width of TON’s pulse, thus increasing
or decreasing the rotation speed. The instruction for direction and PWM can be serially sent to the microprocessor
through serial monitor or, better, with the help of a Graphical User Interface. All in all, the DC Motor was
successfully controlled with the help of H-Bridge mechanism and PWM. It is as well concluded that the graphical
user interfaces and Arduino codes were successfully programmed.

V. References

• Agarwal, T. (2014). H-Bridge Motor Control Circuit Using L293d Motor Driver IC. Retrieved from
https://www.elprocus.com/h-bridge-motor-control-circuit-using-l293d-ic/
• Petru, L. and Mazen, G. (2014). PWM Control of a DC Motor Used to Drive a Conveyor Belt. Retrieved from
https://core.ac.uk/download/pdf/81962714.pdf

You might also like