161 Microcontroller New
161 Microcontroller New
161 Microcontroller New
INTRODUCTION
Microcontrollers play a very vital role in the development and implementation of automation technology. Automation
is the process of controlling system and information to decrease the need of human participation. Home automation
represents the idea of controlling of home appliances in an integrated system. It may include the control of lighting,
heating, ventilation, air-conditioning, security, and other appliances. Several sensors i.e. detector for temperature,
smoke, fire, gas, PIR, light etc are used for smart home. These sensors use the input signal to control home appliances.
But implementation of a unified connectivity between devices and the main controller in cost effective way is very
decisive this works includes the control of switching of lights and fan according to the attendance of person, speed
control of DC motor(fan) according to the variation of temperature. Thus the speed of dc motor is controlled through
duty/PWM signal. In this paper, we present a flexible and reliable control scheme for controlling the dc motor and light
control. Results obtained are found in good agreement with the available in data acquainted. Finally the most important
section is the conclusion which concludes the purpose of this paper.
II.
RELATED WORKS
In literature review, this is to be found that in recent years the energy crisis has become main problem which the whole
world must confront. Home power consumption makes up the largest part of energy consumption in the world. This is
to be found that the automation is the use of control systems and information technologies to reduce the need for human
work in the production of goods and services. Home automation is a widely used automated system. There is an
approach to control the electrical and electronic home appliances according to the attendance of persons [6][10].
Implementation of the ATmega8L microcontroller for Speed control of DC motor fed by a DC chopper has been
investigated. The chopper is driven by a high frequency PWM signal. Controlling the PWM duty cycle is equivalent to
controlling the motor terminal voltage, which in turn adjusts directly the motor speed [2][5].
The design and simulation of a novel fan speed control system based on room temperature using Pulse width
Modulation Technique. The duty cycle is made to vary according to the room temperature and the fan speed is
controlled accordingly [3].
Copyright to IJIRSET
DOI:10.15680/IJIRSET.2015.0407161
6412
ISSN(Online) : 2319-8753
ISSN (Print) : 2347-6710
III.
PROPOSED TECHNIQUE
The project designed here is a microcontroller based embedded system. In this design, an 8-bit 8051 microcontroller is
used. The microcontroller has been programmed using C language according to the required features and hence, keil
has been used to compile the code written in programming language C and generate hex file, which is loaded to
microcontrollers flash memory with programmer and the circuit configuration has been simulated in PROTEUS
software. Speed control of dc motor using PWM technique requires some method of manipulating the width of the
pulses. The system here has been designed configuring temperature and IR sensor. Temperature sensor senses the
temperature of a room and it gives the microcontroller signal. The speed of fan will increase if the temperature of the
room is high and decrease if the temperature of the room is low. IR sensor senses the presence of person. If there is any
person in the room the light & fan will be ON after a man entering the room. The more light will be ON according to
attendance of person. The light & fan will be only switched OFF until all the person in the room goes out. The total
number of persons inside the room is also displayed on the liquid crystal display.
IV.
Software implementation: In this design, an 8-bit microcontroller is used which is of 8051family. The microcontroller
is programmed using C language according to the required features and hence, Keil compiler has been used to compile
the code written in programming language C and generate hex file, which is loaded to microcontrollers flash memory
with programmer and the circuit configuration has been simulated in PROTEUS software.
Fig: 1 Schematic shows the DC motor control and LEDs control simulation circuit diagram
The block diagram of the system is shown below which include power supply, AT89C51 microcontroller, temperature
sensor,ADC,IR Module, DC motor, L293D driver circuit & LCD.
POWER SUPPLY
DC
MOTOR
AT89C51
MICROCONTROLLEER
TEMP.
SENSOR
L293D DRIVER
CIRCUIT
ADC
LCD
IR MODULE
LEDs
Fig: 2 Block diagram of the system
Copyright to IJIRSET
DOI:10.15680/IJIRSET.2015.0407161
6413
ISSN(Online) : 2319-8753
ISSN (Print) : 2347-6710
COMPONENTS REQUIRED:
COMPONENTS
AT89C51
Crystal oscillator
DC motor
L293D
Capacitor
Resistor
LM35(Temperature sensor IC)
IR Module
NUMBERS
1
1
1
1
6
17
1
2
1
4
1
RATINGS/ DESCRIPTIONS
11.0592MHz
5.9V
150pf,1000F,1000F,1000F, 1000f,10f
470ohm -2 resistor,10K-15 resistor
(-55C to +150C)
Record and send the actual movement
of visitor/object
Balancing the power supply
3V,2.02V( show the output)
16 2
A. POWER SUPPLY
Five volts power supply w.r.t ground is needed for the operation of the microcontroller.
220V AC
Transformer
Rectifier
Smoothing
filter
Regulator
Regulated
5v DC
MAINS
B.
C.
D.
E.
F.
Copyright to IJIRSET
DOI:10.15680/IJIRSET.2015.0407161
6414
ISSN(Online) : 2319-8753
ISSN (Print) : 2347-6710
G. IR SENSOR MODULE
IR (Infrared Rays) sensors work on infrared waves, the module comprises of one IR led (transmitter) and one
photodiode (receiver). Module consists of 3 pines namely GND, VCC (+5V) and SIG. SIG pin provides the
TTL value based on the reference voltage set. It also consists of a potentiometer which can be adjusted to vary
the reference voltage hence varying its range and accuracy. This module provides a HIGH signal when a
voltage greater than reference voltage is generated and a LOW (0V) signal when it is lower than reference
voltage. An infrared sensor is an electronic device that radiates and senses infrared radiation with the purpose
of sensing some characteristic of its surroundings.
H. DC MOTOR
A DC motor is a mechanically commutated electric motor driven by dc current. The advantages of using these
types of motor over conventionally used AC motors are:
DC motors have higher controller efficiency.
DC motors have typical 98% efficiency.
DC motors have better overload and peak voltage characteristics.
DC motors are widely used because its speed-torque characteristics can be varied to almost any
useful form.
V.
REAL IMPLEMENTATION
Hardware implementation: The programs or codes are executed and compiled. These codes are burnt by using a
positron boot loader into the microcontroller. Then the hardware section of the system does the work. Hardware
implementation is the hardware section of the system and the output get in that. For hardware implementation power
supply unit 12V adapter, IR Module, LCD, ADC circuit with LM35, amplifier circuit, microcontroller kit is used.
The expected results have been obtained from the data acquainted and from simulation by proteus software. A pulse
with fixed frequency is generated by the microcontroller which is varied according to the temperature sensor. When the
width of the pulse is maximum motor will rotate with maximum speed and at minimum pulse width motor will rotate at
minimum speed. Automatic light and fan control is achieved using IR Module and temperature sensor.
SIMULATION DATA AQUAINTED
From the result shown in Table-1, When counter values is incremented than LED will on one by one. From the result
shown in table-2, When counter values is decremented than LEDs will off one by one From the Table-3, When high
signal is passed through port0.0 motor rotate in clockwise direction and when low signal is passed through this motor
rotated in anticlockwise direction and from Table-4, speed control of dc motor is achieved using PWM technique based
on temperature sensor.
Copyright to IJIRSET
DOI:10.15680/IJIRSET.2015.0407161
6415
ISSN(Online) : 2319-8753
ISSN (Print) : 2347-6710
LEDS
D1,D2,D3,D4
COUNTER VALUES
0
OUTPUT
ALL OFF
P2.0
P2.1
D1
D2
1
3
D1 ON
D1 &D2 ON
P2.2
D3
D1,D2 & D3 ON
P2.3
D4
D1,D2,D3&D4 ON
LED
COUNTER VALUES
OUTPUT
P2.0,P2.1,P2.2,P2.3
D1,D2,D3,D4
ALL OFF
P2.0
P2.1
P2.2
P2.3
D1
D2
D3
D4
1
3
5
7
D1 ON D2,D3,D4 OFF
D1,D2 ON & D3,D4 OFF
D1,D2,D3 ON & D4OFF
D1,D2,D3,D4ON
P0.0
MOTOR STATUS
1 or greater than 1
CLOCKWISE
1 or greater than1
ANTI CLOCKWISE
Equal to 0
1 or 0
STOP
TABLE-4 Automatic on/off control of dc motor at counter values and speed control using pwm technique
LM35(-55C to +150C)
(Temperature sensor)
-55
0
25
50
100
150
DUTYCYCLE
%
0
0
4
7.27
14.5
29.09
Vavg.
MOTOR SPEED
0V
0V
0.18V
0.36V
0.725V
1.45V
Zero
Zero
Minimum
Minimum
Medium
Maximum
Graph plotted between Vavg. Vs. duty cycle and temperature vs. duty cycle from the above data has been obtained.
Copyright to IJIRSET
DOI:10.15680/IJIRSET.2015.0407161
6416
ISSN(Online) : 2319-8753
ISSN (Print) : 2347-6710
35
30
25
20
35
30
Dutycycle%
Dutycycle%
25
20
15
10
5
0
-0.5 -5 0
0.5
1.5
Vavg.(volt)
FIGURE .5: Vavg.. Vs. duty cycle
-100
15
10
5
0
-5
-50
0
50
100
150
200
Temperature (C)
FIGURE 6: temperature vs. duty cycle
No load output voltage waveforms at different duty cycle for Dc motor (clockwise and anticlockwise)
FIGURE7.A :( 0%Dutycycle)
Copyright to IJIRSET
DOI:10.15680/IJIRSET.2015.0407161
6417
ISSN(Online) : 2319-8753
ISSN (Print) : 2347-6710
no load output voltage waveform on the output terminals with 0%,4%,7% ,15% and 29% PWM in the forward and
backward direction shown in Fig (7.A),(7.B),(7.C) (7.D) ,(7.E) & (7.F)respectively
EXPERIMENTAL RESULTS HARDWARE OUTPUT WAVEFORMS
Experimental Microcontroller output PWM waveforms from pin 21 through digital oscilloscope have obtained.
Fig: 8.A
Fig: 8.B
Fig: 8.C
Fig: 8.D
Microcontroller output PWM waveforms from pin 21 (PORT 2.0) as shown in fig: 8.A, 8.B, 8.C &8.D
VII.
CONCLUSION
The expected results have been obtained from the data acquainted and from simulation by proteus software. The
microcontroller based control scheme has been developed for the control of DC motor and LEDs. The demonstrated
project used infrared sensor to count the attendance and based on that microcontroller controls light and fan.
Temperature sensor LM35 (-55C to +150C) senses the temperature of the room and based on that microcontroller
controls the speed of motor fan. Speed control of dc motor using PWM techniques required temperature sensor for
manipulating the width of the pulses. The home appliances include light & fan control system algorithm provides high
efficiency, low noise and low power consumption. The system requires only 5V dc voltage. The work includes
knowledge regarding architecture of microcontroller. Hardware and software implementation provide the work more
Copyright to IJIRSET
DOI:10.15680/IJIRSET.2015.0407161
6418
ISSN(Online) : 2319-8753
ISSN (Print) : 2347-6710
acceptable as the cost is less and other features are more useful. The work can be harmonious with some other
equipment to employ in case of greater place such office and industry.
VIII.
ACKNOWLEDGEMENTS
This work has been supported by under the guidance of Dr. R P Gupta.
REFERENCES
1.
Ganiyu, R. A., Shoewu, O., Olatinwo, S. O., Omitola, O.O, 2014, Development of a Microcontroller-Based Motor Speed Control System
Using Intel 8051, Journal of advancement in engineering and technology, ISSN: 2348-2931.
2.
Preeti, Sandeep Dogra, Rashmi Jain, 2012, DC Drives: Microcontroller Based Control, ISSN: 2249-8958.
3.
Vaibhav Bhatia, Gavish Bhatia, 2013,Room Temperature based Fan Speed Control System using Pulse Width Modulation Technique,
International Journal of Computer Applications (0975-8887) .
4.
Usha Sharma and S.R.N. Reddy, 2012, Design of home/office automation using wireless sensor network, International Journal of Computer
Applications (0975-8887).
5.
Snehlata Sanjay Thakare, Prof.Santosh Kompelli, 2014, Design and implementation of dc motor speed control based on pic microcontroller
International Journal Of Engineering And Computer Science, ISSN:2319-7242
6.
Mohammad Arif Hossain, Md. Nazmul Hasan,2014, Modern Home Automation System Based On AVR Microcontroller International
Journal of Scientific & Engineering Research, ISSN 2229-5518
7.
Inderpreet Kaur, 2010, Microcontroller based home automation system with security, International Journal of Advanced Computer Science
and Applications (IJACSA), pp.60-65
8.
Bai, Y., & Ku, Y., (2008),Automatic Room Light Intensity Detection and Control Using a Microprocessor and Light Sensors, IEEE
Transactions on Consumer Electronic, 1173
9.
A. Alheraish, Design and implementation of home automation system, IEEE Transactions on Consumer Electronics, Vol. 50, pp.1087-1092,
Nov. 2004
10. Alex Joy1, Athul S. Thoppil2, Basil P. Alias3, Lekshmy S. Kurup4, Rini Varghese5,2015, Microcontroller Based Room Automation,
International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering, (IJAREEI ),ISSN:2278-8875
Copyright to IJIRSET
DOI:10.15680/IJIRSET.2015.0407161
6419