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

CERTI - Copy - Copy (2) - Copy - Copy - Copy (2 Files Merged)

The document reports on a project to develop a WSN-based system using smart sensors and actuators for power management in intelligent buildings. It was submitted by K. Mohana Kalyani in partial fulfillment of the requirements for a Bachelor of Technology degree in Electronics and Communication Engineering under the guidance of Mr. A. Prasad. The project involves designing hardware components like a power supply, LCD, light dependent resistor, relays, and infrared technology to control electrical devices in a building remotely.

Uploaded by

Kavya Mamilla
Copyright
© © All Rights Reserved
0% found this document useful (0 votes)
98 views

CERTI - Copy - Copy (2) - Copy - Copy - Copy (2 Files Merged)

The document reports on a project to develop a WSN-based system using smart sensors and actuators for power management in intelligent buildings. It was submitted by K. Mohana Kalyani in partial fulfillment of the requirements for a Bachelor of Technology degree in Electronics and Communication Engineering under the guidance of Mr. A. Prasad. The project involves designing hardware components like a power supply, LCD, light dependent resistor, relays, and infrared technology to control electrical devices in a building remotely.

Uploaded by

Kavya Mamilla
Copyright
© © All Rights Reserved
You are on page 1/ 84

A

PROJECT REPORT
ON

WSN-BASED SMART SENSORS AND ACTUATOR FOR


POWER MANAGEMENT IN INTELLIGENT BUILDINGS

Submitted in the partial fulfilment of the requirements of the award of the degree of

BACHELOR OF TECHNOLOGY
IN
ELECTRONICS & COMMUNICATION ENGINEERING
by
K.MOHANA KALYANI 17JU1A0439

Under the Esteemed Guidance of


Mr. A. PRASAD, M.Tech, (Ph.D)
Associate professor

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

KRISHNA CHAITANYA INSTITUTE OF TECHNOLOGY & SCIENCES

(Approved by AICTE, New Delhi &Affiliated To JNTUK, KAKINADA)

Accredited by NAAC

Markapur,Prakasam District-523316,ANDHRA PRADESH.

(2020-2021)
KRISHNACHAITANYA INSTITUTE OF TECHNOLOGY AND SCIENCES
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEEING

CERTIFICATE
This is to certify that the report entitled “WSN-BASED SMART SENSORS AND
ACTUATOR FOR POWER MANAGEMENT IN INTELLIGENT BUILDINGS” the
bonafide work carried out by K.MOHANAKALYANI (17JU1A0439) in partial fulfilment
of the requirements for the award of degree of bachelor of technology in the Department
of Electronics and Communication Engineering, from JNTUK during the year 2020-2021.

PROJECT GUIDE HEAD OF THE DEPARTMENT


Mr. A. PRASAD, M.Tech, (Ph.D) Dr.P.PRASANNA MURALI KRISHNA, M.Tech, Ph.D
Associate Professor Professor

EXTERNAL EXAMINER
ACKNOWLEGMENTS
We wish to express our sincere deep sense of gratitude to our guide,Mr.A. PRASAD,
M.Tech, (Ph.D.), Assistant Professor, Dept of E.C.E, for his significant suggestions and help in
every respect to accomplish the project work. His encouragement, everlasting patience and
keen interest in discussions have benefited us to the extent that cannot be spanned by words.

We express our sincere thanks to our Project Coordinator, Mr.K. RANJITH


KUMAR, M.Tech, Mr.V. RAMASUBBAREDDY, M.Tech, Department of E.C.E, for their
suggestions. Their profound knowledge and have been a constant source of inspiration for us
throughout this project work.

We articulate our profound gratitude to our H.O.D, Dr. P. PRASANNA MURALI


KRISHNA, M.Tech, Ph.D. Department of E.C.E, for his indispensable encouragement with
salient guidelines and suggestions throughout the work.

We convey our special thanks to beloved principal Dr. V. KRISHNA REDDY, for
his suggestions. His profound knowledge and willingness have been a constant source of
inspiration for us throughout this project work.

We express our indebtedness to our CHAIRMAN SRI. A. VENKATA RAMBABU


and SECRETARY AND CORRESPONDENT SRI. A. KRISHNA CHAITANYA for
providing infrastructure facilities and support to complete the project.

Finally, we express our thanks to everyone, who helped us directly or indirectly in


completion of our project successfully.

……….…Project Associates

K.MOHANA KALYANI 17JU1A0439


CONTENTS
TITLE PAGE NO
LIST OF FIGURES I
LIST OF TABELS III
LIST OF ABBREVATIONS IV
ABSTRACT V
CHAPTER 1: INTRODUCTION 1-4
1.1 Organisation of thesis 2
1.2 Objective 2
1.3 Introduction to project 2
1.4 Block diagram 3
1.5 Hardware Components 4
1.6 Software Components 4
CHAPTER 2: INTRODUCTION EMBEDDED SYSTEMS 5-10
2.1 Introduction to Embedded Systems 6
2.2 Application areas 6
2.3 Categories of Embedded Systems 8
2.4 Overview of Embedded Systems 9
2.4.1 Central Processing Unit 9
2.4.2 Memory 10
2.4.3 Input Devices 10
2.4.4 Output Devices 10
2.4.5 Communication Interface 10
2.4.6 Application Specific Circuitry 10
CHAPTER 3: ARDUINO AND ITS ARCHITECTURE 11-19
3.1 Introduction to microcontroller 12
3.2 Arduino Uno Microconrtoller 12
3.2.1 Memory 13
3.2.2 Input and Output 13
3.3 Arduino Uno Board 14
3.3.1 Technical Specifications 15
3.4 Pin Diagram 17
3.4.1 Pin Description 17
CHAPTER 4: HARDWARE DESCRIPTION 20-42
4.1 Power Supply 21
4.1.1 Transformer 22
4.1.1.1.Basic Principle 22
4.1.1.2.Induction Law 23
4.1.1.3 Ideal Equation 23
4.1.2 Bridge Rectifier 25
4.1.2.1 Basic Principle 25
4.1.2.2 Output smoothing using capacitor 26
4.1.3 Voltage Regulator 27
4.2 LCD 28
4.2.1 Hardware connections of LCD 29
4.3 Light Dependent Resistor 32
4.3.1 Introduction 32
4.4 Relays 33
4.4.1 Driving Relay 35
4.5 Infrared Technology 35
4.5.1 Infrared explanation 37
4.5.2 IR Generation 39
4.5.2.1 IR receiver 40
4.5.2.2 IR Transmitter and Receiver 40
4.5.2.3 Applications 40
4.6 Bulb 41
4.6.1 CPU Fan 42
CHAPTER 5: ARDUINO IDE TOOLS 43-53
5.1 Introduction to Arduino IDE 44
5.2 Arduino Data Types 44
5.3 Arduino Software Tools 47
CHAPTER 6: SOURCE CODING 54-58
CHAPTER 7: RESULTS 59-63
CHAPTER 8: CONCLUSION AND FUTURESCOPE 64-66
CHAPTER 9: REFERENCES 67-69

PUBLISHED PAPER
LIST OF FIGURES

TITLE PAGE NO

Fig: 1.4.1 Block diagram of wsn based smart sensors and actuator for power
Management in Intelligent Buildings 5
Fig: 2.4.1 Layered architecture 6
Fig: 2.4.2 Building block of an embedded system 8
Fig: 3.3.1 Arduino uno board 14
Fig: 3.4.1 Pin diagram of atmega 328 17
Fig: 4.1.1 Block diagram of power supply 21
Fig: 4.1.2 power supply circuit 22
Fig: 4.1.1.1.1 An ideal step-down transformer showing magnetic flux in the core 22
Fig: 4.1.2.1 Bridge rectifier using positive half cycle 25
Fig: 4.1.2.2 Bridge rectifier using negative half cycle 25
Fig: 4.1.2.3 Wave form of bridge rectifier 26
Fig: 4.1.2.1.1 Bridge rectifier using capacitor 26
Fig: 4.2.1 LCD diagram 26
Fig: 4.2.2 LCD block diagram 30
Fig: 4.2.4 Flow chart of LCD 30
Fig: 4.3.1 LDR Symbol 31
Fig: 4.3.2 Photo Conductor 32
Fig: 4.3.1.1 LDR Sensor module 32
Fig: 4.4.1 Circuit Symbol of relay 32
Fig: 4.4.2 Relay operation and use of protection diodes 34
Fig: 4.5.1 Spectrum of electromagnetic radiation 36
Fig: 4.5.2 Schematic symbol of IR LED QED234 36
Fig: 4.5.1.1 IR band spectrum 37
Fig: 4.5.2.1 Output waveform of receiver when the transistor is ON and OFF 38
Fig: 4.5.2.1 Block Diagram of IR receiver 39
Fig: 4.5.2.1 Block Diagram of IR receiver 40

I
Fig: 4.6.2 Bulb holder 41
Fig: 4.6.1.1 CPU fan 42
Fig: 5.3.1 USB Cable 48
Fig: 5.3.2 Download Arduino software tool 48
Fig: 5.3.3 Opening Arduino tool 49
Fig: 5.3.4 Opening NEW File 49
Fig: 5.3.5 To Opening an existing project 50
Fig: 5.3.6 Selection of Board Arduino UNO 51
Fig: 5.3.7 Opening the serial port 51
Fig: 5.3.8 Demonstration of each symbol appearing is Arduino IDE tool 52
Fig: 5.3.9 Arduino programming structure 53
Fig: 7.1 Developed circuit image of WSN- Based smart sensor and actuator for
60
power management in intelligent Buildings
Fig: 7.2 Power is supplied to the kit initially project name is displayed on LCD
Screen 61
Fig: 7.3 Display name on LCD display 61
Fig: 7.4 Display the count value on LCD 62
Fig: 7.5 Bulb is turned ON 62
Fig: 7.6 Two bulbs are turned ON when count is increased 63

II
LIST OF TABLES

TITLE PAGENO

Table: 3.3.1.1 Arduino Uno Specifications 15


Table: 4.2.3 Hardware connections 30
Table: 4.3.1.2 LDR Specifications 33

III
LIST OF ABBREVIATIONS

MCU Micro Controller Unit


PC Personal Computer
UART Universal Asynchronous Receiver Transmitter
PIN Personal identification umber
DVD Digital Versatile Disc
ISDN Integrated Services Digital Network
ATM Asynchronous Transfer Mode
WSN Wireless sensor network
IP Internet Protocol
CPU Central Processing Unit
DSP Digital Signal Processing
RAM Random Access Memory
ROM Read Only Memory
LED Light Emitting Diode
LCD Liquid Crystal Display
USB Universal Serial Bus
IEEE Institute of Electrical and Electronics Engineers
ICSP In Circuit system Programming
AC Alternating Current
DC Direct Current
FTDI Future Technology Devices International Limited
SRAM Static Random Access Memory
EEPROM Electrically Erasable Programmable Read Only Memory
PCB Printed circuit board
RX Receiver
TX Transmitter
PWM Pulse Width Modulation
IR Infrared rays
SPI Serial Peripheral Interface

IV
ABSTRACT

Now, a days many people leave their houses without switching of the appliances
which leads to the wastage of power and energy.

This project is to design and develop a smart monitoring and controlling system for
household electrical appliances in real time has been presented. The system principally
monitors electrical parameters of household appliances such as voltage and current and
subsequently calculates the power consumed. The novelty of this system is the
implementation of the controlling mechanism of appliances in different ways. The developed
system is a low-cost and flexible in operation and thus can save electricity expense of the
consumers. It has been extensively tested in real-life situations and experimental results are
very encouraging.

V
WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CHAPTER-1
INTRODUCTION TO PROJECT

B.Tech[ECE] KITS,MARKAPUR Page 1


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

1.1 Organisation
Here, in our project the organisation is to perform the task of controlling the
room lights and fan as well as counting number of persons/visitors in the room very
accurately.
1.2 Objective of the project
 The purpose of the project using wireless senor network is to monitored, and
control parameters like voltage and current.
 The main objective is to reduce the unnecessary power consumption in home.
It helps to improve the performance of the control network.
 To save electricity based on the number of people present in a room the bulbs
and fans are turned ON.
1.3 Introduction about project

The WSN are increasingly being used in the home for energy controlling services.
Regular household appliances are monitored and controlled by WSNs installed in the
home. New technologies advancements in information technology, sensors and
electricity storage technology.

Wastage of electricity is one of the main problems which we are facing nowadays.
In our home, school, colleges or industry we see that fan/lights are kept on even if
there is nobody in the room or area/passage. This happens due to negligence or
because we forgot to turn lights off or when we are in a hurry. To avoid all such
situations we have designed this project called “WSN-Based Smart Sensors and
Actuator for Power Management in Intelligent Buildings”. This project has two
modules, the first one is known as “Digital Visitor counter” and the second module is
known as “Automatic room light controller”.
The main concept behind this project is known as “Visitor counter” which
measures the number of persons entering any room like seminar hall, conference
room, classroom. This function is implemented using a pair of Infrared sensors. LCD
display placed outside the room displays this value of person count. This person count
will be incremented if somebody enters the room and at that time lights are turned on.
And in a reverse way, person count will be decremented if somebody leaves the room.
When the number of persons inside the room is zero, lights inside the room are turned
off using a relay interface. In this way Relay does the operation of “Automatic room

B.Tech[ECE] KITS,MARKAPUR Page 2


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

light controller”. Since this project uses 2 infrared sensors, it can be used as a
Bidirectional person counter as well.
When someone enters into the room then the counter is incremented by one and
the light in the room will be switched ON and when any one leaves the room then the
counter is decremented by one. The total number of persons inside the room is also
displayed on the LCD.
This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage
regulator is used for voltage regulation. Bridge type full wave rectifier is used to
rectify the ac output of secondary of 230/12V step down transformer.

1.4 Block Diagram:

POWER LDR
A
SUPPLY
R

IR D RELAY1 LOAD1
TRANSMITTER
(ENTRANCE) U

I
RELAY LOAD2
N
IR
TRANSMITTER
O
FAN
LDR

Fig: 1.4.1 Block Diagram of WSN- Based smart sensors and actuator
for power management in intelligent buildings
 ARDUINO UNO is a microcontroller based on ATMEGA328.It contains of
total of 28 pins in that 14 digital pins,6analog pins,3 grounds, ART,IO
REFERENCES power barrel jack, serial pin, AREF and input voltages is 9-
12v, output voltage is 3.3 -5v,operating voltage is 5v.

B.Tech[ECE] KITS,MARKAPUR Page 3


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

 An LDR is a component that has a resistance that changes with the light
intensity that falls up on it.
 A relay is an electrically controllable switch widely used in industrial controls
and appliances.
 LCD we have used is 16x2. It means consists of 16 columns and 2 rows it
consists of RS, EN, DATAPINS. The 16x2 translate a display 16 characters
per line in 2 such lines. It is used to display a string. The deaf and dump
people can identify the presence of obstacle or not.
 IR stands for infrared red spectrum, by using this region we can detect no of
obstacles passing through a region.
1.5 Hardware :
Microcontroller Board : Arduino UNO
Crystal : 12-16 MHz
LCD
IR-Sensor
Relay
Load
Power supply
Transformer : 12V step down
Filter : 1000uf/25V
Voltage Regulator : 7805, 7812

1.6 Software:
 Arduino IDE
 Proteus

B.Tech[ECE] KITS,MARKAPUR Page 4


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CHAPTER-2
INTRODUCTION TO EMBEDDED SYSTEMS

B.Tech[ECE] KITS,MARKAPUR Page 5


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

2.1 Embedded System


An Embedded System is a combination of computer hardware and software,
and perhaps additional mechanical or other parts, designed to perform a specific
function. An embedded system is a microcontroller based, software driven, reliable,
real-time control system, autonomous, or human or network interactive, operating on
diverse physical variables and in diverse environments and sold into a competitive
and cost conscious market.
If an embedded system is designed well, the existence of the processor and
software could be completely unnoticed by the user of the device. Such is the case for
a microwave oven, VCR, or alarm clock. An embedded system is not a computer
system that is used primarily for processing, not a software system on PC or UNIX,
not a traditional business or scientific application.
High-end embedded & lower end embedded systems. High-end embedded
system - Generally 32, 64 Bit Controllers used with OS. Examples Personal Digital
Assistant and Mobile phones etc., Lower end embedded systems - Generally 8, 16 Bit
Controllers used with a minimal operating systems and hardware layout designed for
the specific purpose.
2.2 Application Areas
Nearly 99 per cent of the processors manufactured end up in embedded
systems. The embedded system market is one of the highest growth areas as these
systems are used in very market segment- consumer electronics, office automation,
industrial automation, biomedical engineering, wireless communication, data
communication, telecommunications, transportation, military and so on.
Industrial automation
Today a lot of industries use embedded systems for process control. These
include pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity
generation and transmission. The embedded systems for industrial use are designed to
carry out specific tasks such as monitoring the temperature, pressure, humidity,
voltage, current etc. In hazardous industrial environment, where human presence has
to be avoided, robots are used, which are programmed to do specific jobs. The robots
are now becoming very powerful and carry out many interesting and complicated
tasks such as hardware assembly.

B.Tech[ECE] KITS,MARKAPUR Page 6


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Computer networking
Computer networking products such as bridges, routers, Integrated Services
Digital Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame
relay switches are embedded systems which implement the necessary data
communication protocols. For example, a router interconnects two networks. The two
networks may be running different protocol stacks. The router’s function is to obtain
the data packets from incoming pores, analyze the packets and send them towards the
destination after doing necessary protocol conversion. Most networking equipment’s,
other than the end systems (desktop computers) we use to access the networks, are
embedded systems.
Telecommunications

In the field of telecommunications, the embedded systems can be categorized


as subscriber terminals and network equipment. The subscriber terminals such as key
telephones, ISDN phones, terminal adapters, web cameras are embedded systems. The
network equipment includes multiplexers, multiple access systems, Packet
Assemblers Dissemblers (PADs), sate11ite modems etc. IP phone, IP gateway, IP
gatekeeper etc. are the latest embedded systems that provide very low-cost voice
communication over the Internet.

Wireless technologies

Advances in mobile communications are paving way for many interesting


applications using embedded systems. The mobile phone is one of the marvels of the
last decade of the 20’h century. It is a very powerful embedded system that provides
voice communication while we are on the move. The Personal Digital Assistants and
the palmtops can now be used to access multimedia services over the Internet. Mobile
communication infrastructure such as base station controllers, mobile switching
centers are also powerful embedded systems.
Security
Security of persons and information has always been a major issue. We need
to protect our homes and offices; and also the information we transmit and store
Developing embedded systems for security applications is one of the most lucrative
businesses nowadays. Security devices at homes, offices, airports etc. for

B.Tech[ECE] KITS,MARKAPUR Page 7


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

authentication and verification are embedded systems. Encryption devices are nearly
99 per cent of the processors that are manufactured end up in embedded systems.
2.3 Categories of Embedded Systems
Based on functionality and performance requirements, embedded systems can
be categorized as:
 Stand-alone embedded systems
 Real-time systems
 Networked information appliances
 Mobile devices
2.4 Overview of Embedded System Architecture
Every embedded system consists of custom-built hardware built around a
Central Processing unit(CPU). This hardware also contains memory chips onto which
the software is loaded. The software residing on

Fig: 2.4.1: Layered Architecture

The memory chip is also called the ‘firmware’. The embedded system
architecture can represented as layered architecture as shown in Fig. The operating
system runs above the hardware, and the application software runs above the
operating system As shown in Fig.1.1.1 the building blocks are:
 Central Processing Unit (CPU):
 Memory (Read-only Memory and Random Access Memory)
 Input Devices:
 Output devices

B.Tech[ECE] KITS,MARKAPUR Page 8


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

 Communication interfaces
 - Application-specific circuitry

Random Read only


access
memory
memory

Input Output
Central processing devices
devi unit
ces
Communic-
ation
device

Application
specific
circuit

Fig: 2.4.2 Building block of an embedded system

2.4.1 Central Processing Unit (CPU)


The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-
controller is a low-cost processor. Its main attraction is that on the chip itself, there
will be many other components such as memory, serial communication interface,
analog-to digital converter etc. So, for small applications, a micro-controller is the
best choice as the number of external components required will be very less. On the
other hand, microprocessors are more powerful, but you need to use many external

B.Tech[ECE] KITS,MARKAPUR Page 9


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

components with them. D5P is used mainly for applications in which signal
processing is involved such as audio and video processing.
2.4.2 Memory
The memory is categorized as Random Access 11emory (RAM) and Read
Only Memory (ROM). The contents of the RAM will be erased if power is switched
off to the chip, whereas ROM retains the contents even if the power is switched off.
So, the firmware is stored in the ROM. When power is switched on, the processor
reads the ROM; the program is program is executed.
2.4.3 Input devices
Unlike the desktops, the input devices to an embedded system have very
limited capability. There will be no keyboard or a mouse, and hence interacting with
the embedded system is no easy task. Many embedded systems will have a small
keypad-you press one key to give a specific command. A keypad may be used to input
only the digits. Many embedded systems used in process control do not have any
input device for user interaction; they take inputs from sensors or transducers 1’fnd
produce electrical signals that are in turn fed to other systems.
2.4.4 Output devices
The output devices of the embedded systems also have very limited capability.
Some embedded systems will have a few Light Emitting Diodes (LEDs) to indicate
the health status of the system modules, or for visual indication of alarms. A small
Liquid Crystal Display (LCD) may also be used to display some important
parameters.
2.4.5 Communication interfaces
The embedded systems may need to, interact with other embedded systems at
they may have to transmit data to a desktop. To facilitate this, the embedded systems
are provided with one or a few communication interfaces such as RS232, RS422,
RS485, Universal Serial Bus (USB), and IEEE 1394, Ethernet etc.
2.4.6 Application-specific circuitry
Sensors, transducers, special processing and control circuitry may be required
fat an embedded system, depending on its application. This circuitry interacts with the
processor to carry out the necessary work. The entire hardware has to be given power
supply either through the 230 volts main supply or through a battery. The hardware
has to design in such a way that the power consumption is minimized.

B.Tech[ECE] KITS,MARKAPUR Page 10


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CHAPTER- 3
ARDUINO AND ITS ARCHITECTURE

B.Tech[ECE] KITS,MARKAPUR Page 11


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

3.1 Introduction to Microcontroller:


Microcontroller as the name suggest, a small controller. They are like single
chip computers that are often embedded into other systems to function as
processing/controlling unit. For example, the control you are using probably has
microcontrollers inside that do decoding and other controlling functions. They are
also used in automobiles, washing machines, microwave ovens, toys….etc, where
automation is needed.
3.2 Arduino Uno Microcontroller:
The Arduino Uno is a microcontroller board based on the ATmega328
(datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM
outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power
jack, an ICSP header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it with a
AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI
USB-to-serial driver chip. Instead, it features the Atmega8U2 programmed as a USB-
to-serial converter. "Uno" means "One" in Italian and is named to mark the upcoming
release of Arduino 1.0. The Uno and version 1.0 will be the reference versions of
Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards,
and the reference model for the Arduino platform; for a comparison with previous
versions, see the index of Arduino boards.
The Arduino Uno can be powered via the USB connection or with an external
power supply. The power source is selected automatically. External (non-USB) power
can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be
connected by plugging a 2.1mm center-positive plug into the board's power jack.
Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER
connector. The board can operate on an external supply of 6 to 20 volts. If supplied
with less than 7V, however, the 5Vpin may supply less than five volts and the board
may be unstable. If using more than 12V, the voltage regulator may overheat and
damage the board. The recommended range is 7 to 12 volts
The power pins are as follows.
VIN: The input voltage to the Arduino board when it's using an external power
source (as opposed to5 volts from the USB connection or other regulated power

B.Tech[ECE] KITS,MARKAPUR Page 12


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

source). You can supply voltage through this pin, or, if supplying voltage via the
power jack, access it through this pin.·
5V: The regulated power supply used to power the microcontroller and other
components on the board. This can come either from VIN via an on-board regulator,
or be supplied by USB or another regulated 5V supply.
3.3V: A 3.3 volt supply generated by the on-board regulator. Maximum current draw
is 50 mA.
GND: Ground pins.
3.2.1 Memory:
The Atmega328 has 32 KB of flash memory for storing code (of which 0,5
KB is used for the boot loader); It has also 2 KB of SRAM and 1 KB of EEPROM
(which can be read and written with the EEPROM library).
3.2.2 Input and Output:
Each of the 14 digital pins on the Uno can be used as an input or output using
pin Mode(), digital Write(), and digital Read() functions. They operate at 5 volts
Each pin can provide or receive a maximum of 40 mA and has an internal pull-up
resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have
specialized functions
Serial: 0 (RX) and 1 (TX):
Used to receive (RX) and transmit (TX) TTL serial data. These pins are
connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip .
External Interrupts: 2 and 3:
These pins can be configured to trigger an interrupt on a low value, a rising or
falling edge, or a change in value. See the attach Interrupt() function for details.
PWM: 3, 5, 6, 9, 10, and 11:
Provide 8-bit PWM output with the analog Write()function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK):
These pins support SPI communication, which although provided by the
underlying hardware, is not currently included in the Arduino language.
LED: 13:
There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED ison, when the pin is LOW, it's off.

B.Tech[ECE] KITS,MARKAPUR Page 13


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

The Uno has 6 analog inputs, each of which provide 10 bits of resolution (i.e.
1024 different values). By default they measure from ground to 5 volts, though is it
possible to change the upper end of their range using the AREF pin and the analog
Reference() function. Additionally, some pins have specialized functionality:
 I2C: 4 (SDA) and 5 (SCL): Support I2C (TWI) communication using the Wire
library.
There are a couple of other pins on the board.
 AREF:
Reference voltage for the analog inputs. Used with analog Reference().
 Reset:
Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
Communication:
The Arduino Uno has a number of facilities for communicating with a
computer, another Arduino, or other microcontrollers. The ATmega328 provides
UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and
1 (TX). An ATmega8U2 on the board channels this serial communication over USB
and appears as a virtual com port to software on the computer. However, on
Windows, an *.inf file is required. The Arduino software includes a serial monitor
which allows simple textual data to be sent to and from the Arduino board. The RX
and TX LEDs on the board will flash when data is being transmitted via the USB-to
serial chip and USB connection to the computer (but not for serial communication on
pins 0 and 1).
3.3 ARDUINO UNO BOARD
The Arduino Uno is a microcontroller board based on the ATmega328. It has
14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP
header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it with a
AC-to-DC adapter or battery to get started.

B.Tech[ECE] KITS,MARKAPUR Page 14


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Fig: 3.3.1: Arduino uno board


.
3.3.1 Technical Specifications

FEATURES SPECIFICATIONS
1. Microcontroller ATMEGA 328
2. Operating voltage 5v
3. Input voltage 7-12v
(recommended)
4. Input voltage(limits) 6-20v
5.Digital I/O Pins 14(of which 6 provided PWM output)
6. Analog input pins 6
7. DC current per I/O Pin 40mA
8. DC current for 3.3v pin 50mA
9. SRAM 2 KB (ATMEGA328)
10. EEPROM 1 KB (ATMEGA328)
11. Clock speed 16 MHz

Table 3.3.1.1: Arduino uno specifications


The Arduino Uno can be powered via the USB connection or with an external
power supply. The power source is selected automatically. External (non-USB) power
can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be
connected by plugging a 2.1mm center-positive plug into the board's power jack.

B.Tech[ECE] KITS,MARKAPUR Page 15


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Leads from a battery can be inserted in the Gnd and Vin pin headers of the
POWER connector. The board can operate on an external supply of 6 to 20 volts. If
supplied with less than 7V, however, the 5V pin may supply less than five volts and
the board may be unstable. If using more than 12V, the voltage regulator may
overheat and damage the board. The recommended range is 7 to 12 volts.
1.USB Interface:
Arduino board can be powered by using the USB cable from your computer.
All you need to do is connect the USB cable to the USB connection
2. External power supply:
Arduino boards can be powered directly from the AC mains power supply by
connecting it to the power supply (Barrel Jack)
3. Voltage Regulator:
The function of the voltage regulator is to control the voltage given to the
Arduino board and stabilize the DC voltages used by the processor and other
elements.
4. Crystal Oscillator:
The crystal oscillator helps Arduino in dealing with time issues. How does
Arduino calculate time? The answer is, by using the crystal oscillator. The number
printed on top of the Arduino crystal is 16.000H9H. It tells us that the frequency is
16,000,000 Hertz or 16 MHz.
5. Arduino Reset:
It can reset your Arduino board, i.e., start your program from the beginning. It
can reset the UNO board in two ways. First, by using the reset button (17) on the
board. Second, you can connect an external reset button to the Arduino pin labeled
RESET (5).
6-9.Pins (3.3, 5, GND, Vin):
 3.3V (6): Supply 3.3 output volt
 5V (7): Supply 5 output volt
 Most of the components used with Arduino board works fine with 3.3 volt
and 5 volt.
 GND (8)(Ground): There are several GND pins on the Arduino, any of which
can be used to ground your circuit.
 Vin (9): This pin also can be used to power the Arduino board from an

B.Tech[ECE] KITS,MARKAPUR Page 16


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

external power source, like AC mains power supply.


10. Analog pins:
The Arduino UNO board has five analog input pins A0 through A5. These
pins can read the signal from an analog sensor like the humidity sensor or temperature
sensor and convert it into a digital value that can be read by the microprocessor.
11. Main microcontroller:
Each Arduino board has its own microcontroller (11). You can assume it as
the brain of your board. The main IC (integrated circuit) on the Ardsuino is slightly
different from board has before loading up a new program from the Arduino IDE.
This information is available on the top of the IC. For more details about the IC
construction and functions, you can refer to the data sheet.
The Atmega8U2 programmed as a USB-to-serial converter. "Uno" means
"One" in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno
and version 1.0 will be the reference versions of Arduino, moving forward. The Uno
is the latest in a series of USB Arduino boards, and the reference model for the
Arduino platform; for a comparison with previous versions, see the index of Arduino
boards.
3.4 PIN DAIGRAM:

Fig: 3.4.1 Pin Diagram


3.4.1 Pin Description:
VCC: Digital supply voltage.
GND: Ground.

B.Tech[ECE] KITS,MARKAPUR Page 17


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Port B (PB[7:0]) XTAL1/XTAL2/TOSC1/TOSC2:Port B is an 8-bit bi-directional


I/O port with internal pull-up resistors (selected for each bit). The Port B output
buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port B pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port B pins are tri-stated when a reset
condition becomes active, even if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input to the
inverting Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output
from the inverting Oscillator amplifier.
If the Internal Calibrated RC Oscillator is used as chip clock source, PB is
used as TOSC input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is
set.
Port C (PC[5:0]):
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The PC[5:0] output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, Port C pins that are externally pulled
low will source current if the pull-up resistors are activated. The Port C pins are tri-
stated when a reset condition becomes active, even if the clock is not running.
PC6/RESET:
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that
the electrical characteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is un programmed, PC6 is used as a Reset input. A low
level on this pin for longer than the minimum pulse length will generate a Reset, even
if the clock is not running. Shorter pulses are not guaranteed to generate a Reset.
Port D (PD[7:0]):
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port D output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port D pins that
are externally pulled low will source current if the pull-up resistors are activated. The
Port D pins are tri-stated when a reset condition becomes active, even if the clock is
not running.

B.Tech[ECE] KITS,MARKAPUR Page 18


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

AVCC: AVCC is the supply voltage pin for the A/D Converter, PC[3:0], and PE[3:2].
It should be externally connected to VCC, even if the ADC is not used. If the ADC is
used, it should be connected to VCC through a low-pass filter.
AREF:
AREF is the analog reference pin for the A/D Converter.
ADC [7:6] (TQFP and VFQFN Package Only):
In the TQFP and VFQFN package, ADC[7:6] serve as analog inputs to the
A/D converter. These pins are powered from the analog supply and serve as 10-bit
ADC channels.
12. ICSP pin:
Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino
consisting of MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as
an SPI (Serial Peripheral Interface), which could be considered as an "expansion" of
the output. Actually, you are slaving the output device to the master of the SPI bus.
13. Power LED indicator:
This LED should light up when you plug your Arduino into a power source to
indicate that your board is powered up correctly. If this light does not turn on, then
there is something wrong with the connection.
14. TX and RX LEDs:
On your board, you will find two labels: TX (transmit) and RX (receive). They
appear in two places on the Arduino UNO board. First, at the digital pins 0 and 1, to
indicate the pins responsible for serial communication.. The speed of flashing depends
on the baud rate used by the board. RX flashes during the receiving process.
15. Digital I / O:
The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide
PWM (Pulse Width Modulation) output. These pins can be configured to work as
input digital pins to read logic values (0 or 1) or as digital output pins to drive
different modules like LEDs, relays, etc. The pins labeled “~” can be used to generate
PWM.
16. AREF:
AREF stands for Analog Reference. It is sometimes, used to set an external
reference voltage (between 0 and 5 Volts) as the upper limit for the analog input pins
working.

B.Tech[ECE] KITS,MARKAPUR Page 19


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CHAPTER-4
HARDWARE DSECRIPTION

B.Tech[ECE] KITS,MARKAPUR Page 20


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

4.1 Power Supply


Power supply is a reference to a source of electrical power. A device or system
that supplies electrical or other types of energy to an output load or group of loads is
called a power supply unit or PSU. The term is most commonly applied to electrical
energy supplies, less often to mechanical ones, and rarely to others
This power supply section is required to convert AC signal to DC signal and
also to reduce the amplitude of the signal. The available voltage signal from the mains
is 230V/50Hz which is an AC voltage, but the required is DC voltage(no frequency)
with the amplitude of +5V and +12V for various applications.
In this section we have Transformer, Bridge rectifier, are connected serially and
voltage regulators for +5V and +12V (7805 and 7812) via a capacitor (1000µF) in
parallel are connected parallel as shown in the circuit diagram below. Each voltage
regulator output is again is connected to the capacitors of values (100µF, 10µF, 1µF,
0.1µF) are connected parallel through which the corresponding output(+5V or +12V)
are taken into consideration.

Fig.4.1.1:Block diagram of power supply

Fig.4.1.2:Power supply circuit

B.Tech[ECE] KITS,MARKAPUR Page 21


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

4.1.1 Transformer
A transformer is a device that transfers electrical energy from one circuit to
another through inductively coupled electrical conductors. A changing current in the
first circuit (the primary) creates a changing magnetic field; in turn, this magnetic
field induces a changing voltage in the second circuit (the secondary). By adding a
load to the secondary circuit, one can make current flow in the transformer, thus
transferring energy from one circuit to the other.
The secondary induced voltage VS, of an ideal transformer, is scaled from the
primary VP by a factor equal to the ratio of the number of turns of wire in their
respective windings:

4.1.1.1 Basic principle

The transformer is based on two principles: firstly, that an electric current can
produce a magnetic field (electromagnetism) and secondly that a changing magnetic
field within a coil of wire induces a voltage across the ends of the coil
(electromagnetic induction). By changing the current in the primary coil, it changes
the strength of its magnetic field; since the changing magnetic field extends into the
secondary coil, a voltage is induced across the secondary.

Fig: 4.1.1.1.1 An ideal step-down transformer showing magnetic flux in the


core

B.Tech[ECE] KITS,MARKAPUR Page 22


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

A simplified transformer design is shown above fig. A current passing


through the primary coil creates a magnetic field. The primary and secondary coils
are wrapped around a core of very high magnetic permeability, such as iron; this
ensures that most of the magnetic field lines produced by the primary current are
within the iron and pass through the secondary coil as well as the primary coil

4.1.1.2 Induction law:

The voltage induced across the secondary coil may be calculated from
Faraday's law of induction, which states that.

Where VS is the instantaneous voltage, NS is the number of turns in the


secondary coil and Φ equals the magnetic flux through one turn of the coil. If the
turns of the coil are oriented perpendicular to the magnetic field lines, the flux is the
product of the magnetic field strength B and the area A through which it cuts. Since
the same magnetic flux passes through both the primary and secondary coils in an
ideal transformer, the instantaneous voltage across the primary winding equals

Taking the ratio of the two equations for VS and VP gives the basic equation for
stepping up or stepping down the voltage

4.1.1.3 Ideal power equation:

If the secondary coil is attached to a load that allows current to flow, electrical
power is transmitted from the primary circuit to the secondary circuit. Ideally, the
transformer is perfectly efficient; all the incoming energy is transformed from the
primary circuit to the magnetic field and into the secondary circuit. If this
condition is met, the incoming electric power must equal the outgoing power.
P incoming = IPVP = P outgoing = ISVS

B.Tech[ECE] KITS,MARKAPUR Page 23


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

giving the ideal transformer equation

Pin-coming = IPVP = Pout-going = ISVS

giving the ideal transformer equation

If the voltage is increased (stepped up) (VS>VP), then the current is decreased
(stepped down) (IS<I P) by the same factor. Transformers are efficient so this formula
is a reasonable approximation.

The impedance in one circuit is transformed by the square of the turns ratio.
For example, if an impedance ZS is attached across the terminals of the secondary coil,
it appears to the primary circuit to have an impedance of

This relationship is reciprocal, so that the impedance ZP of the primary circuit


appears to the secondary to be

B.Tech[ECE] KITS,MARKAPUR Page 24


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

4.1.2 B ridge rectifier

A diode bridge or bridge rectifier is an arrangement of four diodes in a bridge


configuration that provides the same polarity of output voltage for any polarity of
input voltage. When used in its most common application, for conversion of
alternating current (AC) input into direct current (DC) output, it is known as a bridge
rectifier. A bridge rectifier provides full-wave rectification from a two-wire AC input,
resulting in lower cost and weight as compared to a center-tapped transformer design,
but has two diode drops rather than one, thus exhibiting reduced efficiency over a
center-tapped design for the sam e output volta ge.

4.1.2.1 Basic Operation

When the input connected at the left corner of the diamond is positive with
respect to the one connected at the right hand corner, current flows to the right along
the upper colored path to the output, and returns to the input supply via the lower one.

Fig: 4.1.2.1. Bridge rectifier during positive half cycle

When the right hand corner is positive relative to the left hand corner, current
flows along the upper colored path and returns to the supply via the lower colored
path.

Fig.4.1.2.2: Bridge rectifier during negative half cycle

B.Tech[ECE] KITS,MARKAPUR Page 25


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

In each case, the upper right output remains positive with respect to the lower
right one. Since this is true whether the input is AC or DC, this circuit not only
produces DC power when supplied with AC power.it also can provide what is
sometimes called "reverse polarity protection". That is, it permits normal functioning
when batteries are installed backwards or DC input-power supply wiring "has its
wires crossed"

Fig: 4.1.2.3 Wave form of bridge rectifier

4.1.2.2 Output smoothing (Using Capacitor)

For many applications, especially with single phase AC where the full-wave
bridge serves to convert an AC input into a DC output, the addition of a capacitor may
be important because the bridge alone supplies an output voltage of fixed polarity but
pulsating magnitude (see diagram above).

Fig.4.1.2.2.1: Bridge rectifier using capacitor

B.Tech[ECE] KITS,MARKAPUR Page 26


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

The function of this capacitor, known as a reservoir capacitor (aka smoothing


capacitor) is to lessen the variation in (or 'smooth') the rectified AC output voltage
waveform from the bridge. One explanation of 'smoothing' is that the capacitor
provides a low impedance path to the AC component of the output, reducing the AC
voltage across, and AC current through, the resistive load.

This charge flows out as additional current through the load. Thus the change
of load current and voltage is reduced relative to what would occur without the
capacitor. Increases of voltage correspondingly store excess charge in the capacitor,
thus moderating the change in output voltage / current. Also see rectifier output
smoothing.

The capacitor and the load resistance have a typical time constant τ = RC
where C and R are the capacitance and load resistance respectively. As long as the
load resistor is large enough so that this time constant is much longer than the time of
one ripple cycle, the above configuration will produce a smoothed DC voltage across
the load.

The idealized waveforms shown above are seen for both voltage and current
when the load on the bridge is resistive. When the load includes a smoothing
capacitor, both the voltage and the current waveforms will be greatly changed. While
the voltage is smoothed, as described above, current will flow through the bridge only
during the time when the input voltage is greater than the capacitor voltage.

Output can also be smoothed using a choke and second capacitor. The choke
tends to keep the current (rather than the voltage) more constant. Due to the relatively
high cost of an effective choke compared to a resistor and capacitor this is not
employed in modern equipment.

4.1.3 Voltage regulator:

A voltage regulator is an electrical regulator designed to automatically


maintain a constant voltage level.

B.Tech[ECE] KITS,MARKAPUR Page 27


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

The 78xx (also sometimes known as LM78xx) series of devices is a family of


self-contained fixed linear voltage regulator integrated circuits. The 78xx family is a
very popular choice for many electronic circuits which require a regulated power
supply, due to their ease of use and relative cheapness. When specifying individual
ICs within this family, the xx is replaced with a two-digit number, which indicates the
output voltage the particular device is designed to provide (for example, the 7805 has
a 5 volt output, while the 7812 produces 12 volts). The 78xx line is positive voltage
regulators, meaning that they are designed to produce a voltage that is positive
relative to a common ground. There is a related line of 79xx devices which are
complementary negative voltage regulators. 78xx and 79xx ICs can be used in
combination to provide both positive and negative supply voltages in the same circuit,
if necessary.

78xx ICs have three terminals and are most commonly found in the TO220
form factor, although smaller surface-mount and larger TrO3 packages are also
available from some manufacturers.).

4.2 LCD [Liquid crystal display]

General Description:

The Liquid Crystal Display (LCD) is a low power device (microwatts). Now a
days in most applications LCDs are using rather using of LED displays because of its
specifications like low power consumption, ability to display numbers and special
characters which are difficult to display with other displaying circuits and easy to
program. An LCD requires an external or internal light source. Temperature range of
LCD is 0ºC to 60ºC and lifetime is an area of concern, because LCDs can chemically
degrade these are manufactured with liquid crystal material (normally organic for
LCDs) that will flow like a liquid but whose molecular structure has some properties
normally associated with solids. . LCDs are classified as

1. Dynamic-scattering LCDs and


2. Field-effect LCDs

B.Tech[ECE] KITS,MARKAPUR Page 28


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Field-effect LCDs are normally used in such applications where source of


energy is a prime factor (e.g., watches, portable instrumentation etc.).They absorb
considerably less power than the light-scattering type
EN (Enable LCD):
EN bit is to ENABLE or DISABLE the LCD. When ever controller wants to
write something into LCD or READ acknowledgment from LCD
RS (Command / Data):
This bit is to specify weather received byte is command or data. So that
LCD can recognize the operation to be performed based on the bit status.
RS = 0 => Command
RS = 1 => Data
RW (Read / Write):
RW bit is to specify weather controller wants READ from LCD or WRITE
to LCD. The READ operation here is just ACK bit to know weather LCD is free or
not.
RW = 0 => Write
RW = 1 => Read
it needs to enable the LCD.
EN = 0 => High Impedance
EN = 1 => Low Impedance
ACK (LCD Ready):
ACK bit is to acknowledge the MCU that LCD is free so that it can send
new command or data to be stored in its internal Ram locations
ACK = 1 => Not ACK
ACK = 0 => ACK

B.Tech[ECE] KITS,MARKAPUR Page 29


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

16 x 2 Char LCD

D0 EN RW RS Vf GND
A K D7

ACK
Vcc
D0 – D7

R1

R2

Fig: 4.2.1 LCD diagram

LCD
D0-D7 RS RW EN

Data Lines
Embedded
Controller
P1.0

P1.1

P1.2

Fig: 4.2.2 LCD block diagram


4.2.1 Hardware Connections

CONTROLER PINS LCD PINS PIN NAME WITH


FEATURE
(P1.0) 4 RS (Control Pin)

(P1.1) 5 RW (Control pin )

(P1.2) 6 EN (Control pin)


Port 0 7 to 14 Data Port

40 15 & 2 Vcc
20 16 & 1 Gnd

Fig: 4.2.1.1 Table of hardware connections

B.Tech[ECE] KITS,MARKAPUR Page 30


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

4.2.2 Flow Chart of LCD:


START

Configure port pins for all hardware


connections

Wait
Yes
Is LCD Free
No

Clear RS Bit

Enable LCD

Send Command

Disable LCD

Is Command
Count Zero
No

Wait
Yes
Is LCD Free
No

Set RS Bit

Enable LCD

Send Data

Disable LCD

Is Data
Count Zero
No

STOP

B.Tech[ECE] KITS,MARKAPUR Page 31


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

4.3 Light Dependent Resistor:


Light Dependent Resistors are astoundingly significant especially in light/dull
sensor circuits. Typically the protection of a LDR is high, once in a while as high as
1,000,000 ohms, however when they are lit up with light, the protection drops
significantly. . Along these lines in this endeavor, LDR expect a basic part in trading
on the lights in light of the power of light i.e., if the power of light is all the more
(amid daytime) the lights will be in off condition. What's more, if the power of light is
less (amid evenings), the lights will be

Fig: 4.3.1 LDR Symbol Fig: 4.3.2 Photo conductor


4.3.1 Introduction
LDR sensor module is a low-cost digital sensor as well as analog
sensor module, which is capable to measure and detect light intensity. This sensor
also is known as the Photo resistor sensor. This sensor has an onboard LDR(Light
Dependent Resistor), that helps it to detect light. This sensor module comes with 4
terminals. Where the “DO” pin is a digital output pin and the “AO” pin is an analog
output pin. The output of the module goes high in the absence of light and it becomes
low in the presence of light. The sensitivity of the sensor can be adjusted using the
onboard potentiometer.

Fig.4.3.1.1 LDR sensor module or photo resistor sensor

B.Tech[ECE] KITS,MARKAPUR Page 32


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Pin no Pin name Description

1 VCC +5v power supply input pin


2 GND Ground(-)power supply input pin
3 DO Digital output pin
4 AO Analog output pin

Fig: 4.3.1.2 LDR specifications


The LDR sensor module consists module consists of the LDR,LM393
COMPARATORS, variable resistor(trim pot), power LED, output LED.
Light dependent resister is one type of variable resister. It is also known as a
photo resister.The Light dependent Resister (LDR) work on the principle of “photo
conductivity”. The LDR resistance is changed according to the light intensity falls on
the LDR. When light intensity increased on the LDR surface, then the LDR resistance
will be decrease and the element conductivity will increases. when light intensity
decrease on the LDR Surface, then the LDR resistance will increase and the element
conductivity will decrease
4.4 Relays:

A relay is an electrically controllable switch widely used in industrial controls,


automobiles and appliances.

The relay allows the isolation of two separate sections of a system with two
different voltage sources i.e., a small amount of voltage/current on one side can
handle a large amount of voltage/current on the other side but there is no chance that
these two voltages mix up.

Inductor

Fig: 4.4.1 Circuit symbol of a relay

B.Tech[ECE] KITS,MARKAPUR Page 33


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Operation:

When current flows through the coil, a magnetic field is created around the
coil i.e., the coil is energized. This causes the armature to be attracted to the coil. The
armature’s contact acts like a switch and closes or opens the circuit. When the coil is
not energized, a spring pulls the armature to its normal state of open or closed. There
are all types of relays for all kinds of applications.

Fig: 4.4.2 Relay Operation and use of protection diodes

Transistors and ICs must be protected from the brief high voltage 'spike'
produced when the relay coil is switched off. The above diagram shows how a signal
diode is connected across the relay coil to provide this protection. The diode is
connected 'backwards' so that it will normally not conduct. Conduction occurs only
when the relay coil is switched off, at this moment the current tries to flow
continuously through the coil and it is safely diverted through the diode. Without the
diode no current could flow and the coil would produce a damaging high voltage
'spike' in its attempt to keep the current flowing.

In choosing a relay, the following characteristics need to be considered:

1. The contacts can be normally open (NO) or normally closed (NC). In the NC type,
the contacts are closed when the coil is not energized. In the NO type, the contacts are
closed when the coil is energized.

2. The voltage and current required to energize the coil. The voltage can vary from a
few volts to 50 volts, while the current can be from a few milliamps to 20milliamps.

B.Tech[ECE] KITS,MARKAPUR Page 34


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

The relay has a minimum voltage, below which the coil will not be energized. This
minimum voltage is called the “pull-in” voltage.

3. The minimum DC/AC voltage and current that can be handled by the contacts. This
is in the range of a few volts to hundreds of volts, while the current can be from a few
amps to 40A or more, depending on the relay.

4.4.1 Driving a relay

An SPDT relay consists of five pins, two for the magnetic coil, one as the
common terminal and the last pins as normally connected pin and normally closed
pin. When the current flows through this coil, the coil gets energized. Initially when
the coil is not energized, there will be a connection between the common terminal and
normally closed pin. But when the coil is energized, this connection breaks and a new
connection between the common terminal and normally open pin will be established.
Thus when there is an input from the microcontroller to the relay, the relay will be
switched on. Thus when the relay is on, it can drive the loads connected between the
common terminal and normally open pin. Therefore, the relay takes 5V from the
microcontroller and drives the loads which consume high currents. Thus the relay acts
as an isolation device.

Digital systems and microcontroller pins lack sufficient current to drive the
relay. While the relay’s coil needs around 10milli amps to be energized, the
microcontroller’s pin can provide a maximum of 1-2milli amps current. For this
reason, a driver such as ULN2003 or a power transistor is placed in between the
microcontroller and the relay. In order to operate more than one relay, ULN2003 can
be connected between relay and microcontroller
4.5 INFRARED Technology (IR)
Technically known as "infrared radiation", infrared light is part of the
electromagnetic spectrum located just below the red portion of normal visible light –
the opposite end to ultraviolet. Although invisible, infrared follows the same
principles as regular light and can be reflected or pass through transparent objects,
such as glass. Infrared remote controls use this invisible light as a form of
communications between themselves and home theater equipment, all of which have

B.Tech[ECE] KITS,MARKAPUR Page 35


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

infrared receivers positioned on the front. Essentially, each time you press a button on
a remote, a small infrared diode at the front of the remote beams out pulses of light at
high speed to all of your equipment. When the equipment recognizes the signal as its
own, it responds to the command.
The light our eyes see is but a small part of a broad spectrum of
electromagnetic radiation. On the immediate high energy side of the visible spectrum
lies the ultraviolet, and on the low energy side is the infrared. The portion of the
infrared region most useful for analysis of organic compounds is not immediately
adjacent to the visible spectrum, but is that having a wavelength range from 2,500 to
16,000 nm, with a corresponding frequency range from 1.9*1013 to 1.2*1014 Hz.(
From http://hyperphysics.phy-astr.gsu.edu/hbase/ems3.html : the frequency of
infrared ranges from 0.003 - 4 x 1014 Hz or about 300 gigahertz to 400 terahertz.).

Fig: 4.5.1 spectrum of electromagnetic radiation


Infrared imaging is used extensively for both military and civilian purposes.
Military applications include target acquisition, surveillance, night vision, homing and
tracking. Non-military uses include thermal efficiency analysis, remote temperature
sensing, short-ranged wireless communication, spectroscopy, and weather forecasting.
IR LED QED234:

Fig: 4.5.2 schemtaic symbol

B.Tech[ECE] KITS,MARKAPUR Page 36


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

FEATURES:
• Wave length is 940 nm
• Chip material =GaAs with AlGaAs window
• Package type: T-1 3/4 (5mm lens diameter)
• Matched Photo sensor: QSD122/123/124
• Medium Emission Angle, 40°
Connecting Block
This is simply a place for all the parts to plug in or connect to. Connecting
blocks are usually classified based on the number of outputs (how many IR emitters
can connect to the block) Amplified connecting blocks can generally support more
outputs. All connecting blocks can support many IR receivers wired in parallel.
Connecting blocks are usually located near the equipment that is to be controlled,
along with the power supply and emitters. See our connecting blocks here.
4.5.1 Infrared Explination
Infrared is an energy radiation with a frequency below our eyes sensitivity, so
we cannot see it. Even that we cannot "see" sound frequencies, we know that it exist,
we can listen them.

Fig:4.5.1.1 IR Band spectrum


Even that we cannot see or hear infrared, we can feel it at our skin temperature
sensors.
When you approach your hand to fire or warm element, you will "feel" the
heat, but you can't see it. You can see the fire because it emits other types of radiation,
visible to your eyes, but it also emits lots of infrared that you can only feel in your
skin.
4.5.2 IR Generation
To generate a 36 kHz pulsating infrared is quite easy, more difficult is to
receive and identify this frequency. This is why some companies produce infrared
receives, that contains the filters, decoding circuits and the output shaper, that delivers
a square wave, meaning the existence or not of the 36kHz incoming pulsating
infrared.

B.Tech[ECE] KITS,MARKAPUR Page 37


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

It means that those 3 dollars small units, have an output pin that goes high
(+5V) when there is a pulsating 36kHz infrared in front of it, and zero volts when
there is not this radiation.
A square wave of approximately 27uS (microseconds) injected at the base of a
transistor, can drive an infrared LED to transmit this pulsating light wave. Upon its
presence, the commercial receiver will switch its output to high level (+5V).If you can
turn on and off this frequency at the transmitter, your receiver's output will indicate
when the transmitter is on or off.

Fig: 4.5.2.1 output waveform of receiver when the transistor is ON and OFF
Those IR demodulators have inverted logic at its output, when a burst of IR is
sensed it drives its output to low level, meaning logic level = 1.
RC-5
Various remote control systems are used in electronic equipment today. The
RC5 control protocol is one of the most popular and is widely used to control
numerous home appliances, entertainment systems and some industrial applications
including utility consumption remote meter reading, contact-less apparatus control,
telemetry data transmission, and car security systems.
When the user pushes a button on the hand-held remote, the device is activated
and sends modulated infrared light to transmit the command. The remote separates
command data into packets. Each data packet consists of a 14-bit data word, which is
repeated if the user continues to push the remote button.
The data packet structure is as follows:
 2 start bits,
 1 control bit,
 5 address bits,

B.Tech[ECE] KITS,MARKAPUR Page 38


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

 6 command bits.
The start bits are always logic ‘1’ and intended to calibrate the optical receiver
automatic gain control loop. Next, is the control bit.. The next 5 bits are the address
bits and select the destination device. A number of devices can use RC5 at the same
time. To exclude possible interference, each must use a different address.
The 6 command bits describe the actual command. As a result, a RC5 transmitter
can send the 2048 unique commands. .
The receiver performs the reverse function. The photo detector converts optical
transmission into electric signals, filters it and executes amplitude demodulation. The
receiver output bit stream can be used to decode the RC5 data word. This operation is
done by the microprocessor typically, but complete hardware implementations are
present on the market as well
4.5.2.1 IR Receiver
Many different receiver circuits exist on the market. The most important
selection criteria are the modulation frequency used and the availability in you region.

Fig : 4.5.2.1.1 block diagram of IR receiver


In the picture above, the typical block diagram of an IR receiver is shown. The
received IR signal is picked up by the IR detection diode on the left side of the
diagram. This signal is amplified and limited by the first 2 stages. The limiter acts as
an AGC circuit to get a constant pulse level, regardless of the distance to the handset.
As it can be seen, only the AC signal is sent to the Band Pass Filter. The Band Pass
Filter is tuned to the modulation frequency of the handset unit. Common frequencies
range from 30 kHz to 60kHz in consumer electronics.
The next stages are a detector, integrator and comparator. The purpose of these
three blocks is to detect the presence of the modulation frequency. All these blocks
are integrated into a single electronic component.

B.Tech[ECE] KITS,MARKAPUR Page 39


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

It should be noted that the amplifier is set to a very high gain. Therefore, the
system tends to start oscillating very easily. Some data sheets recommend a resistor of
330 Ohms in series with the power supply to further decouple the power supply from
the rest of the circuit.
4.5.2.2 IR Transmitter and Receiver:
IR stands infrared red spectrum, by using this region we can detect number of
obstacles passing through a region.
IR consists of two sections one is transmitter section and other is receiver section.
Transmitter section: It consists of a LED which continuously transmits a modulated
signal of range(40 to 250khz).
Receiver section: Receiver section consists of a photo diode it will continuously
track and receive the IR rays from LED
Functionality: The IR transmitter will continuously transmit IR rays and receiver
(photo diode) will continuously receive the rays whenever some obstacle passes
through the IR pair the transmission will be breaked by which we come to know that
an intruder have been detected. In this way this communication will help us in
safeguarding and many other applications.
4.5.2.3 Applications:
 Infrared Filters
 Night vision
 Thermograph
 Other imaging
 Tracking
4.6 Bulb and Holder

Fig: 4.6.1 Bulb

B.Tech[ECE] KITS,MARKAPUR Page 40


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

A light bulb produces light from electricity. In addition to lighting a dark


space, they can be used to show an electronic device is on, to direct traffic, for heat
and for many other purposes. Billions are in use, some even in outer space.

Early people used candles and oil lamps for light. Crude incandescent lights
were made in the early and middle 19th century but had little use.
Improved vaccum pumps and better materials made them shine longer and brighter
late in the century. Electric power stations brought electricity to urban and later rural
areas to power them. Later gas discharge lights, including fluorescent lights, use less
electricity to make more light.

Fig: 4.6.2 Bulb Holder

A light bulb socket, light socket, lamp socket or lamp holder is a device which
mechanically supports and provides electrical connections for a compatible
electric lamp. Sockets allow lamps to be safely and conveniently replaced (re-
lamping). There are many different standards for lamp holders, including early de
facto standards and later standards created by various standards bodies. Many of the
later standards conform to a general coding system in which a socket type is
designated by a letter or abbreviation followed by a number.

Not all lamps require a socket. For example, some miniature lamps have wire
leads suitable for direct connection to screw terminals or other wires, and some
reflector lamps provide screw terminals for electrical connections.

B.Tech[ECE] KITS,MARKAPUR Page 41


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

4.6.1 CPU FAN

Fig 4.6.1.1: CPU Fan

A computer fan is any fan inside, or attached to, a computer case used
for active cooling. Fans are used to draw cooler air into the case from the outside,
expel warm air from inside and move air across a heat sink to cool a particular
component. Both axial and sometimes centrifugal (blower/squirrel-cage) fans are used
in computers. Computer fans commonly come in standard sizes, and are powered and
controlled using 3-pin or 4-pin fan connectors.

B.Tech[ECE] KITS,MARKAPUR Page 42


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CHAPTER-5
ARDUINO IDE TOOLS

B.Tech[ECE] KITS,MARKAPUR Page 43


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

5.1 Introduction to Arduino IDE


Arduino is a prototype platform (open-source) based on an easy-to-use
hardware and software. It consists of a circuit board, which can be programmed
(referred to as a microcontroller) and a ready-made software called Arduino IDE
(Integrated Development Environment), which is used to write and upload the
computer code to the physical board.
The key features are:
 Arduino boards are able to read analog or digital input signals from different
sensors and turn it into an output such as activating a motor, turning LED on/off,
connect to the cloud and many other actions.
 You can control your board functions by sending a set of instructions to the
microcontroller on the board via Arduino IDE (referred to as uploading software).
 Unlike most previous programmable circuit boards, Arduino does not need an
extra piece of hardware (called a programmer) in order to load a new code onto
the board. You can simply use a USB cable.
 Additionally, the Arduino IDE uses a simplified version of C++, making it easier
to learn to program.
 Finally, Arduino provides a standard form factor that breaks the functions of the
micro-controller into a more accessible package.
 After learning about the main parts of the Arduino UNO board, we are ready to
learn how to set up the Arduino IDE. Once we learn this, we will be ready to
upload our program on the Arduino board.
5.2 Arduino data types:
Datatypes in C refers to an extensive system used for declaring variables or
functions of different types. The type of a variable determines how much space it
occupies in the storage and how the bit pattern stored is interpreted.
The following table provides all the data types that you will use during Arduino
programming.
Void:
The void keyword is used only in function declarations. It indicates that the
function is expected to return no information to the function from which it was called.

B.Tech[ECE] KITS,MARKAPUR Page 44


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Example:
Void Loop ( )
{
// rest of the code
}
Boolean:
A Boolean holds one of two values, true or false. Each Boolean variable
occupies one byte of memory.
Example:
Boolean state= false ; // declaration of variable with type boolean and initialize
it with false.
Boolean state = true ; // declaration of variable with type boolean and initialize
it with false.
Char:
A data type that takes up one byte of memory that stores a character value.
Character literals are written in single quotes like this: 'A' and for multiple characters,
strings use double quotes: "ABC".
However, characters are stored as numbers. You can see the specific encoding
in the. ASCII characters. For example, 'A' + 1 has the value 66, since the ASCII value
of the capital letter A is 65.
Example:
Char chr_a = ‘a’ ;//declaration of variable with type char and initialize it with
character a.
Char chr_c = 97 ;//declaration of variable with type char and initialize it with
character 97
Unsigned char:
Unsigned char is an unsigned data type that occupies one byte of memory. The
unsigned char data type encodes numbers from 0 to 255.
Example:
Unsigned Char chr y = 121 ; // declaration of variable with type Unsigned char
and initialize it with character y
Byte:
A byte stores an 8-bit unsigned number, from 0 to 255.

B.Tech[ECE] KITS,MARKAPUR Page 45


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Example:
byte m = 25 ;//declaration of variable with type byte and initialize it with 25
Int:
Integers are the primary data-type for number storage. int stores a 16-bit (2-
byte) value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a
maximum value of (2^15) - 1).
The int size varies from board to board. On the Arduino Due, for example, an
int stores a 32-bit (4-byte) value. This yields a range of -2,147,483,648 to
2,147,483,647 (minimum value of -2^31 and a maximum value of (2^31) - 1).
Example:
int counter = 32 ;// declaration of variable with type int and initialize it with 32.
Unsigned int:
Unsigned ints (unsigned integers) are the same as int in the way that they store
a 2 byte value. Instead of storing negative numbers, however, they only store positive
values, yielding a useful range of 0 to 65,535 (2^16) - 1). The Due stores a 4 byte (32-
bit) value, ranging from 0 to 4,294,967,295 (2^32 - 1).
Example:
Unsigned int counter= 60 ; // declaration of variable with type unsigned int
and initialize it with 60.
Word:
On the Uno and other ATMEGA based boards, a word stores a 16-bit
unsigned number. On the Due and Zero, it stores a 32-bit unsigned number.
Example:
word w = 1000 ;//declaration of variable with word and initialize it with 1000.
Long:
Long variables are extended size variables for number storage, and store 32
bits (4 bytes), from 2,147,483,648 to 2,147,483,647.
Example:
Long velocity= 102346 ;//declaration of variable with type Long and initialize it
with 102346
Unsigned long: Unsigned long variables are extended size variables for number
storage and store 32 bits (4 bytes). Unlike standard longs, unsigned longs will not
store negative numbers, making their range from 0 to 4,294,967,295 (2^32 - 1).

B.Tech[ECE] KITS,MARKAPUR Page 46


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Example: Unsigned Long velocity = 101006 ;// declaration of variable with type
Unsigned Long and initialize it with 101006.
Short:
A short is a 16-bit data-type. On all Arduino (ATMEGA and ARM based), a
short stores a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767
(minimum value of -2^15 and a maximum value of (2^15) - 1).
Example:
short val= 13 ;//declaration of variable with type short and initialize it with 13
Float:
Data type for floating-point number is a number that has a decimal point
Floating-point numbers are often used to approximate the analog and continuous
values because they have greater resolution than integers.
Floating-point numbers can be as large as 3.4028235E+38 and as low as
3.4028235E+38. They are stored as 32 bits (4 bytes) of information.
Example:
float num = 1.352;//declaration of variable with type float and initialize it with
1.352.
Double:
On the Uno and other ATMEGA based boards, Double precision floating-
point number occupies four bytes. That is, the double implementation is exactly the
same as the float, with no gain in precision. On the Arduino Due, doubles have 8-byte
(64 bit) precision.
Example:
double num = 45.352 ;// declaration of variable with type double and initialize
it with 45.352.
5.3 Arduino software tools:
Step 1: First you must have your Arduino board (you can choose your favorite board)
anda USB cable.In case you use Arduino UNO, Arduino Duemilanove, Nano,
Arduino Mega2560, or Diecimila, you will need a standard USB cable (A plug to B
plug), the kind you would connect to a USB printer as shown in the following image.

B.Tech[ECE] KITS,MARKAPUR Page 47


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Figure 5.3.1: USB Cable


Step 2: Download Arduino IDE Software.
You can get different versions of Arduino IDE from the Download page on
the Arduino Official website. You must select your software, which is compatible
with your operating system (Windows, IOS, or Linux). After your file download is
complete, unzip the file.

Fig.5.3.2 Download Arduino software tool

Step 3: Power up your board.


The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw
power from either, the USB connection to the computer or an external power supply.
If you are using an Arduino Diecimila, you have to make sure that the board is
configured to draw power from the USB connection. The power source is selected
with a jumper, a small piece of plastic that fits onto two of the three pins between the
USB and power jacks. Check that it is on the two pins closest to the USB port.
Connect the Arduino board to your computer using the USB cable. The green power
LED (labeled PWR) should glow.

B.Tech[ECE] KITS,MARKAPUR Page 48


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Step 4: Launch Arduino IDE.


After your Arduino IDE software is downloaded, you need to unzip the folder.
Inside the folder, you can find the application icon with an infinity label
(application.exe). Double click the icon to start the IDE.

Fig.5.3.3 Opening Arduino tool


Step 5: Open your first project.
Once the software starts, you have two options:
 Create a new project.
 Open an existing project example.
To create a new project, select File --> New To open

Fig. 5.3.4 Opening NEW file

B.Tech[ECE] KITS,MARKAPUR Page 49


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

To open an existing project example, select File -> Example -> Basics -> Blink.

Fig: 5.3.5 To opening an existing project


Here, we are selecting just one of the examples with the name Blink. It turns
the LED on and off with some time delay. You can select any other example from the
list.
Step 6: Select your Arduino board.
To avoid any error while uploading your program to the board, you must
select the correct Arduino board name, which matches with the board connected to
your computer.
Go to Tools -> Board and select your board

B.Tech[ECE] KITS,MARKAPUR Page 50


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Fig.5.3.6 Selection of Board Arduino UNO


Here, we have selected Arduino Uno board according to our tutorial, but you
must select the name matching the board that you are using
Step 7: Select your serial port.
Select the serial device of the Arduino board. Go to Tools ->Serial Port
menu. This is likely to be COM3 or higher (COM1 and COM2 are usually
reserved for hardware serial ports). To find out, you can disconnect your
Arduino board and re-open the menu, the entry that disappears should be of the
Arduino board. Reconnect the board and select that serial port.

Fig: 5.3.7 opening the serial port

B.Tech[ECE] KITS,MARKAPUR Page 51


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Step 8: Upload the program to your board.


Before explaining how we can upload our program to the board, we must
demonstrate the function of each symbol appearing in the Arduino IDE toolbar.

Fig: 5.3.8 Demonstration of each symbol appearing is Arduino IDE tool


A- Used to check if there is any compilation error.
B- Used to upload a program to the Arduino board.
C- Shortcut used to create a new sketch.
D- Used to directly open one of the example sketch.
E- Used to save your sketch.
F- Serial monitor used to receive serial data from the board and send the serial
data to the board.
Now, simply click the "Upload" button in the environment. Wait a few
seconds; you will see the RX and TX LEDs on the board, flashing. If the upload is
successful, the message "Done uploading" will appear in the status bar.
Arduino programming structure
In this chapter, we will study in depth, the Arduino program structure and we
will learn more new terminologies used in the Arduino world. The Arduino software
is open-source. The source code for the Java environment is released under the GPL
and the C/C++ microcontroller libraries are under the LGPL.
Sketch: The first new terminology is the Arduino program called “sketch”.
Structure
Arduino programs can be divided in three main parts: Structure, Values
(variables and constants), and Functions. In this tutorial, we will learn about the
Arduino software program, step by step, and how we can write the program without
any syntax or compilation error.
Let us start with the Structure. Software structure consist of two main functions:

B.Tech[ECE] KITS,MARKAPUR Page 52


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

 Setup( ) function
 Loop( ) function

Fig: 5.3.9 Arduino programming structure


Void setup ( )
{
}
PURPOSE:
The setup() function is called when a sketch starts. Use it to initialize the
variables, pin modes, start using libraries, etc. The setup function will only run once,
after each power up or reset of the Arduino board.
INPUT
OUTPUT
RETURN
Void Loop ( )
{
}
PURPOSE: After creating a setup() function, which initializes and sets the initial
values, the loop() function does precisely what its name suggests, and loops
secutively, allowing your program to change and respond. Use it to activelycontrol the
Arduino board.
INPUT
OUTPUT
RETURN

B.Tech[ECE] KITS,MARKAPUR Page 53


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CHAPTER-6
SOFTWARE CODING

B.Tech[ECE] KITS,MARKAPUR Page 54


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

#include <LiquidCrystal.h>
LiquidCrystal lcd(13,12,11,10,9,8);

const int ir1 = 2;


const int ir2 = 3;
const int ldr = 4;

const int l1 = 5;
const int l2 = 6;
const int l3 = A0;

int ir1val=0;
int ir2val=0;
int ldrval=0;
int count=0;

void setup()
{
lcd.begin(16, 2);
Serial.begin(9600);

pinMode(l1, OUTPUT);digitalWrite(l1,LOW);delay(100);
pinMode(l2, OUTPUT);digitalWrite(l2,LOW);delay(100);
pinMode(l3, OUTPUT);digitalWrite(l3,HIGH);delay(100);

pinMode(ir1, INPUT);digitalWrite(ir1,HIGH);delay(100);
pinMode(ir2, INPUT);digitalWrite(ir2,HIGH);delay(100);
pinMode(ldr, INPUT);digitalWrite(ldr,HIGH);delay(100);

lcd.clear();
lcd.print("WSN BASED SMART");
lcd.setCursor(0, 1);
lcd.print("POWER SAVING S/M");delay(1000);

B.Tech[ECE] KITS,MARKAPUR Page 55


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

lcd.clear();
lcd.print("SYSTEM READY....");
delay(1000);
}

void loop()
{
while(1)
{

ir1val=digitalRead(ir1);

if(ir1val==LOW)
{
count=count+1;delay(100);
lcd.clear();
lcd.print("Count:");
lcd.print(count);
delay(1000);
}

ir2val=digitalRead(ir2);

if(ir2val==LOW)
{
count=count-1;delay(100);

if(count<=0)
{
count=0;
delay(100);
}

B.Tech[ECE] KITS,MARKAPUR Page 56


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

lcd.clear();
lcd.print("Count:");
lcd.print(count);
delay(1000);
}

ldrval=digitalRead(ldr);

if(ldrval==LOW)
{
if((count>0)&&(count<=5))
{
digitalWrite(l1,LOW);delay(100);
digitalWrite(l2,LOW);delay(100);
digitalWrite(l3,LOW);delay(100);
}
if((count>5))
{
digitalWrite(l1,LOW);delay(100);
digitalWrite(l2,LOW);delay(100);
digitalWrite(l3,LOW);delay(100);
}

if((count<=0))
{
delay(100);digitalWrite(l1,LOW);delay(1000);
delay(100);digitalWrite(l2,LOW);delay(1000);
digitalWrite(l3,HIGH);delay(100);
}
}

if(ldrval==HIGH)
{

B.Tech[ECE] KITS,MARKAPUR Page 57


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

if((count>0)&&(count<=5))
{
digitalWrite(l1,HIGH);delay(100);
digitalWrite(l2,LOW);delay(100);
digitalWrite(l3,LOW);delay(100);
}
if((count>5))
{
digitalWrite(l1,HIGH);delay(100);
digitalWrite(l2,HIGH);delay(100);
digitalWrite(l3,LOW);delay(100);
}

if((count<=0))
{
digitalWrite(l1,LOW);delay(1000);
digitalWrite(l2,LOW);delay(1000);
digitalWrite(l3,HIGH);delay(100);
}
}

}
}

B.Tech[ECE] KITS,MARKAPUR Page 58


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CHAPTER-7
RESULTS

B.Tech[ECE] KITS,MARKAPUR Page 59


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Results and Explination:


Here in this project we successfully executed the output and the whole procedure
is working as per the results. The results of the project are shown below.

Fig: 7.1.Developed circuit image of WSN based smart sensors and


actuator for power management in intelligent buildings
Operation:
The above fig shows WSN-based smart sensors and actuator for power
management in intelligent buildings. Now we shall discussed about the operation of
our project.
Here all the components which are used in our project are placed in
Arduino board. Here, 2 IR sensors are used for the purpose of ENTRY and EXIT .

ENTRY: Here, the entry IR SENSOR is activated when the person is present infront
of home at that time person enter the room the sensor will be detect the person then
automatically fan and light will be ON.
EXIT: Here, the exit IR sensor is activated when the person is goes (or) exit of the
home then automatically fan and light will be OFF.

B.Tech[ECE] KITS,MARKAPUR Page 60


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Fig: 7.2 When power is supplied to the kit initially project name is
displayed on LCD screen.
 A 230V power supply is given to the step down transformer, it converts
230v AC current to 5v or 12v DC Current.
 5V or 12V DC current is given to wein bridge rectifier. It produces pulse
generated DC current is given to capacitor filter it removes distortion and it
gives pure DC current.
 Voltage regulator to select 5v or 12v DC current

.
Fig: 7.3 Display name on LCD Display
The above figure shows display the project name WSN--based smart sensors
and actuator for power management in intelligent buildings on LCD.

B.Tech[ECE] KITS,MARKAPUR Page 61


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Fig: 7.4 Display the count value on LCD


Here in this step LCD display shows the count.As the person
enters the room IR sensor detects the person and count is started. You can
observe it, in the above image. Now fan turns on.

Fig 7.5: Bulb is turned on

Here in this image, as person entered the room, if LDR detects the
darkness then light will be turned on.

B.Tech[ECE] KITS,MARKAPUR Page 62


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

Fig.7.1.5 Here two bulbs are turned on when count is increased.


As the number of persons increases in the room then count also increases. If
count is reached to a level then two bulbs are turned on which you can observe
in the above image.

STEPS TO OPERATE HARDWARE KIT:


Step.1: when power is supplied to the board then initially title name
displayed on the LCD screen
Step.2: when person enters the room then the count will be started.
Step.3: count will be incremented to 1then the fan will be on.
Step.4: count is increased when the IR sensor detect the darkness as person
is present in the room bulb is turned on.
Step.5: As person increased then automatically count will be incremented.
Step.6: As the person goes out the speed of the fan decreases and the light also
turned off automatically.

B.Tech[ECE] KITS,MARKAPUR Page 63


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CHAPTER-8
CONCLUSION AND FUTURE SCOPE

B.Tech[ECE] KITS,MARKAPUR Page 64


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CONCLUSION:
A smart power monitoring and control system has been designed and
developed toward the implementation of an intelligent building. The developed
system effectively monitors and controls the electrical appliance usages at an elderly
home.
The sensor networks are programmed with various user interfaces suitable
for users of varying ability and for expert users such that the system can be
maintained easily and interacted with very simply. This study also aims to assess
consumer’s response toward perceptions of smart grid technologies, their advantages
and disadvantages, possible concerns, and overall perceived utility.
The developed system is robust and flexible in operation. For the last three
months, the system was able to perform the remote monitoring and control of
appliances effectively. Local and remote user interfaces are easy to handle by a novice
consumer and are efficient in handling the operations.

FUTURE SCOPE:
In future, the system will be integrated with co-systems like smart home
inhabitant behavior recognitions systems to determine the wellness of the inhabitant
in terms of energy consumption.

B.Tech[ECE] KITS,MARKAPUR Page 65


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

CHAPTER-9

REFERENCES

B.Tech[ECE] KITS,MARKAPUR Page 66


WSN-BAESD SMART SENSORS AND ACTUATOR FOR POWER
MANAGEMENT IN INTELLIGENT BUILDINGS

[1] G. Song, Z. Wei, W. Zhang, and A. Song, “A hybrid sensor network system for
home monitoring applications,” IEEE Trans. Consumer Electron., vol. 53, no. 4, pp.
1434–1439, Nov. 2007.

[2] C. Suh and Y. B. Ko, “Design and implementation of intelligent home control
systems based on active sensor networks,” IEEE Trans. Consumer Electron., vol. 54,
no. 3, pp. 1177–1184, Aug. 2008.
[3] K. D. Nguyen, I. M. Chen, Z. Luo, S. H. Yeo, and H. B. L. Duh, “A wearable
sensing system for tracking and monitoring of functional arm movement,” IEEE
/ASME Trans. Mechatronics, vol. 16, no. 2, pp. 213– 220, Apr. 2011.
[4] W. Huiyong, W. Jingyang, and H. Min, “Building a smart home system with WSN
and service robot,” in Proc. 5th Int. Conf. Measuring Technol. Mechatronics Autom.,
Hong Kong, China, 2013, pp. 353–356.
[5] N. K Suryadevara and S. C. Mukhopadhyay, “Wireless sensor network based
home monitoring system for wellness determination of elderly,” IEEE Sensors J., vol.
12, no. 6, pp. 1965–1972, Jun. 2012. D. Man Han and J. Hyun Lim, “Smart home
energy management system using IEEE 802.15.4 and zigbee,” IEEE Trans. Consumer
Electron., vol. 56, no. 3, pp. 1403–1410, Aug. 2010.
[6] V. N. Kamat, “Enabling an electrical revolution using smart apparent energy
meters & tariffs,” in Proc. Annu. IEEE India Conf., 2011, pp. 1–4.
[7] F. Benzi, N. Anglani, E. Bassi, and L. Frosini, “Electricity smart meters
interfacing the households,” IEEE Trans. Ind. Electron., vol. 58, no. 10, pp. 4487–
4494, Oct. 2011.
[8] I. Kunold, M. Kuller, J. Bauer, and N. Karaoglan, “A system concept of an energy
information system in flats using wireless technologies and smart metering devices,”
in Proc. IEEE 6th Int. Conf. Intell. Data Acquisition Adv. Comput. Syst., 2011, pp.
812–816.
[9] P.Cheong, K.-F. Chang, Y.-H. Lai, S.-K. Ho, I.-K. Sou, and K.-W. Tam, “A
zigbee-based wireless sensor network node for ultraviolet detection of flame,” IEEE
Trans. Ind. Electron., vol. 58, no. 11, pp. 5271–5277, Nov. 2011.
[10] J. Misic and V. B. Misic, “Bridge performance in a multitier wireless network for
healthcare monitoring,” IEEE Wireless Commun., vol. 17, no. 1, pp. 90–95, Feb.
2010.

B.Tech[ECE] KITS,MARKAPUR Page 67


The International journal of analytical and experimental modal analysis ISSN NO:0886-9367

WSN-Based Smart Sensors and Actuator for Power Management in Intelligent Buildings
1
Kanamarlapudi Jasmitha, 2 Gadhamsetty Charishma ,3 Kota Harshitha, 4 Kota Mohana Kalyani,5 Rajarapu Divya
2
ATHUKURI PRASAD,
1
B. Tech Student, Department of Electronics and Communication Engineering, Krishna Chaitanya Institute Of Technology & Sciences, Markapur

2
Associate Professor, Department of Electronics and Communication Engineering, Krishna Chaitanya Institute Of Technology & Sciences, Markapur

Abstract: The design and development of a smart Japan to create smart homes that improve energy
monitoring and controlling system for household electrical management and efficiency [7].
appliances in real time has been reported in this paper. The
It is expected that 65 million households will equip
system principally monitors electrical parameters of
with smart meters by 2015 in the United States, and it is a
household appliances such as voltage and current and
realistic estimate of the size of the home energy
subsequently calculates the power consumed. The novelty of
management market [8]. There are several proposals to
this system is the implementation of the controlling
interconnect various domestic appliances by wireless
mechanism of appliances in different ways. The developed
networks to monitor and control such as provided in [9],
system is a low-cost and flexible in operation and thus can
[10]. But the prototypes are verified using test bed
save electricity expense of the consumers. The prototype has
scenarios. Also, smart meter systems like [10]–[12] have
been extensively tested in real-life situations and
been designed to specific usages particularly related to
experimental results are very encouraging.
geographical usages and are limited to specific places.
Different information and communication technologies
Keywords: Energy Management, Home Automation,
integrating with smart meter devices have been proposed
Intelligent Control System, Wireless Sensor Network.
and tested at different flats in a residential area for
optimal power utilization, but individual controlling of
I. INTRODUCTION the devices are limited to specific houses. There has been
It is foreseen that service and personal care wireless design and developments of smart meters predicting the
mechatronic systems will become more and more usage of power consumption [10]. However, a low-cost,
ubiquitous at home in the near future and will be very flexible, and robust system to continuously monitor and
useful in assistive healthcare particularly for the elderly control based on consumer requirements is at the early
and disabled people [2]. Wireless mechatronic systems stages of development.
consist of numerous spatially distributed sensors with
limited data collection and processing capability to The paper focuses on human-friendly technical solutions
monitor the environmental situation. Wireless sensor for monitoring and easy control of household appliances.
networks (WSNs) have become increasingly important The inhabitant’s comfort will be increased and better
because of their ability to monitor and manage situational assistance can be provided. This paper emphasizes the
information for various intelligent services. Due to those realization of monitoring and controlling of electrical
advantages, WSNs has been applied in many fields, such appliances in many ways. The developed system has the
as the military, industry, environmental monitoring, and following distinct features.
healthcare [3]–[5]. The WSNs are increasingly being 1. Use of Traic with opt isolated driver for controlling
used in the home for energy controlling services. Regular electrical appliances: Household appliances are
household appliances are monitored and controlled by controlled
WSNs installed in the home [6]. New technologies
include cutting-edge advancements in information either remotely or automatically with the help of fabricated
technology, sensors, metering, transmission, distribution, smart sensing unit consisting of triac – BT138.
and electricity storage technology, as well as providing
new information and flexibility to both consumers and 2. No microprocessor/microcontroller: The design of
providers of electricity. The Zig-Bee Alliance, wireless
communication platform is presently examining Japan’s
new smart home wireless system implication by having a
new initiative with Japan’s Government that will evaluate
use of the forthcoming Zig-Bee, Internet Protocol (IP)
specification, and the IEEE 802.15.4g standard to help

Volume XIII, Issue IV, April/ 2021 Page No: 2313


The International journal of analytical and experimental modal analysis ISSN NO:0886-9367

smart sensing unit does not require a processing unit utilizing either analog or digital dimming. Analog
dimming utilizes a control voltage ranging between 0-

3. at the sensing end Flexibility in controlling the


appliances: Depending on the user requirements, 10V to signal the percentage of dimming required. Due to
appliances can be monitored and controlled in different its low cost and simplicity, analog dimming is the most
ways discusses about the various options of controlling widely deployed dimming scheme. Digital dimming
the devices. offers greater control granularity, as well as the ability to

The rest of this paper is organized as follows: Section II individually address and net-work ballasts, and is
Lighting Control System Overview; Section III System therefore gaining more acceptances.
Setup and Problem Statement; Section IV presents the 2. Sensors
experimental results and Section V has concluded and Sensors serving as the eyes and ears of the intelligent
discussed about the future work. lighting control system allow the system to detect and
respond to events in its environment. The most
II. LIGHTING CONTROL SYSTEM OVERVIEW commonly used sensors are occupancy and photo sensors,
Lighting control systems provide workspace illumination, although some systems incorporate the use of smart tags
ambience and security, shown in Fig1. They directly to detect and track occupants. These smart tag based
influence workplace productivity and occupant safety, but schemes are yet to gain wide-spread acceptance due to
are often one of the largest consumers of electricity in a privacy concerns. Occupancy sensors are used in
building. These systems utilize fluorescent, incandescent detecting room occupancy. They are utilized in locations
and Light Emitting Diode (LED) lamps, but we will focus with irregular or unpredictable usage patterns such as
only on fluorescent lamp based systems. conference rooms, toilets, hallways or storage areas. The
primary technologies used in occupancy sensors are
ultrasonic and Passive Infra-red (PIR) sensors. Newer
sensors incorporate both technologies to pro-vide
improved detection, at the expense of increased cost.
Photo sensors detect the amount of ambient light, which
can be used to determine the amount of artificial lighting
required to maintain total ambient lighting at a defined
value. Therefore, photo sensors are an integral component
of daylight harvesting systems.
3. Lighting Controls
These are the various mechanisms used for lamp
actuation. They can be simple devices such as basic
on/off wall switches, time clock switches for scheduled
lighting actuation, or dimmer switches. More complex
lighting controls include lighting automation panels and
Fig.1. An Intelligent Lighting Control System. Building Automation Systems.

A. Lighting Control System Components B. Lighting Tasks


Lighting control systems consist of luminaries, sensors A variety of control strategies are available for lighting
and controls. control, depending on the function of the room or
location in question. The simplest and most basic form of
1. Ballasts/Luminaries lighting control is on/off control, which is often achieved
Luminaries are complete lighting fixtures comprising of a by means of a wall switch. It can be combined with
lamp, ballast, reflectors and an enclosure for all the scheduling, occupancy detection or demand response to
lighting unit components. Ballasts are used to provide the achieve greater energy savings. Another basic control is
starting voltages required for lamp ignition and to dimming, where the level of lamp luminance is altered to
regulate the current flow within the lamp in order to compensate for user preferences, achieve energy savings,
guarantee optimal operation. They can be either magnetic or in response to demand response signals from the
or electronic (solid state) types, with newer installations utility. More complex controls are discussed below.
tending towards electronic bal-lasts due to their superior 1. Scheduling
performance in terms of noise and flicker. Newer ballasts This is the most prevalent control scheme after on/off
also enable fluorescent fixture dimming between 1-100%, control. Lights are turned on/off according to a

Volume XIII, Issue IV, April/ 2021 Page No: 2314


The International journal of analytical and experimental modal analysis ISSN NO:0886-9367

predetermined schedule, and this control method is most The amount of light output is adjusted to suit the task
appropriate in buildings and areas such as shops or large being performed or the current function of the workspace.
offices, which have predictable usage patterns.
This allows occupants to personalize their workspace
2. Daylight Harvesting lighting in accordance with their current work task or
Also known as day lighting, this technique involves optimal comfort level. It is also used for aesthetic purposes
harnessing available daylight to minimize the amount of such as the adjustment of lighting in order to accentuate
artificial lighting generated. Photo sensors are utilized to items on display, or to create additional ambience in lobby
detect ambient light levels and dimmers are used to dim areas. Task tuning prevents energy waste from over
fixtures to maintain defined lighting levels. lighting and can be achieved via on/off control or dimming.
3. Demand Response
III. SYSTEM SETUP AND PROBLEM STATEMENT
Demand Response is the ability to respond to signals A. Intelligent Agents
from the power utility company to reduce power us-age An agent is an independent hardware/software co-
due to high system loads. This is primarily achieved by operation unit with the following characteristics: goal-
oriented, adaptive, mobile, social and self-reconfigurable.
Each agent is capable of understanding its situation and
adapts to changing environments through self-
configuration, as shown in Fig. 2a.

Fig.2. Illustration of (a) agent architecture; (b)


situation perception from event sequences.

The situation perception is achieved through learning


and contextual modeling of event data, as shown in Fig.
2b. After a set of contextual bases are learned from the
high- dimensional event data, different scenarios can be
represented by the clustered contextual coefficients. The
agents are then able to percept the situation and localize
regions of interest (RoIs) through identified scenarios.
Each agent has a behavior state machine and a behavior
dimming or switching off non-essential loads. Demand library; it chooses a certain behavior according to
responsive dimming is usually un-noticeable to building individual goals and other agents’ behaviors.
occupants due to the limited sensitivity of the eye to minor
variations in lighting intensity.

C. Task Tuning
B. Multi-Agent Interactions and Collaborations
Multi-agent-based smart house technology aims at
providing environmental control, security, and
entertainment and healthcare services for users with high
energy efficiency. The system consists of four major types
of agents: sensing, action, decision and database as shown
in Fig.3. Such a multi-agent architecture will enable timer and resource management. There is a library for
efficient, distributed information collection and communication protocols, collaboration mechanisms and
processing, as well as system adaptation. Each agent has a resource management schemes. Given a regulation policy and
set of beliefs, desires and intentions. All agents share the user’s goal, a communication protocol, a collaboration
beliefs through inter-agent communication. Given a set of scheme and a resource management policy will be selected
beliefs, each agent can plan its short-time behavior, from the library.
according to its understanding of the situation and recent Fig.3. Illustration of multi-agent collaboration.
events, to achieve the desired goal. The multi-agent
platform provides an agent execution engine, as well as B. User Interface and Event Dispatching
other related services, such as communication, naming,

Volume XIII, Issue IV, April/ 2021 Page No: 2315


The International journal of analytical and experimental modal analysis ISSN NO:0886-9367

The user interface has two functions: (1) convert


user’s goal and environment and human context into a EXPERIMENTAL RESULTS
set of beliefs, desires and intentions for each agent; The prototype is in operation in a trial home with various
and (2) select a communication protocol, a electrical appliances regularly used by an inhabitant. The
collaboration mechanism and a resource management
scheme based on the regulation policy provided by the
user. For example, goal: house security; constraints:
one month with an operation of 100 mW power
consumption; tasks: measuring the gait biometrics of
subjects inside the house. These inputs will be
converted into selections of sensor modalities,
algorithms/protocols, context/behavior templates and
a resource management policy. There are two types of
events: (1) external and (2) internal. External events
represent different states of the environment and
human subjects’ behavior. Internal events represent
different states of agents’ behavior. These events will
be dispatched to operating agents, and in each agent,
events will trigger behaviors under certain situations.
following appliances were tested: room heaters, microwave,
D. Problem Statement
oven, toasters, water kettle, fridge, television, audio device,
The goal of this study is to develop a MAS
battery chargers, and water pump. In total, ten different
framework with a set of design tools for smart house
and home automation applications, which can:
1. Design and control individual agent behaviors based
on a belief, desire and intention model;
1. Design and control multi-agent group behaviors
based onaregulationpolicy;and Evaluate system
performance and optimize design parameters
based on a set of metrics.

The system diagram is illustrated in Fig.4. It can be


seen that the operation of the whole system relies on the
interaction and collaboration among various agents:
sensing, action, decision and database. The individual
and group behaviors of these agents are formulated by
agent models and regulation policies. The design of agent
models and regulation policies should be a strict
procedure instead of an ad hoc one. Therefore, it is an
important issue to develop a set of mathematical models electrical appliances were used in the experimental setup;
that can describe the individual and group behaviors of however, any electrical appliance.
agents. Based on these mathematical models, the
collaboration performance of agents can be analyzed, and
design parameters for the whole system can be
optimized.

Fig.4.The proposed multi-agent system


(MAS) architecture for smart house
technology.

Volume XIII, Issue IV, April/ 2021 Page No: 2316


The International journal of analytical and experimental modal analysis ISSN NO:0886-9367

Fig.5. Smart power monitoring and control system at


the residence.
whose power consumption is less than 2000Wcan be used in
developed system. The sampling rate for the fabricated
sensing modules was setup with 50 Hz, so that electrical
appliance usages within (less than 10 s) interval of time will
be recorded correctly. By monitoring consumption of power
of the appliances, data are collected by a smart coordinator,
which saves all data in the system for processing as well as
for future use. The parameters will be entered in the data
coordinator in software from appliances include voltage,
current, and power. These parameters will be stored in a
database and analyzed. Collected data will be displayed on
the computer through graphic user interface (GUI) window
so that appropriate action can be taken from the GUI. Fig. 5
shows the smart power monitoring and control system at a
house where the system is on trial.

Fig.6. Graphical user interface of smart power


monitoring and control system at the local residence

The processed voltage, current, and power values are


displayed on the graphical user interface running on a
computer. The processed data are accurate and user
friendly. The sensing system in the sensor node measures
the parameters (voltage and current). The raw data (i.e.,
converted ADC values) are transmitted to the coordinator.
The computer then collects the data from the coordinator
and processes them. The computer then applies the
necessary formulas to get the actual voltage, current, and
power consumption of the electrical appliances. The voltage
and current readings are processed using C sharp
programming. Fig.6 shows the front end of the smart
software system at the local residence. The developed
system has software recovery strategies such as exception-
handling, auto restart, and alert text mechanism for sensors 1-CONCLUSION
failure. The exception handling procedure can handle errors A smart power monitoring and control system has been designed
such as no sensor data reception and high range values of and developed toward the implementation of an intelligent
analog-to-digital-converted values and computational errors building. The developed system effectively monitors and
resulted during the normalization of voltage and current controls the electrical appliance usages at an elderly home. Thus,
sense data values. Depending on the inhabitant usages, the real-time monitoring of the electrical appliances can be
appliances connected by smart sensing units are controlled viewed through a website. The system can be extended for
monitoring the whole intelligent building. We aim to determine
either by automation based on the tariff conditions or by the areas of daily peak hours of electricity usage levels and come
the inhabitant locally using GUI and remotely using the with a solution by which we can lower the consumption and
website. enhance better utilization of already limited resources during
peak hours. The sensor networks are programmed with various
WSN-Based Smart Sensors and Actuator for Power user interfaces suitable for users of varying ability and for expert
Management in Intelligent Buildings users such that the system can be maintained easily and
interacted with very simply. This study also aims to assess
consumer’s response toward perceptions of smart grid
technologies, their advantages and disadvantages, possible
concerns, and overall perceived utility. The developed system is
robust and flexible in operation. For the last three months, the
system was able to perform

Volume XIII, Issue IV, April/ 2021 Page No: 2317


The International journal of analytical and experimental modal analysis ISSN NO:0886-9367

the remote monitoring and control of


[4] P. Cheong, K.-F. Chang, Y.-H. Lai, S.-K. Ho, I.-K. Sou,
and K.-W. Tam, “A Zig-bee-based wireless sensor network
node for ultraviolet detection of flame,” IEEE Trans. Ind.
Fig.7. (a) Website (www.iots2is.org) displaying the
Electron., vol. 58, no. 11, pp. 5271–5277, Nov. 2011.
real- time information (power consumption of
[5] J. Misic and V. B. Misic, “Bridge performance in a
appliances fridge and laptop). (b) Website
multitier wireless network for healthcare monitoring,” IEEE
(www.iots2is.org) displaying real-time information
Wireless Commun., vol. 17, no. 1, pp. 90–95, Feb. 2010.
(power consumption of microwave appliance) and
last 24 h usage pattern.
[6] M. Erol-Kantarci and H. T. Mouftah, “Wireless sensor
networks for cost efficient residential energy management in
the smart grid,” IEEE Trans. Smart Grid, vol. 2, no. 2, pp. 314–
325, Jun. 2011.
[7] Zig-Bee alliance examining Japan’s new smart home
recommendations (accessed on 8 Aug., 2012). [Online].
Available: http://www.smartmeters. Com/the-news/3449-
zigbee-alliance.
[8] The costs and benefits of smart meters for residential
customers (accessed on 4Apr. 2012). [Online].Available:
http://www.edisonfoundation.net/iee/Documents/IEE_Bene
fitsofSmartMeters_Final.pdf.
[9] L. Li, H. Xiaoguang, H. Jian, and H. Ketai, “Design of new
[10] architecture of AMR system in Smart Grid,” in Proc.
6th IEEE Conf. Ind. Electron. Appl., 2011, pp. 2025–2029.
[11] E. Andrey and J. Morelli, “Design of a smart meter
techno-economic model for electric utilities in Ontario,” in
Fig.8. Secured webpage for controlling appliances Proc. IEEE- Electric Power Energy Conf., 2010, pp. 1–7.
remotely after successful authorized login [12] D. Man Han and J. Hyun Lim, “Smart home energy
management system using IEEE 802.15.4 and Zig-bee,” IEEE
The tariff conditions refer to the situation wherein Trans. Consumer Electron., vol. 56, no. 3, pp. 1403– 1410,
unimportant electrical appliances will be automatically Aug. 2010.
switched off by the system during high price of the [13] V. N. Kamat, “Enabling an electrical revolution using
electricity. Fig. 7(a) shows the real-time usage pattern smart apparent energy meters & tariffs,” in Proc. Annu. IEEE
of a effectively. Local and remote user interfaces are IndiaConf.,2011,pp.1–
easy to handle by a novice consumer and are efficient
in handling the operations. In future, the system will be
integrated with co- systems like smart home inhabitant
behavior recognitions systems to determine the
wellness of the inhabitant in terms of energy
consumption.
I. REFERENCES
[1] Nagender Kumar Suryadevara, Student Member,
IEEE, Subhas Chandra Mukhopadhyay, Fellow, IEEE,
Sean Dieter Tebje Kelly and Satinder Pal Singh Gill,
“WSN-Based Smart Sensors and Actuator for Power
Management in Intelligent Buildings”, IEEE/ASME
Transactions on Mechatronics.
[2] X. P. Liu, W. Gueaieb, S. C. Mukhopadhyay, W.
Warwick, and Z. Yin, “Guest editorial introduction to
the focused section on wireless mechatronics,” IEEE
/ASME Trans. Mechatronics, vol. 17, no. 3, pp. 397–
403, Jun. 2012.
[3] D. S. Ghataoura, J. E. Mitchell, and G. E.Matich,
“Networking and application interface technology for
wireless sensor network surveillance and monitoring,”
IEEE Commun. Mag., vol. 49, no. 10, pp. 90–97, Oct.
2011.

Volume XIII, Issue IV, April/ 2021 Page No: 2318

You might also like