0% found this document useful (0 votes)
14 views

Agung 2014

Uploaded by

adalpa2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Agung 2014

Uploaded by

adalpa2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

ISBN : 978-1-4799-6127-6 Bali, 5 - 7 November 2014 ICSGTEIS 2014

Speed Control for DC Motor with Pulse Width


Modulation (PWM) Method Using Infrared Remote
Control Based on ATmega16 Microcontroller

I G. A. P. Raka Agung1), S. Huda2), I W. Arta Wijaya3)


1,2,3)
Department of Electrical Engineering, University of Udayana
Bukit Jimbaran, Bali, Indonesia
E-mail: 1)[email protected]

Abstract—The speed control of direct current (DC) motor for Remote control can be used to control devices in long
various applications is very important. In particular requirement, distance through infrared (IR) medium. Each keys on remote
setting a speed DC motor as the driving equipment must be control have different code. The different code can be convert
performed remotely. Under that condition, conducted a research on a to hexa digital data with IR receiver (TSOP1736) and
DC motor speed control with pulse width modulation (PWM) method
of the infrared remote control. PWM is method that may be used as a
processed in microcontroller[3]. The output of the
efficient DC motor speed control. Controller used TV remote control microcontroller are on off pulsed which used to rotate DC
to send data to ATmega16 microcontroller through the IR receiver. motor.
This command controls the L293D driver IC to control the direction
and speed of a DC motor. To calculate the speed of a DC motor, II. DESIGN
perforated disk attached to the motor shaft is used and placed A. Hardware Design
between the photodiode as a sensor and the LED. The results of the
research are the direction and speed of a DC motor can be set from The block diagram of a DC motor speed control system in
the infrared remote control with PWM method using ATmega16 this research can be seen in Fig. 1.
microcontroller. Furthermore, the results of these settings can be
displayed on the LCD every 7 seconds.
Keywords—dc motor, remote control, PWM, microcontroller

I. INTRODUCTION
Advances in technology led to the role of humans being
replaced by machines or automatic control devices to do some
job. One of such device in automatic control is motor. Motor
is device that converts electrical energy into mechanical
energy. The motor that utilizes a DC supply to produce
mechanical output is direct current (DC ) motor. Direct current
Fig. 1. Block Diagram System
(DC) motors have been widely used in many industrial
applications such as electric vehicles, steel rolling mills, TV remote control function sends data at infrared
electric cranes, and robotic manipulators due to precise, wide, wavelengths to the infrared receiver. Data received in the form
simple, and continuous control characteristics [1]. of pulses were delivered to the INT1 pin (PD3)
The motor speed can be controlled by controlling armature microcontroller to read bit by bit data, in order to obtain
voltage and armature current. These method have some different data on each key is pressed.
demerit because some power is wasted in control resistance. The results of the data translation remote control key are
PWM method also can be used to control dc motor speed. used by the microcontroller to control the speed of a DC motor
PWM circuit work by making a square wave with a variable via the IC driver L293D. Where the - key to set the motor
on to off ratio. The ratio can vary between 0 % - 100%. In this rotates to the left , the + key to set the motor rotates to the
manner variable power is transferred to load. Main advantage right , keys 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , and 0 to set the motor
PWM circuit over a resistive power control is the speed according to the duty cycle program has been set in the
efficiency[2]. On PWM 50% amount off pulse and on pulse is PWM, and the SLEEP key to stop the motor rotation .
equal.
The output of the photodiode is still in analog form so that
the analog comparator is added to convert it to digital form.

978-1-4799-6127-6/14/$31.00 ©2014 IEEE -108-


Logic 1 (High) pulse output when the light from the LED D. LCD Circuit [5]
passes through the hole in the disc , and logic 0 (Low) pulse LCD pins are connected to the ATmega16 microcontroller
output when the light from the LED is blocked by the disc. ports are DB4 - DB7 with PC4 - PC7, enable pin with PC3,
The digital data is then sent to the INT0 pin microcontroller to RS pin with PC2 and R/W pin is connected to GND. Contrast
be processed in order to obtain a DC motor speed in rpm units. LCD pin is connected on 1 KOhm resistor that used as a light
The result of setting a DC motor direction and speed will be background LCD brightness control. Fig. 4. shows the LCD
displayed on the LCD on port C (PC2 - PC7) every 7 seconds. circuit.
B. Power Supply Circuit
The power supply is needed in this research is to supply
+12 V and +5 V on DC motor, ATmega16 microcontroller, IC
TSOP1736, IC L293D, LCD, and speed sensor. Power supply
circuit can be seen in Fig. 2.

Fig. 4. LCD circuit

E. Infrared Receiver Circuit [3]


Infrared receiver used in this research is TSOP1736 which
consists of 3 pins, the VCC, GND, and outputs. LED on the
VCC is used to detect that the data can be received by the
Fig. 2. Power supply circuit infrared sensor, and LED will flash according to the pulses
received. Fig. 5. shows the infrared receivers circuit.
C. Minimum System ATmega16 Microcontroller Circuit [4]
Minimum system ATmega16 Microcontroller using
11.0592 MHz crystal oscillator. Port D is used as data input
infrared signal through pin INT1 and speed sensor DC motor
rotation through INT0 pin. Port B is used as a microcontroller
to adjust the output IC driver L293D, and port C is used as
input and output data to the LCD. Minimum system circuits
ATmega16 can be seen in Fig. 3.

Fig. 5. Infrared receiver circuit.

F. L293D IC circuit [6]


The pins of L293D IC are connected to ATmega16 port are
Enable1-2 (1-2EN) to PB2, IN1 (1A) to PB1, and IN2 (2A) to
PB0 , while OUT1 (1Y) and OUT2 (2Y) pins is connected to
DC motor terminals. Fig. 6. shows the L293D IC circuit.

Fig. 3. System minimum ATmega 16 microcontroller circuit

-109-
H. Sony SIRC Protocol
The remote control is used to provide data to an infrared
receiver as motor controllers in this research is the Sony TV
remote control. Sony remote control protocol uses pulse width
encoding of bits. Pulse width representing a logic 1 has a
length of 1.2 ms with a carrier of 40 kHz, while the width of
the pulse to a logic 0 is 0.6 ms. All high spikes separated by
intervals of space with a pulse length of 0.6 ms [7].
I. Software Design
ATmega16 microcontroller programing in this research
using basic language, namely the Bascom. Flow diagram
program DC motor speed control in this research can be seen
in Fig. 9.

Fig. 6. L293D IC circuit.

G. DC Motor Speed Sensors Circuit


To be able to read the speed of DC motor, added a
perforated disc mounted to the shaft of the DC motor as shown
in Fig. 6. Disc around a hole as much as 8 so light LED can
pass through the hole on the photodiode. The disc is placed
between the LED and the photodiode . If photodiode get light
from the LED, photodiode output to be logic 1 (high ) . If the
LED light does not hit the photodiode thus output to be logic
0 (low ). LED and photodiode circuit shown in Fig. 7. How
times photodiode logic 1 within a period of minute, the result
is divided by 8 ( number of holes ) would be associated with a
DC motor speed in rpm units. LED and photodioda circuit can
be seen on Fig. 8.

Fig. 7. Perforated disc

Fig. 9. Flow diagram DC motor speed control program

III. RESULTS AND DISCUSSION


A. Actual Tools
Fig. 8. LED and photodiode circuit
Realization tool made in this research can be seen in Fig.
10.

-110-
Fig. 11. LCD testing result

E. Infrared Receiver Circuit Testing


Infrared receiver tests is performed to prove that the sensor
can perform well data readout, and programs provided to read
remote control data has the appropriate. The test results can
Fig. 10. Result of design hadware. be seen in Table 3.

Testing a DC motor speed control system is done by TABLE 3. RESULT OF TESTING REMOTE CONTROL DATA KEY
measuring parameters directly at the time of the experiment. Key Data Key Data
1 128 8 135
B. Power Supply Circuit Testing
2 129 9 136
Testing is done using digital avometer by measuring 3 130 0 137
voltage 12 V DC motor and the supply voltage of 5 V as VCC. 4 131 + 244
The measurement results can be seen in Table 1. 5 132 - 245
6 133 SLEEP 182
7 134
TABLE 1. RESULTS OF TESTING THE POWER SUPPLY

No Node Voltage The results in Table 3 indicate that the circuit (hardware) and
1 Supply DC Motor 11.97 V
2 Vcc 4.98 V
program (software) to read the data of the infrared remote
control receiver is correct .
The results in Table 1 indicate that the power supply is F. L293D Driver Circuit Testing [6]
functioning properly because the voltage generated is The purpose of this measurement is to measure value on
sufficient to supply the DC motor and digital electronic the input voltage IC L293D motor speed in varying
components. conditions. The test results can be seen in Table 4.
C. Minimum System ATmega16 Circuit Testing TABLE 4 RESULTS OF TESTING IC L293D
Measurements were taken at one of the port A by No Test conditions 1,2EN IN1 IN2
measuring logic high and logic low voltage port. The 1 Right rotate 4.98V 4.98V 0.01V
measurement results can be seen in Table 2. 2 Left rotate 4.98V 0.01V 4.98V
3 Stop 0.01V 4.98V 4.98V
TABLE 2. RESULTS OF TESTING MINIMUM SYSTEM ATMEGA16
The results in Table 4 show that the L293D IC driver is
No Condition Port A
1 High 4.95 V
functioning properly in accordance with the truth table IC
2 Low 0.00 V L293D.
G. Motor Speed Sensor Circuit Testing
The results in Table 2 show that voltage range of minimum
system ATmega16 have function as expected Testing was conducted to determine whether the sensor
circuit can read the motor rotation speed . The test results can
D. LCD Circuit Testing be seen in Table 5.
Testing was conducted to determine whether the LCD was
able to function properly, so it can display the data as TABLE 5. RESULTS OF TESTING SPEED SENSOR
expected. Testing is done with a simple program to display the No Test Vin Vref Vout
text " 1234567890ABCDEF " on LCD line 1 and 2 , the condition
results can be seen in Fig. 10. The results in Fig. 11 shown 1 High 4.95V 4.55V 1.73V
that the LCD can display characters properly in accordance 2 Low 0.17V 4.55V 4.95V
with the program.

-111-
The results in Table 5 show that the photodiode sensor and IV. CONCLUSION
comparator can already read motor rotation well because it
could send a highs and lows signal to the microcontroller. Conclusion of this research are as following:
1. Direction and rotation speed of a DC motor can be
H. Overall testing
controlled with PWM method using infrared remote
Tests conducted to determine the performance of a tool control based on ATmega16 microcontroller.
that has been designed and programmed in accordance with a 2. The relationship between PWM and terminals voltage with
predetermined function. The test results obtained as shown in a rotation speed of the motor is directly proportional. The
Table 6. greater the PWM, the terminal voltage will also increase so
TABLE 6. RESULTS OF TESTING IN OVERALL that the motor will rotate faster.
No key PWM speed Voltage
(%) (rpm) (V) REFERENCES
1 1 10 48 2.02
[1] Moleykutty George. Speed Control of Separately Excited DC Motor,
2 2 20 72 3.00 American Journal of Applied Sciences 5, 2008 Science Publications
3 3 30 96 3.89
4 4 40 114 4.76 [2] Anonymous , Speed and Direction Control of DC motor Using PIC
Microcontroller Using PWM and H-Bridge. Available
5 5 50 140 5.70
http://wineyard.in/wp-content/uploads/2011/12/WK605.pdf accessed
6 6 60 165 6.67
on Oct 10, 2014
7 7 70 192 7.75
8 8 80 224 8.97 [3] Vishay . Photo Modules for PCM Remote Control Systems . http:
9 9 90 261 10.34 //svn.clifford.at/metaparts/trunk/atasheets/DS_c270180d65055cebc26d
49a51fae1ca6.pdf 2001 . Accessed on May 10, 2013 .
10 0 100 294 11.67
11 SLEEP 0.00 0.00 0.00 [4] ATMEL . ATmega16 , ATmega16L . 2010. Available http: //www.
atmel.com/Images/doc2466.pdf . Accessed on May 10, 2013
Overall test data in Table 6 indicate that the data on the [5] Anonymous . PC1602A - L ( 16x2 ) Character Display LCD. Available
http://www.geniusnet.sk/om3bc/datasheets/PC1602Series.pdf 2004 .
remote control key is pressed is in conformity with the PWM Accessed on May 17, 2013.
setup program that has been determined . Relationship PWM [6] Texas Instruments . L293 , L293D Quadupler Half - H Drivers .
and voltage to the motor speed and PWM showed that Available http://www.datasheetcatalog.org/datasheet/texasinstruments/
voltage value is proportional to the rotation speed of DC l293d.pdf 2002 . Accessed on May 10, 2013 .
motor is generated. The greater the PWM, the motor voltage [7] Anonimous. Sony SIRC infrared protocol. 2010. Available http://
(terminal voltage) will also increase so that the motor will picprojects.org.uk/projects/sirc/sonysirc.pdf. Accesed on May 17,
2013
rotate faster .

-112-

You might also like