Real Time Adaptable Automation Spandana Gajula

advertisement
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue4- April 2013
Real Time Adaptable Automation
Spandana Gajula1, Suresh Badugu2
1
Department of Electronics and Communication Engineering, KLU
Vaddeswaram, Guntur District, Andhra Pradesh, India
2
Department of Electronics and Communication Engineering, KLU
Vaddeswaram, Guntur District, Andhra Pradesh, India
Abstract— Advanced technology increases not only the ease of
operation significantly, but also saves energy. One of the ways to
reduce power consumption is automatic switching of electrical
appliances without giving up the comfort we are used to. In this
project automatic switching of electrical appliances is done using
microcontroller. Zigbee is used to control the appliances over an
area. The firmware that supports automation can be updated
remotely making the automation adoptable to any type of user
and meet their requirements. This paper discuss about the
system that makes real time adaptable automation possible.
module can be interfaced for the required function/task to take
place.
II.SYSTEM COMPONENTS
A. Light
Dependent Resistor (LDR)
Keywords— Firmware, technology, Zigbee, automation,
microcontroller
I. INTRODUCTION
Nowadays Automatic systems are being preferred over
manual systems. Automation plays an increasingly important
role in the world economy and in daily experience.
Automation reduces the wastage of energy in case the
electrical appliances are working but serving no body.
Through automation the appliances work only to meet their
goal. Not only in case of home but automation plays a vital
role in organizations where somebody has to be there to
always monitor the appliances.
Through present automation system intruders can be
caught well before they are alarmed about the surveillance, the
concerned person/group is alarmed. Generally, these systems
are not always fully accepted by final users, especially the old
and disabled – arguably the ones that need it the most.
Automation helps to concentrate on the work that is ought to
be done rather than the surroundings that support the work.
In this paper a relatively simple system where
microcontroller and occupancy sensors are integrated is used.
Switching by sensors over manual use of wall switches
contribute most to savings. It is done by automatic switching
off of electrical appliances mainly lights and fans when a
room is not in use. The system can be changed according to
the need of the respective end user. The ON/OFF of the
appliances can be varied by place, time, climate, occupancy
and necessity. In case of organizations where frequent
movement of persons the code can be modified such that the
rate at of switching of appliances can be controlled. In some
cases not only the firmware the interfacing modules need to
changed or added, in that case that facility can also be availed
as there is the presence of microcontroller to which any
ISSN: 2231-5381
Fig.1: LDR
LDR, alternatively called photo resistor, photoconductor
or photocell, decreases its resistance value with increasing
incident light intensity. An LDR is made of a highresistance semiconductor. If light falling on the device is
of high enough frequency, photons absorbed by the
semiconductor give bound electrons enough energy to
jump into the conduction band. The resulting free electron
(and its hole partner) conduct electricity, thereby lowering
resistance. A photoelectric device can be either intrinsic or
extrinsic. In intrinsic devices, the only available electrons
are in the valence band, and hence the photon must have
enough energy to excite the electron across the entire band
gap. Extrinsic devices have impurities added, which have a
ground state energy closer to the conduction band - since
the electrons don't have as far to jump, lower energy
photons (i.e. longer wavelengths and lower frequencies)
are sufficient to trigger the device. Two of its earliest
applications were as part of smoke and fire detection
systems and camera light meters. Because cadmium
sulphide cells are inexpensive and widely available, LDRs
are still used in electronic devices that need light detection
capability, such as security alarms, street lamps, and clock
radios.
http://www.ijettjournal.org
Page 967
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue4- April 2013
B. PIR Sensor
Fig.2: PIR Sensor
The PIR (Passive Infra-Red) Sensor is a pyro-electric device
that detects motion by measuring the changes in the infrared
levels emitted by surrounding objects. When high signal on a
single I/O pin is received then it indicates that there is motion.
The detection of motion by the sensor is possible with the help
of motion detection IC and the Fresnel lens .It is of low Noise
and high sensitivity. It is operated on 5V DC supply and can
detect upto 6 meters.
Pin
Name
Description
+5V
+VCC
Power Supply Positive, Connect
to +5V DC regulated power
supply
OUT
OUTPUT
Connect to I/O pin set to
INPUT mode of microcontroller
(or transistor/MOSFET).Output
is HIGH when idle (no motion
detected). LED is OFF Output
remains LOW when sensor is
triggered. LED is ON
GND
GROUND
Power Supply Ground: 0V
Table 1: Pin Definitions
The sensor is designed to adjust to slowly changing
conditions that would happen normally as the day progresses
and the environmental conditions change, but responds by
making its output high when sudden changes occur, such as
when there is motion.
C. ULN2003
The ULN2003 is a monolithic high voltage and high
current Darlington transistor arrays. The array has seven NPN
Darlington transistors. The transistor array feature highvoltage outputs with common-cathode clamp diode for
switching inductive loads. Single Darlington pair collectorcurrent rating is 500mA. The Darlington pairs may be
paralleled for higher current capability. Applications include
relay drivers, hammer drivers, lamp drivers, display drivers
(LED gas discharge), line drivers and logic buffers. The
ULN2003 has a 2.7kW series base resistor for each Darlington
pair for operation directly with TTL or 5V CMOS devices.
D.ADC 0808
Fig.3: Range Of Operation
Pyro-electric devices, such as the PIR sensor, have
elements made of a crystalline material that generates an
electric charge when exposed to infrared radiation. The
changes in the amount of infrared striking the element change
the voltages generated, which are measured by an on-board
amplifier. The device contains a special filter called a Fresnel
lens, which focuses the infrared signals onto the element. As
the ambient infrared signals change rapidly, the on-board
amplifier trips the output to indicate motion. This motion can
be detected by checking for a sudden change in the
surrounding IR patterns. When motion is detected the PIR
sensor outputs a high signal on its output pin. This logic signal
can be read by a microcontroller or used to drive a transistor
to switch a higher current load.
ISSN: 2231-5381
The ADC0808 data acquisition component is a monolithic
CMOS device with an 8-bit analog-to-digital converter, 8channel multiplexer and microprocessor compatible control
logic. The 8-bit A/D converter uses successive approximation
as the conversion technique. The converter features a high
impedance chopper stabilized comparator, a 256R voltage
divider with analog switch tree and a successive
approximation register. The 8-channel multiplexer can
directly access any of 8-single-ended analog signals.
E.LM35-Precision Centigrade Temperature Sensor
The LM35 series are precision integrated-circuit
temperature sensors, whose output voltage is linearly
proportional to the Celsius (Centigrade) temperature. The
http://www.ijettjournal.org
Page 968
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue4- April 2013
LM35 thus has an advantage over linear temperature sensors
calibrated in ˚ Kelvin, as the user is not required to subtract a
large constant voltage from its output to obtain convenient
Centigrade scaling. The LM35 does not require any external
calibration or trimming to provide typical accuracies of ±1⁄4˚C
at room temperature and ±3⁄4˚C over a full −55 to +150˚C
temperature range. This play a vital in switching ON/OFF of
electrical appliances depending upon the climate.
E.LPC1769
A microcontroller is
a
small
computer
on
a
single integrated circuit containing a processor core, memory
and programmable input/output peripherals. Microcontrollers
are used in automatically controlled products and devices,
such as automobile engine control systems, remote controls,
appliances and other embedded systems. Microcontroller has
the ability to retain functionality while waiting for an event
such as a button press or other interrupt. It operates at very
low clock frequencies resulting in low power consumption
and makes it well-suited for long battery application
LPC 1769 is an ARM controller which has ARM CortexM3 processor which is a 32-bit microprocessor. It follows
Harvard architecture which has separate buses for instruction
and data. It’s operating clock frequency is 120MHz.It works
on single 3.3 V power supply (2.4 V to 3.6 V) with a
temperature range of -40 °C to 85 °C.It has 512kB of flash
memory and 64kB of SRAM.The On-chip crystal oscillator
frequency is 1 to 25MHz and Internal RC oscillator frequency
is 4MHz.The boot loader controls initial operation after reset
and also provides the tools for programming the flash memory.
This could be initial programming of a blank device, erasure
and re-programming of a previously programmed device, or
programming of the flash memory by the application program
in a running system. In this the flash is programmed using IAP
and ISP.ISP is abbreviated as In-System Programming, which
means that the controller is programmed while it is in the
circuit by not removing the controller but manually making
the pin P2.10 low.IAP is abbreviated as In-Application
Programming, which means that the controller can be updated
while the code is in execution.IAP supports remote firmware
updation. The vector table may be located anywhere within
the bottom 1 GB of Cortex-M3 address space. The MEMMAP
register allows switch the mapping of the bottom of memory,
including default reset and interrupt vectors, between the Boot
ROM and the bottom of on-chip Flash memory.
Reset has 4 sources. They are RESET pin, Watchdog
Reset, Power on Reset (POR), and Brown out Detect (BOD).If
power supply value is greater than BOD reset trip level then
reset will be 1 and if the power supply is less than BOD reset
level then reset will have value 0.The watch dog timer and
BOD will have to be set in case their operation is necessary.
Otherwise their output is not affected. All of the processor and
peripheral registers will be initialized to predetermined values
ISSN: 2231-5381
once the internal reset is removed. The processor begins its
execution from the address 0x00000000.The flash boot loader
code is executed every time the part is powered ON or RESET.
The MAP of memory map control register decide the mode
either boot mode or user mode. If MAP is 0 then the mode is
boot mode and so the portion of boot ROM is mapped to
address 0.If MAP is 1 then it is user mode and so the on-chip
flash memory is mapped to address 0. On system reset, the
vector table is fixed at address 0x00000000.On chip reset, the
portion of Boot ROM is mapped to address 0 of flash memory
which is prior to user code that is ought to be executed. In
case of any system or chip reset the program regarding the
reset will be assigned the address 0, the user code will then
follow. In order to have good flexibility in remote firmware
update the size of flash memory matters a lot. More is the
memory more is the flexibility and adaptability
F. Zigbee
ZigBee is a new wireless technology based on the 802.15.4
standard which is extensively used in wireless communication.
It focuses on standardizing and enabling interoperability of
various products. It can provide a cost-effective and energyefficient means for short-range networking. Compared with
other wireless communication technologies, it is seen that
ZigBee is not only more reliable, but also cheaper and
importantly
more
energy-conservative.
ZigBee
communication in the field of Home Automation and
Networking will be seen. ZigBee is used as a communication
medium in home automation and networking.
The Zigbee modules work at the 2.4 GHz frequency which
means smaller board and antenna size. Zigbee modules have
the ability to transmit Digital, PWM, Analog or Serial RS232
signals wirelessly. To communicate over UART or USART,
we just need three basic signals which are namely, RXD
(receive), TXD (transmit), GND (common ground). So to
interface UART with 8051, we just need the basic signals.
Fig. 4: Interfacing Zigbee to Microcontroller
III.SOFTWARE
Keil development tools designed for Cortex-Mx, ARM7,
ARM9, C166, XE166, XC2000, and 8051 microcontrollers. It
introduces the µVision Integrated Development Environment,
http://www.ijettjournal.org
Page 969
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue4- April 2013
Simulator, and Debugger and presents a step-by-step guided
tour of the numerous features and capabilities the Keil
embedded development tools offer. The Keil MDK-ARM
Microcontroller Kit is a complete software development
environment for the wide range of ARM, Cortex-M, and
Cortex-R based microcontroller devices. MDK includes the
uVision IDE/Debugger; ARM C/C++ Compiler, and essential
middleware components. It's easy to learn and use.The code
that is written in C language is converted into assembly during
debugging. The new Keil µVision4 IDE has been designed to
enhance developer's productivity, enabling faster and more
efficient
program
development.
µVision4 introduces a flexible window management system,
enabling you to drag and drop individual windows anywhere
on the visual surface including support for multiple monitors.
recently bought and registered your software. An update is a
free program that fixes issues with the software or adds more
hardware support while Upgrades add additional features to
your software product and are not free. Manufacturers of CD
and DVD drives often release regular firmware updates to
keep their hardware compatible with new media. Network
router manufacturers often release updates to firmware on
their devices to improve performance or add additional
features. The application program may also erase and/or
program the flash while the application is running, allowing a
great degree of flexibility for data storage field firmware
upgrades, etc.
Firmware update is done generally by using the ISP mode
present in boot loader. For updating in ISP reset pin is made
active low and through UART0 program is dumped into the
system, which is manual updating. But manual updating is
difficult task and is not real time. To overcome the difficulty
remote firmware update can be done. It can be achieved by
using IAP. Depending upon the size of code that has been
dumped into the flash memory of the controller and the size of
code that has to be dumped into the controller the remote
firmware update depends.
V. WORKING
Fig.5: Keil Window
IV.REMOTE FIRMWARE UPDATE
Firmware is a combination of software and hardware. It is
software (programs or data) that has been written onto readonly memory (ROM).ROMs, PROMs and EPROMs that have
data or programs recorded on them are firmware. Firmware is
software that is embedded in a piece of hardware. A software
update provides bug fixes for features that aren't working
quite right and minor software enhancements, and sometimes
include new drivers to support printers or DVD drives. A
software update is sometimes called a patch because it is
installed over software you're already using and it isn't a full
software package installation. A software upgrade is a
purchase of a newer version of software you currently use.
There's usually a cost for a software upgrade, although you
can often upgrade at a reduced price or get a freebie if you just
ISSN: 2231-5381
The automation system mainly works on sensors (LDR, PIR
& Temperature) and a Microcontroller (LPC 1769). LDR
detects the intensity of the surrounding light based on which
its resistance varies simultaneously. Its voltage too varies. If
the intensity of light outside is high, its resistance and voltage
drop gets decreased which automatically turns off the light. If
the intensity of light is less its resistance and voltage drop gets
increased which switches the light ON. PIR sensor is used to
detect the occupancy. The PIR sensor is typically mounted on
a printed circuit board which also contains the necessary
electronics required to interpret the signals from the chip. The
sensor is mounted in a location where it can view the area to
be monitored. Infrared energy is able to reach the sensor
through the opaque window because the plastic used is
transparent to infrared radiation. This plastic sheet or bubble
prevents the introduction of dust which could obscure the
sensor's field of view. The persons entering the monitored
area is detected when the infrared energy emitted from the
person's body is focused by a lens or a mirror segment and
overlaps a section on the chip which had previously been
looking at some much cooler part of the protected area. As the
person moves, so does the hot spot on the surface of the chip moving hot spots cause the electronics connected to the chip
http://www.ijettjournal.org
Page 970
International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue4- April 2013
to de-energize the relay, operating its contacts and
illuminating the lamp circuit. This PIR sensor generates a
voltage in the range of 3-4 volts when the room is occupied.
The temperature sensor used here is LM35, rated to operate
over −55˚ to +150˚C temperature range. It detects the
surrounding temperature and switches the fan on or off
depending on the range. All the sensors are interfaced to a
microcontroller. The microcontroller needs input in digital
format, but the output from all the sensors is analog. So, this
analog input must be converted into digital form, for which an
ADC0808 is used. All the sensors need to be interfaced to
microcontroller through the ADC. Interfacing is done in such
a way that even though intensity of light is low and no person
is present, the light remains off and if intensity is low and a
person is present, the light will be on. Loads, i.e. light and fan,
are driven using a relay driver ULN 2003. Loads are
connected to the microcontroller through relay driver. In case
of large institutions or organizations the appliances are formed
as network such that the entire area can be controlled at once
without any ambiguity. In case of any change of code the
remote firmware update can be done and the change can be
seen within minutes resulting in optimum utilization of time.
energy saving and helping the people with disabilities and old
people.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
VI. CONCLUSION
An automated system can be a very simple grouping of
controls, or it can be heavily automated where any appliance
that is plugged into electrical power is remotely controlled.
The operation of electrical devices automatically reduces
human effort and saves the power to a maximum extent when
it is not required. Automation helps the organizations to have
smooth, comfortable authorising and also providing security
and energy saving. Automation along with remote firmware
update is quite adaptable in real time providing security,
ISSN: 2231-5381
[12]
[13]
[14]
Reuel O.Launey, Peter A.Grendler, Donald L.Packham, James
M.Battagila and Howard E.Levine. “Expandable Home Automation
System”.U.S.Patent 5, 086, 385, Feb 4, 1992.
Woo Suk Lee, Seung Ho Hong, “Implementation of a KNXZigBee
Gateway for Home Automation”, The 13th IEEE International
Symposium on Consumer Electronics (ISCE2009)
ZigBee Alliance, www.zigbee.org
Noriaki Morotomi, Yasumasa Endo, Yoshinori Emura, Nobuyoshi
Asaka and Hideki Inoue.”Home Automation System”.U.S.Patent 4,
959, 713, Sep 25, 1990.
http://www.keil.com/uvision/uv4.asp
Loren
K.Shade.”Implementing
Secure
Remote
Firmware
Updates”,ESC-202,2011
Mitsumasa Saitoh, Shigeru Ohmuro, Susumu Tagawa, Kenichiro
Kumamoto.”Security Monitor System”.U.S.Patent 4, 777, 526, Oct 11,
1988.
Brent Bilger.”Occupancy Sensor and Method for Home Automation
System”.U.S.Patent 6,909,921 B1, Jun 21, 2005.
Robert J.Brown, James D.Romanowiz and Charles W.Staples.”Energy
Management and Home Automation System”.U.S.Patent 5, 544, 036,
Aug 6, 1996.
Prathamesh
Ajgaonkar,”Simulation
Studies
on
ZigBee
Communications for Home Automation and Networking”M.Eng. thesis,
The University of Toledo, Toledo, U.S, Dec. 2010.
A. Alheraish, “Design and Implementation of Home Automation
System” IEEE Transactions on Consumer Electronics, Vol. 50, No. 4,
pp. 1087-1092, November 2004.
Ali Ziya Alkar and Umit Buhur, “An Internet Based Wireless Home
Automation System for Multifunctional Devices”, IEEE Transactions
on Consumer Electronics, Vol. 51, No. 4, pp. 1169-1174, November
2005.
en.wikipedia.org
www.sensorwiki.org
http://www.ijettjournal.org
Page 971
Download