Sei sulla pagina 1di 88

AN INVESTIGATION ON ENERGY EFFICIENT WIRELESS SENSOR NETWORK

FOR HOME AND OFFICE AUTOMATION

A PROJECT REPORT

Submitted

In the partial fulfillment of the requirements


For the award of the Degree of
MASTER OF TECHNOLOGY

In
VLSI AND EMBEDDED SYSTEM DESIGN

by

CH.SAI KUMAR

Regd. No: 17HT1D6801

Under the Esteemed Guidance of

J.SRAVANTHI , M. Tech.

Assistant
Professor,
Department of
ECE

CHALAPATHI INSTITUTE OF TECHNOLOGY


(Approved by A.I.C.T.E & Affiliated to JNTU, Kakinada)
A.R Nagar, Mothadaka, Guntur District-522016 (2016-2018)
CHALAPATHI INSTITUTE OF TECHNOLOGY
(Approved by A.I.C.T.E & Affiliated to JNTU, Kakinada)
A.R Nagar, Mothadaka, Guntur District-522016

DEPARTMENT OF ELECTRONICS OF AND COMMUNICATIONS ENGINEERING

This is to certify that the Project Work entitled “AN INVESTIGATION ON ENERGY
EFFICIENT WIRELESS SENSOR NETWORK FOR HOME AND OFFICE AUTOMATION “ is a
bonafide work done by J.SRAVANTHI (Regd.No: 17HT1D6801) in partial fulfillment of the
curriculum of Master of Technology in Electronics and Communication during the academic year
2017– 2019.

INTERNAL SUPERVISER HEAD OF THE DEPARTMENT

MRS. J.SRAVANTHI MR.D.NAGA RAVIKIRAN(ph.D),


M.Tech, ASSISTANT PROFESSOR ASSOCIATE PROFESSOR
ECE DEPARTMENT ECE DEPARTMENT

EXTERNAL EXAMINER
ACKNOWLEDGEMENT

I wish to express my sense of gratitude to J.SRAVANTHI , M.Tech, Asst.Professor, of


Department of Electronics & Communication Engineering for her Valuable Guidance,
Wholehearted Co-operation and Unfailing Inspiration. Throughout the Project Work, her useful
suggestions and constant encouragement has given a right direction and sharp to learning. Really,
I am indebted to her for his Excellent and Enlightened Guidance.

I express my deepest gratitude to Mr. D.NAGA RAVI KIRAN, M.Tech, (Ph.D), H.O.D of
ECE Department, Chalapathi Institute of Technology for his advice to the successful completion of this
project.

I also consider it as my privilege to express my gratitude in saying thanks to Dr. C. RAVI


KANT, PRINCIPAL and COLLEGE MANAGEMENT providing me this opportunity to
complete the project Work.

With great solemnity and sincerity, I offer my profuse thanks to


Y.V. ANJANEYULU, SECRETARY & CORRESPONDENT, for providing all the resources
that greatly helped the Project Work to get successfully completed.

I sincerely thank all the staff members in the Department of Electronics And Communication
for their sustained help in this pursuit. I also thank all those who contributed directly or indirectly
in successfully carrying out this work.

CH. SAI KUMAR

(Regd. No:) 17HT1D6801


DECLARATION

I hereby declare that the Project report entitled


“AN INVESTIGATION ON ENERGY EFFICIENT WIRELESS SENSOR
NETWORK FOR HOME AND OFFICE AUTOMATION” is entirely original and

has been carried out in the presence J.SRAVANTHI , M.Tech, Asst. Professor,
Department of ECE. This report is being submitted in partial fulfillment for the
award of the Degree of Master of Technology in Department of
Electronics&Communication Engineering from Jawaharlal Nehru Technological
University, Kakinada

I hereby state that this report is not submitted in any other


College / University or published at any time before.

CH. SAI KUMAR


(Regd. No): 17HT1D6801
Abstract
Smart homes/offices based on Wireless Sensor Networks (WSNs) can
provide an assisted living and working environment to the users. In these applications, the
distributed network nodes are made up of low-power low-cost high-energy-efficient electronic
platforms equipped with sensors, microcontroller, radio and antenna, able to periodically sense,
receive, store, pre-process and transmit ambient data to a remote host station. Conventional
nodes are usually supplied by batteries, resulting in a significant limitation to the life time and to
the maximum number of deployable devices. To meet the demand of next Internet of Things (IoT)
applications, requiring a vast plurality of interconnected wireless network nodes, this paper
presents the design and implementation of a WSN platform whose nodes are energetically
autonomous thanks to an embedded photovoltaic (PV) panel associated to a rechargeable
battery and a power-efficient design with optimized power-management strategy. The
implemented node is able to harvest indoor ambient light starting from 100 lux and, according to
the available energy, adaptively sets the sensors acquisition and RF transmission rate.
Moreover, it provides long-distance data transmission with air data rate from 1 to 500 kbps. The
WSN node device is implemented on an 8.6 x 5.4-cm2 flexible PCB, being therefore amenable to
conform even to curved surfaces. Comparison with commercial IoT nodes reveals a significant
improvement in the state of the art.
INDEX
CONTENTS PAGE
NUMBER

CHAPTER 1

INTRODUCTION 1-10
1.1 Introduction 1
1.2 Block Diagram 2
1.3 Operation 3
1.4 Flow Chart 4
1.5 Existing System 5
1.6 Proposed Model 6-10

CHAPTER 2
LITERETURE REVIEW 11-14
2.1 Introduction 11
2.1.1 Embedded System 12
2.2 History 13
2.3 Embedded System Special Features 14
2.4 Categories Of Embedded System 14
CHAPTER 1
INTRODUCTION
1. INTRODUCTION :
Home/Office automation consists in the exploitation of micro/nanoelectronic
technology within the home/office environment to assist and enhance the quality of life/work of
its occupants through the main goals of increasing comfort, saving energy and providing remote
surveillance and real time monitoring [1]-[3]. Wireless Sensor Network (WSN) platforms are
exploited to implement this paradigm [4]-[6]. At this purpose, each WSN physical node is
equipped with multi-sensor devices for heterogeneous ambient sensing and is also able to store,
pre-process, transmit and receive data to a host controller. More generally, intelligent wireless
interconnected sensing devices are expected to pervade all the emerging applications in the
Internet of Things (IoT) area [7]-[10]. In this context, key performances of the WSN nodes are
reduced power consumption and maximum throughput at a maximum communication distance
[9]. Additional specifications that must be considered are cost, size and ease of configuration and
installation [7]-[8]. Presently, to prolong the battery life up to months or even years, WSN nodes
are implemented through energy-efficient communication schemes combined with low-power
design [7], [11]-[12]. To this end, Wi-Fi, ZigBee, and Bluetooth are popular wireless protocols
which use a license-free ISM (Industrial, Scientific and Medical) frequency band. ZigBee, in
particular, offers the best trade-off between cost and communication distance, as proven by the
several related papers in the literature [12]-[16]. Combination of Wi-Fi and Zigbee are also
proposed for power saving [17], [18]. Another solution embeds several radio modules to reduce
energy consumption and latency for neighbor discovery and opportunistic networking [19], but
at the expense of increasing both the size and cost of devices. Nevertheless, the use of Wi-Fi,
Bluetooth and Zigbee as a low power radio is still too costly for WSN applications. Bluetooth
Low Energy (BLE) protocol reduces power consumption and provides connection to smart
phones with easy setup but has limited operating range and is subject to royalties, which makes
BLE unsuitable for WSN ubiquitous low-cost devices.A last, profitable, approach is offered by
Sub-1GHz wireless connectivity schemes providing long distance communication (tens of
kilometers, thanks to the lower frequencies exploited) in a less crowded spectrum than ISM band
(769 MHz - 935 MHz), while requiring lower power Consumption [20]. The main disadvantage
can be related to the dimension of the antenna and the need of an additional transceiver in the
concentrator node. It should be also observed that most researches in the field are just proposals,
and very few are complete implementations [10]. To take both the research and implementation a
step further, this paper presents a novel design of a WSN platform amenable to home/office
automation and, more generally, to IoT applications thanks to its reduced dimension and its
energy autonomy. The WSN nodes are able to make available information from several sensor
devices (temperature, humidity, presence, etc.) to the user or to a centralized control host.

Fig. 1. WSN node functional block diagram


.
Low-power operation and energy efficiency are obtained Through careful hardware and software
co-design. To this end, the microcontroller, which manages the whole ystem, does not execute a
rigid control algorithm but adaptively changes tasks and their timings by taking into account the
energy available to the node and the power consumption of each task. Long distance
communication is enabled through the use of a specific radio module allowing more flexibility in
frequency, modulation schemes and protocols. In particular, comparing the implemented
platform with existing similar solutions, the main significant advantages are summarized below:
1) the node is energetically autonomous;
2) highly configurable RF connectivity;
3) the node is implemented on a flexible and compact PCB;
4) a Graphical User Interface (GUI) is developed and provided to the final user.
The first feature is obtained through indoor energy harvesting from an embedded photovoltaic
(PV) panel associated to a rechargeable battery and through through innovative energy-aware
power managing policy. Consequently, periodic human maintenance required by devices
powered by a primary battery is avoided. As far as the connectivity is concerned, the proposed
platform exhibits a high level of flexibility, providing different transmission bands, protocols,
and data rates to the designer. In such a way the system can meet the specified energy constraints
and cost budget allowing the designer to develop proprietary RF point-to-point and mesh
protocols. In particular, the system supports the realization of mesh networks through IPv6 over
Low-Power Wireless Personal Area Networks (6LoWPAN) protocol in which every node has its
own IPv6 address, allowing direct connection to the Internet by using open standards.
The use of point-to-point or mesh network architecture depends upon the specific application.
Indeed, if the area to be monitored is very large, a mesh architecture would guarantee a better
coverage using a single gateway. The proposed platform fits also this scenario by supporting
different protocols. Moreover, every node can easily act as an IoT gateway if connected to a
processing host that collects and store the data coming from the sensor nodes. The flexible PCB
embeds a flexible PV panel and printed integrated antenna. Thin film batteries and low-profile
components are also employed to achieve both compact dimensions (compatible with the size of
a credit card: 8.6 x 5.4 cm2) and ability to conform non-flat surfaces.
Finally, the GUI provides an easy configuration tool and allows the user to interact with the
system.
The paper is organized as follows. Section II describes the WSN node architecture, energy
management strategy and first component selection based on the energy budget specifications
(discussed in the Appendix). Example of application and further implementation highlights are
presented in Section III, whereas experimental results are shown in Section IV. Finally, a
comprehensive performance comparison with other implemented platforms for distributed
sensing is reported in Section V. Concluding remarks are summarized in Section VI.

II. ARCHITECTURE AND ENERGY MANAGEMENT


STRATEGY OF THE WSN NODE :
Since the WSN node must be able to periodically sense, receive, store, pre-
process and transmit ambient data to a remote host station, its overall architecture can be divided
into the three main functional subsystems, namely: energy, sensor and control, and
communication, as shown in Fig. 1. The energy subsystem includes components and circuits that
supersede harvesting, storage and energy management. Sensors aimed to environmental
monitoring are part of the sensor and control subsystem. Of course, the type and number of
sensors is dictated by the specific application. The microcontroller manages the sensors and
oversees the overall system operation. Data from sensors are cyclically sampled and sent to an
external base station through the communication subsystem. Starting from these general
assumptions and considerations, the proposed platform has been designed as illustrated in Fig. 2
and as summarized in Table I, where the main specifications and functions of the different
subsystems are briefly reported. Each subsystem is described in detail below.

The energy subsystem includes as main elements the PV panel, a rechargeable thin film battery,
as well as some blocks constituting the Power Management Unit (PMU) for optimized use of the
available harvested energy.
WSN platform characteristics

III. PROTOTYPING :
Two subsequent prototypes were designed and fabricated in order to validate
the proposed platform and the energy management strategies. The first prototype is shown in Fig.
5 and was originally conceived to allow easy monitoring and testing as well as easy comparison
of different solutions and components in terms of performance and power consumptions. It
sequences tested to verify that an optimum trade-off between functionalities and energy
constraints was met. The input scattering parameter, |S11|, of the slot antenna has been measured
and, although the resonance is at a higher frequency than that predicted by simulations, the
antenna is well matched at 868 MHz, as it is apparent from Fig.10. The folded dipole antenna
exhibits similar gain and radiation power pattern. However, it was not characterized standalone
but, directly in the system. The overall system was then evaluated. With reference to the flow
chart shown in Fig. 8, two main sequences were considered: the former includes the system
awakening, initialization, after-awakening controls, and a complete cycle of sensor data
acquisition (sequence A); the latter includes, in addition to the previous phases, also the final
power-hungry phase of data transmission to the concentrator node (sequence B). As previously
stated, the transmission phase requires a relatively long period to charge the supercapacitor with
the energy required for two transmissions (the first one, optional, for synchronization purposes
and the other, mandatory, for data transmission). The use of the supercapacitor allows sustaining
the current absorption peaks required by the RF communication without relying on the battery.
Fig. 11 shows the measured current consumption during the two aforementioned operating
sequences. Sequence A, as illustrated in Fig. 11a, starts at 1.6 s and ends at 4.4 s. Its average
current consumption is 662 A, with an average charge consumption of 0.52 A/h. Assuming
an average operating battery level of 3.9 V, the average power consumption is 2.58 mW.
Sequence B, as illustrated in Fig. 11b, starts approximately at 2 s. After initial sensor data
acquisition, the supercapacitor

Fig. 4. Measured slot antenna scattering parameter


Fig. 12. Ambient parameters acquired over 4 days:
a) temperature, b) pressure, c) humidity, d) ambient light.

V. COMPARISON WITH RESULTS :


The main features of the proposed platform were compared to those of
other solutions designed for distributed sensing. The evaluation is carried out by considering [8]
and [35], where an extensive survey of the state of the art of IoT nodes is performed. In order to
make a fair comparison, we considered a number of 58 IoT commercial devices that are
implemented on PCB, out of 142 included in [8] and [35] at the date of writing. First of all, it is
worth noting that the proposed sensor node is the only one exploiting energy harvesting based on
PV cells. It also follows from the comparison that the maximum size (along three dimensions) of
the proposed device (86 mm) is slightly higher than the average value, equal to 62 mm, of the
considered 58 devices. Nonetheless, it is worth noting that the overall volume of the proposed
node, equal to 13 932 mm3, is much lower (about an order of magnitude) than the average value,
equal to 130 360 mm3 [35]. This is mainly due to the low thickness of the overall assembled
system in Fig. 6, which is equal to 3 mm only. Fig. 13a shows the distribution of the sensitivity
of RF receivers of the IoT devices (in this case, all the 142 devices in [35] are considered). It is
apparent that the transceiver adopted in this work exhibits the best performance, which is 21
dBm
Fig. 6. Performance comparison with
commercial devices on PCB reported in [35] a) RF receiver sensitivity; b) number of devices
embedding each type of sensor.

lower than the average value. In addition, the proposed node shows the highest value of the
maximum transmit power, equal to 16 dBm (the average value is 6 dBm). Finally, the proposed
system has the highest level of configurability in terms of RF carrier frequency, as detailed in
Section II.C, whereas most of the commercial products (nearly 60%) adopts Bluetooth, ZigBee
or WiFi protocols operating in the ISM 2.4-GHz band. Only Waspmote shows a similar level of
flexibility and, moreover, is the only other device equipped with NFC interface. Regarding
power consumption, the standby current of the proposed device, equal to 3 A, is only 30% of
the average value of 9.6 A [35]. Finally, Fig. 13b illustrates the number of devices embedding
different types of sensors. The histogram shows that the proposed solution embeds four of the
sensors, namely temperature, humidity, accelerometer, and pressure that are mostly present in all
devices. It is worth noting that other sensors can be easily added to the node by exploiting the
onboard I2C interface.
Aa a result, the comparison with the state of the art shows that the proposed platform has
remarkable advantages in terms of system configurability, dimensions and standby power that
allows to satisfy many potential different applications with better performance than other similar
commercial solutions.
VI. CONCLUSION :
An innovative WSN platform expressly conceived for ambient monitoring in
indoor environments, but which could be efficiently applied also in other IoT applications, has
been proposed, designed and experimentally tested.
It consists of a self-powered autonomous sensor node that exploits embedded PV panels to
harvest the energy, a microcontroller, a RF transceiver (plus antenna) and different sensors.
The main strength of the prototype is to achieve the desired (complex) functionality in a small
volume with very low power consumption while ensuring ambient monitoring even during night
hours. As an example of application, the proposed system was tailored for measuring ambient
light, temperature, humidity and pressure inside a typical office that alternates working hours
with artificial light and dark hours during night, week-ends or holydays.
The implemented node can harvest indoor ambient light starting from 100 lux and, according to
the available energy, adaptively sets the sensors acquisition and RF transmission rate. Moreover,
it provides relatively long-distance data transmission (tens of meters) with air data rate from 1 to
500 kbps. The WSN node device is implemented on a flexible PCB and occupies the same area
of a credit card.
A comprehensive comparison with other commercial IoT systems implemented on a PCB shows
that the proposed platform represents a sensible advance of the state of the art thanks to its very
high flexibility, low standby power consumption and small volume

VII.APPENDIX :
The energy storage devices of the WSN node and its worst-case power
consumption have been tailored by specifying acquisition and data transmission rates to reach
the energy balance, also on the basis of the system architecture described in Sec. II, of the
available energy source, and of the “office” case study selected in Sec. III.
Energy Source. Each PV module provides a maximum output power of about 46 μW under a
radiation of 300 lux. Since the PV panel is made up of 2 strings of 3 series-connected modules
(Fig. 3), the total power from the PV panel, Ppanel, is 276 μW. Moreover, SPV1050 has a power
conversion efficiency of 77% and an efficiency of 96% related to the Maximum Power Point
Tracker (MPPT) algorithm, thus the available output power is: Pavail = Ppanel 0.96 0.77 =
204 μW. Assuming a nominal battery voltage of 3.9 V, and 8 h of light per working day, the
WPN node can store a charge of: 204 μW 8 h / 3.9 V = 418.5 μAh.
Storage. The EFL700A39 rechargeable solid-state lithium thin-film battery has a capacity of 700
μAh. Its operating voltage ranges from 3.6 V to 4.2 V. It can also provide maximum a
continuous discharge current of 5 mA and a maximum pulsed discharge current of 10 mA.
Current consumption. Current consumption of each component has been evaluated in the three
different operating modes (sleep, run and peak) by taking into account the electrical
characteristics included in the datasheets and summarized in Table III. These data take into
account consumption of external RTC, ambient sensor, power management, microcontroller and
RF module.
CHAPTER 2
INTRODUCTION TO EMBEDDED SYSTEMS

2.1 INTRODUCTION:

The microprocessor-based system is built for controlling a function or range of


functions and is not designed to be programmed by the end user in the same way a PC is
defined as an embedded system. An embedded system is designed to perform one
particular task albeit with different choices and options.
Embedded systems contain processing cores that are either microcontrollers or
digital signal processors. Microcontrollers are generally known as "chip", which may
itself be packaged with other microcontrollers in a hybrid system of Application Specific
Integrated Circuit (ASIC). In general, input always comes from a detector or sensors in
more specific word and meanwhile the output goes to the activator which may start or
stop the operation of the machine or the operating system.
An embedded system is a combination of both hardware and software, each
embedded system is unique and the hardware is highly specialized in the application
domain. Hardware consists of processors, microcontroller, IR sensors etc. On the other
hand, Software is just like a brain of the whole embedded system as this consists of the
programming languages used which makes hardware work. As a result, embedded
systems programming can be a widely varying experience.
An embedded system is combination of computer hardware and software, either
fixed incapability or programmable, that is specifically designed for particular kind of
application device. Industrial machines, automobiles, medical equipment, vending
machines and toys (as well as the more obvious cellular phone and PDA) are among the
myriad possible hosts of an embedded system. Embedded systems that are programmable
are provided with a programming interface, and embedded systems programming id
specialized occupation.
Embedded Systems

Hardware Software

Microcon EX.Keil ,Arduino


trollers etc..
or
micropro
cessors

Figure 2.1 Block diagram of embedded system


Figure2.1 illustrate the Block diagram of Embedded System (ES consists of
hardware and software part which again consists of programming language and physical
peripherals respectively).
On the other hand, the microcontroller is a single silicon chip consisting of all
input, output and peripherals on it. A single microcontroller has the following features:

1. Arithmetic and logic unit


2. Memory for storing program
3. EEPROM for nonvolatile and special function registers
4. Input/output ports
5. Analog to digital converter
6. Circuits
7. Serial communication ports
2.2 APPLICATIONS OF EMBEDDED SYSTEM :
We are living in the embedded world. You are surrounded with many embedded
products and your daily life largely depends on the proper functioning’s of these
gadgets, television, radio, CD layer of your living room, washing machines or microwave
oven in your kitchen, card readers, access controllers ,palm devices of your work space
enable to do many of your tasks very effectively. Apart from all these, many controllers
embedded in your car take care of your car operation between the bumper and most of the
times tend to ignore all these controllers.
In recent days you are showered with variety of information about these
embedded controllers in many places. All kind of magazines and journals regularly dish
out details about latest technologies, new devices: fast applications which make you
believe that your basic survival is controlled by these embedded products. Now you can
agree to that fact these embedded products have successfully invaded into our world. you
must be wandering about these embedded controllers or systems.
The computer you use to compose your mails, or create a document or analyze the
database is known as standard desktop computer. These desktop computers are
manufactured to serve many purpose and applications.

2.2.1 MILITARY AND AEROSPACE SOFTWARE


APPLICATIONS

From in-orbit embedded system to jumbo jets to vital battlefield networks,


designer’s performance, scalability, and high-availability facilities consistently turn to the
Linux OS, RTOS and LinuxOS-178RTOs for software certification to DO-178B rich in
system resources and networking serviced, Linux OS provides an off-the-shelf software
platform with hard real-time response backed by powerful distributed computing
(COBRA), high reliability’s software certification, and long term support options.

2.2.2 COMMUNICATIONS APPLICATIONS :

Five-nine” availability, compact PCI hot swap support, and hard real-time
communications stacks, and fault-management facilities make Linux OS the ideal choice
for companies looking for single operating system for all embedded telecommunication
applications from complex central to single line/trunk cards.

2.2.3 ELECTRONICS APPLICATIONS AND CONSUMER


DEVICES:
As the number of powerful embedded processor in consumer devices continues to
rise, the blue cat Linux operating system provides a highly reliable and royalty-free
option for system designers. And as the wireless appliance revolution rolls on, web
enabled navigation systems, radios, personal communication devices, phones and PDAs
all benefit from the cost-effective dependability, proven stability and full product life
cycle support opportunities associated with blue cat embedded Linux. Blue cat has
teamed uo with industry leaders to make it easier to build Linux mobile phones with java
integration.

2.2.4 INDUSTRIAL AUTOMATION AND PROCESS CONTROL


SOFTWARE :

Designers of industrial and process control systems know from experience that
Linux works operating system provide the security and reliability that their industrial
applications require. From ISO 9001 certification to fault-tolerance, secure portioning
and high availability, we’ve got it all. The advantage of our 20 years of experience with
the embedded system. Now a day’s embedded system widely using in the industrial areas
to reduce to tike perform the particular task .This replacing the less work and also more
efficient gives the accurate result.
CHAPTER- 4
MEMORY ORGANISATION &TIMERS IN MICRO CONTROLLER
Types of memory:
The 89C51 have three general types of memory. They are on-chip memory, external Code
memory and external Ram. On-Chip memory refers to physically existing memory on the micro
controller itself. External code memory is the code memory that resides off chip. This is often in
the form of an external EPROM. External RAM is the Ram that resides off chip. This often is in
the form of standard static RAM or flash RAM.

Code memory
Code memory is the memory that holds the actual 89C51 programs that is to be run. This
memory is limited to 64K. Code memory may be found on-chip or off-chip. It is possible to have
4K of code memory on-chip and 60K off chip memory simultaneously. If only off-chip memory
is available then there can be 64K of off chip ROM. This is controlled by pin provided as EA

Internal RAM
The 89C51 have a bank of 128 of internal RAM. The internal RAM is found on-chip. So it is the
fastest Ram available. And also it is most flexible in terms of reading and writing. Internal Ram
is volatile, so when 89C51 is reset, this memory is cleared. 128 bytes of internal memory are
subdivided. The first 32 bytes are divided into 4 register banks. Each bank contains 8 registers.
Internal RAM also contains 128 bits, which are addressed from 20h to 2Fh. These bits are bit
addressed i.e. each individual bit of a byte can be addressed by the user. They are numbered 00h
to 7Fh. The user may make use of these variables with commands such as SETB and CLR.
Memory types:
erased through the source. Intel Flash memory is an extremely reliable non volatile memory
architecture.
4.3 SPECIAL FUNCTION REGISTERS:
The Special Function Registers (SFR's) are located in upper 128 Bytes direct addressing area.
The SFR Memory Map in shows that.
Not all of the addresses are occupied. Unoccupied addresses are not implemented on the chip.
Read accesses to these addresses in general return random data, and write accesses have no
effect. User software should not write 1s to these unimplemented locations, since they may be
used in future microcontrollers to invoke new features. In that case, the reset or inactive values of
the new bits will always be 0, and their active values will be 1.
The functions of the SFR’s are outlined in the following sections.
Accumulator (ACC)
ACC is the Accumulator register. The mnemonics for Accumulator-specific instructions,
however, refer to the Accumulator simply as A.
B Register (B)
The B register is used during multiply and divide operations. For other instructions it can be
treated as another scratch pad register.
Program Status Word (PSW)
The PSW register contains program status information.
Stack Pointer (SP)
The Stack Pointer Register is eight bits wide. It is incremented before data is stored during
PUSH and CALL executions. While the stack may reside anywhere in on chip RAM, the Stack
Pointer is initialized to 07H after a reset. This causes the stack to begin at location 08H.
Data Pointer (DPTR)
The Data Pointer consists of a high byte (DPH) and a low byte (DPL). Its function is to hold a 16-bit
address. It may be manipulated as a 16-bit register or as two independent 8-bit registers
Serial Data Buffer (SBUF)
The Serial Data Buffer is actually two separate registers, a transmit buffer and a receive buffer
transmission. (Moving a byte to SBUF initiates the transmission.) When data is moved from
SBUF, it
Timer Registers
CHAPTER-5
HARDWARE DESIGN
Serial Communication:
The main requirements for serial communication are:
1. Microcontroller
2. PC
3. RS 232 cable
4. MAX 232 IC
5. HyperTerminal

When the pins P3.0 and P3.1 of microcontroller are set, UART which is inbuilt in
the microcontroller will be enabled to start the serial communication.

Timers:
The 8051 has two timers: Timer 0 and Timer 1. They can be used either as timers to
generate a time delay or as counters to count events happening outside the
microcontroller.

Both Timer 0 and Timer 1 are 16-bit wide. Since the 8051 has an 8-bit architecture,
each 16-bit timer is accessed as two separate registers of low byte and high byte.

Lower byte register of Timer 0 is TL0 and higher byte is TH0. Similarly lower byte
register of Timer1 is TL1 and higher byte register is TH1.

TMOD (timer mode) register:


Both timers 0 and 1 use the same register TMOD to set the various operation
modes.TMOD is an 8-bit register in which the lower 4 bits are set aside for Timer 0
and the upper 4 bits for Timer 1. In each case, the lower 2 bits are used to set the
timer mode and the upper 2 bits to specify the operation.
GATE
Every timer has a means of starting and stopping. Some timers do this by software,
some by hardware and some have both software and hardware controls. The timers
in the 8051 have both. The start and stop of the timer are controlled by the way of
software by the TR (timer start) bits TR0 and TR1. These instructions start and stop
the timers as long as GATE=0 in the TMOD register. The hardware way of starting
and stopping the timer by an external source is achieved by making GATE=1 in the
TMOD register.

C/T
Timer or counter selected. Cleared for timer operation and set for counter operation.

M1
Mode bit 1

M0
Mode bit 0

Mode Selection

M1 M0 Mode Operating Mode


00 0 13-bit timer mode
8-bit timer/counter THx with TLx as 5-bit prescaler
01 1 16-bit timer mode
16-bit timer/counters THx and TLx are cascaded
10 2 8-bit auto reload timer/counter
THx holds a value that is to be reloaded into TLx each time
it overflows
11 3 Split timer mode

The mode used here to generate a time delay is MODE 2.This mode 2 is an 8-bit
timer and therefore it allows only values of 00H to FFH to be loaded into the timer’s
register TH. After TH is loaded with the 8-bit value, the 8051 give a copy of it to
TL. When the timer starts, it starts to count up by incrementing the TL register. It
counts up until it reaches its limit of FFH. When it rolls over from FFH to 00H, it
sets high the TF (timer flag). If Timer 0 is used, TF0 goes high and if Timer 1 is
used, TF1 goes high. When the TL register rolls from FFH to 0 and TF is set to 1,
TL is reloaded automatically with the original value kept by the TH register.

Asynchronous and Synchronous Serial Communication


Computers transfer data in two ways: parallel and serial. In parallel data transfers,
often 8 or more lines are used to transfer data to a device that is only a few feet
away. Although a lot of data can be transferred in a short amount of time by using
many wires in parallel, the distance cannot be great. To transfer to a device located
many meters away, the serial method is best suitable.

In serial communication, the data is sent one bit at a time. The 8051 has serial
communication capability built into it, thereby making possible fast data transfer
using only a few wires.

The fact that serial communication uses a single data line instead of the 8-bit data
line instead of the 8-bit data line of parallel communication not only makes it
cheaper but also enables two computers located in two different cities to
communicate over the telephone.
Serial data communication uses two methods, asynchronous and synchronous. The
synchronous method transfers a block of data at a time, while the asynchronous
method transfers a single byte at a time. With synchronous communications, the two
devices initially synchronize themselves to each other, and then continually send
characters to stay in sync. Even when data is not really being sent, a constant flow of
bits allows each device to know where the other is at any given time. That is, each
character that is sent is either actual data or an idle character. Synchronous
communications allows faster data transfer rates than asynchronous methods,
because additional bits to mark the beginning and end of each data byte are not
required. The serial ports on IBM-style PCs are asynchronous devices and therefore
only support asynchronous serial communications.

Asynchronous means "no synchronization", and thus does not require sending and
receiving idle characters. However, the beginning and end of each byte of data must
be identified by start and stop bits. The start bit indicates when the data byte is about
to begin and the stop bit signals when it ends. The requirement to send these
additional two bits causes asynchronous communication to be slightly slower than
synchronous however it has the advantage that the processor does not have to deal
with the additional idle characters.

There are special IC chips made by many manufacturers for serial data
communications. These chips are commonly referred to as UART(universal
asynchronous receiver-transmitter) and USART(universal synchronous-
asynchronous receiver-transmitter). The 8051 has a built-in UART.

In the asynchronous method, the data such as ASCII characters are packed between
a start and a stop bit. The start bit is always one bit, but the stop bit can be one or
two bits. The start bit is always a 0 (low) and stop bit (s) is 1 (high). This is called
framing.

The rate of data transfer in serial data communication is stated as bps (bits per
second). Another widely used terminology for bps is baud rate. The data transfer
rate of a given computer system depends on communication ports incorporated into
that system. And in asynchronous serial data communication, this baud rate is
generally limited to 100,000bps. The baud rate is fixed to 9600bps in order to
interface with the microcontroller using a crystal of 11.0592 MHz.

RS232 CABLE:
To allow compatibility among data communication equipment, an interfacing
standard called RS232 is used. Since the standard was set long before the advent of
the TTL logic family, its input and output voltage levels are not TTL compatible.
For this reason, to connect any RS232 to a microcontroller system, voltage
converters such as MAX232 are used to convert the TTL logic levels to the RS232
voltage levels and vice versa.

MAX 232:

This IC provides best noise rejection and very reliable against discharges and short
circuitsMax232 IC is a specialized circuit which makes standard voltages as
required by RS232. MAX232 IC chips are commonly referred to as line drivers.

To ensure data transfer between PC and microcontroller, the baud rate and voltage
levels of Microcontroller and PC should be the same. The voltage levels of
microcontroller are logic1 and logic 0 i.e., logic 1 is +5V and logic 0 is 0V. But for
PC, RS232 voltage levels are considered and they are: logic 1 is taken as -3V to -
25V and logic 0 as +3V to +25V. So, in order to equal these voltage levels,
MAX232 IC is used. Thus this IC converts RS232 voltage levels to microcontroller
voltage levels and vice versa.
SM0 SCON.7 Serial port mode specifier
SM1 SCON.6 Serial port mode specifier
SM2 SCON.5 Used for multiprocessor communication
REN SCON.4 Set/cleared by software to enable/disable
reception
TB8 SCON.3 Not widely used
RB8 SCON.2 Not widely used
TI SCON.1 Transmit interrupt flag. Set by hardware at
the
beginning of the stop bit in mode 1. Must be
cleared by software.

RI SCON.0 Receive interrupt flag. Set by hardware at the


beginning of the stop bit in mode 1. Must be
cleared by software.

SM0 SM1
0 0 Serial Mode 0
0 1 Serial Mode 1, 8-bit data, 1 stop bit, 1 start bit
1 0 Serial Mode 2
1 1 Serial Mode 3

Of the four serial modes, only mode 1 is widely used. In the SCON register, when
serial mode 1 is chosen, the data framing is 8 bits, 1 stop bit and 1 start bit, which
makes it compatible with the COM port of IBM/ compatible PC’s. And the most
important is serial mode 1 allows the baud rate to be variable and is set by Timer 1
of the 8051. In serial mode 1, for each character a total of 10 bits are transferred,
where the first bit is the start bit, followed by 8 bits of data and finally 1 stop bit.

8051 Interface with any External Devices using Serial Communication:

RF ENCODER:
Features:
✓ 18 pin DIP
✓ Operating voltage is 2.4V ~ 12V
✓ Low power and high noise immunity CMOS technology
✓ Low standby current: 0.1µA (typ.) at VDD = 5V
ALU

CU

Memory

Timer, Counter,serial
communication ROM,
ADC, DAC, Timers,
USART, Oscillators
Etc.,

Figure: Block Diagram of Micro Controller (µc)

The AT89C51 is a low-power, high-performance CMOS 8-bit microcontroller with


4k bytes of Flash Programmable and erasable read only memory (EROM). The
device is manufactured using Atmel’s high-density nonvolatile memory technology
and is functionally compatible with the industry-standard 80C51 microcontroller
instruction set and pin out. By combining versatile 8-bit CPU with Flash on a
monolithic chip, the Atmel’s AT89c51 is a powerful microcomputer, which provides
a high flexible and cost- effective solution to many embedded control applications.

AT89C51 MICROCONTROLLER:
FEATURES:
➢ 80C51 based architecture
➢ 4-Kbytes of on-chip Reprogrammable Flash Memory
➢ 128 x 8 RAM
➢ Two 16-bit Timer/Counters
➢ Full duplex serial channel
➢ Boolean processor
➢ Four 8-bit I/O ports, 32 I/O lines
➢ Memory addressing capability
– 64K ROM and 64K RAM
➢ Power save modes:
– Idle and power-down
➢ Six interrupt sources
➢ Most instructions execute in 0.3 us
➢ CMOS and TTL compatible
➢ Maximum speed: 40 MHz @ Vcc = 5V
➢ Industrial temperature available
➢ Packages available:
– 40-pin DIP
Pinconfiguration
PIN DESCRIPTION:
VCC
Supply voltage
GND
Ground
Port 0
Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can
sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as
high impedance inputs.
Port 0 can also be configured to be the multiplexed low order address/data bus
during access to external program and data memory. In this mode, P 0 has internal
pull-ups. Port 0 also receives the code bytes during Flash programming and outputs
the code bytes during program verification. External pull-ups are required during
program verification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The port 1output
buffers can sink/source four TTL inputs. When 1s are written to port 1 pins, they are
pulled high by the internal pull-ups can be used as inputs. As inputs, Port 1 pins that
are externally being pulled low will source current (1) because of the internal pull-
ups.
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The port 2 output
buffers can sink/source four TTL inputs. When 1s are written to port 2 pins, they are
pulled high by the internal pull-ups can be used as inputs. As inputs, Port 2 pins that
are externally being pulled low will source current because of the internal pull-ups.

Port 2 emits the high-order address byte during fetches from external program
memory and during access to DPTR. In this application Port 2 uses strong internal
pull-ups when emitting 1s. During accesses to external data memory that use 8-bit
data address (MOVX@R1), Port 2 emits the contents of the P2 Special Function
Register. Port 2 also receives the high-order address bits and some control signals
during Flash programming and verification.
Port 3
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The port 3 output
buffers can sink/source four TTL inputs. When 1s are written to port 3 pins, they are
pulled high by the internal pull-ups can be used as inputs. As inputs, Port 3 pins that
are externally being pulled low will source current because of the internal pull-ups.
Port 3 also receives some control signals for Flash Programming and verification.

Port Alternate Functions


pin
P3.0 RXD(serial input port)
P3.1 TXD(serial input port)

P3.2 INT0(external interrupt 0)

P3.3 INT1(external interrupt 1)

P3.4 T0(timer 0 external input)

P3.5 T1(timer 1 external input)

P3.6 WR(external data memory


write strobe)
P3.7 RD(external data memory
read strobe)

RST
Rest input A on this pin for two machine cycles while the oscillator is running resets
the device.
ALE/PROG:
Address Latch Enable is an output pulse for latching the low byte of the address
during access to external memory. This pin is also the program pulse input (PROG)
during Flash programming.
In normal operation ALE is emitted at a constant rate of 1/16 the oscillator
frequency and may be used for external timing or clocking purpose. Note, however,
that one ALE pulse is skipped during each access to external Data memory.
PSEN
Program Store Enable is the read strobe to external program memory when the
AT89c51 is executing code from external program memory PSEN is activated twice
each machine cycle, except that two PSEN activations are skipped during each
access to external data memory.
EA /VPP
External Access Enable (EA) must be strapped to GND in order to enable the
device to fetch code from external program memory locations starting at 0000h up
to FFFFH. Note, however, that if lock bit 1 is programmed EA will be internally
latched on reset. EA should be strapped to Vcc for internal program executions. This
pin also receives the 12-volt programming enable voltage (Vpp) during Flash
programming when 12-volt programming is selected.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
XTAL 2
Output from the inverting oscillator amplifier.

MEMORY MAP AND REGISTERS


Memory
The AT89C51 has separate address spaces for program and data memory. The
program and data memory can be up to 64K bytes long. The lower 4K program
memory can reside on-chip. The AT89C51 has 128 bytes of on-chip RAM.
The lower 128 bytes can be accessed either by direct addressing or by indirect
addressing. The lower 128 bytes of RAM can be divided into 3 segments as listed
below
1. Register Banks 0-3: locations 00H through 1FH (32 bytes). The device after
reset defaults to register bank 0. To use the other register banks, the user must select
them in software. Each register bank contains eight 1-byte registers R0-R7. Reset
initializes the stack point to location 07H, and is incremented once to start from
08H, which is the first register of the second register bank.
2. Bit Addressable Area: 16 bytes have been assigned for this segment 20H-2FH.
Each one of the 128 bits of this segment can be directly addressed (0-7FH). Each of
the 16 bytes in this segment can also be addressed as a byte.
3. Scratch Pad Area: 30H-7FH are available to the user as data RAM. However, if
the data pointer has been initialized to this area, enough bytes should be left aside to
prevent SP data destruction.

4.TIMERS:
On-chip timing/counting facility has proved the capabilities of the microcontroller
for implementing the real time application. These includes pulse counting, frequency
measurement, pulse width measurement, baud rate generation, etc,. Having
sufficient number of timer/counters may be a need in a certain design application.
The 8051 has two timers/counters. They can be used either as timers to generate a
time delay or as counters to count events happening outside the microcontroller. Let
discuss how these timers are used to generate time delays and we will also discuss
how they are been used as event counters.
PROGRAMMING 8051 TIMERS:
The 8051 has timers: Timer 0 and Timer1.they can be used either as timers
or as event counters. Let us first discuss about the timers’ registers and how to
program the timers to generate time delays.
BASIC RIGISTERS OF THE TIMER:
Both Timer 0 and Timer 1 are 16 bits wide. Since the 8051 has an 8-bit
architecture, each 16-bit timer is accessed as two separate registers of low byte and
high byte.
TIMER 0 REGISTERS
The 16-bit register of Timer 0 is accessed as low byte and high byte. the low
byte register is called TL0(Timer 0 low byte)and the high byte register is referred to
as TH0(Timer 0 high byte).These register can be accessed like any other register,
such as A,B,R0,R1,R2,etc.for example, the instruction ”MOV TL0, #4F”moves the
value 4FH into TL0,the low byte of Timer 0.These registers can also be read like
any other register.

D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0

TH0 TL0

TIMER 1 REGISTERS:
Timer 1 is also 16-bit register is split into two bytes, referred to as TL1
(Timer 1 low byte) and TH1(Timer 1 high byte).these registers are accessible n the
same way as the register of Timer 0.

TMOD (timer mode) REGISTER


Both timers 0 and 1 use the same register, called TMOD, to set the various
timer operation modes. TMOD is an 8-bit register in which the lower 4 bits are set
aside for Timer 0 and the upper 4 bits for Timer 1.in each case; the lower 2 bits are
used to set the timer mode and the upper 2 bits to specify the operation.
MODES:
M1, M0:
M0 and M1 are used to select the timer mode. There are three modes: 0, 1,
2.Mode 0 is a 13-bit timer, mode 1 is a 16-bit timer, and mode 2 is an 8-bit timer.
We will concentrate on modes 1 and 2 since they are the ones used most widely. we
will soon describe the characteristics of these modes, after describing the reset of the
TMOD register.

GATE

Gate control when set. The timer/counter is enabled only while the INTx pin is
high and the TRx control pin is set. When cleared, the timer is enabled. C/T Timer
or counter selected cleared for timer operation (Input from internal system clock).set
for counter

5. INTERRUPT SYSTEM:
An interrupt is an external or internal event that suspends the operation of
micro controller to inform it that a device needs its service. In interrupt method,
whenever any device needs its service, the device notifies the micro controller by
sending it an interrupt signal. Upon receiving an interrupt signal, the micro
controller interrupts whatever it is doing and serves the device. The program
associated with interrupt is called as interrupt service subroutine (ISR).Main
advantage with interrupts is that the micro controller can serve many devices.

Baud Rate
The baud rate in Mode 0 is fixed as shown in the following equation. Mode 0
Baud Rate = Oscillator Frequency /12 the baud rate in Mode 2 depends on the value
of the SMOD bit in Special Function Register PCON. If SMOD = 0 the baud rate is
1/64 of the oscillator frequency. If SMOD = 1, the baud rate is 1/32 of the oscillator
frequency.
Mode 2 Baud Rate = 2SMODx (Oscillator Frequency)/64.
In the IS89C51, the Timer 1 overflow rate determines the baud rates in Modes 1 and
3.

NUMBER OF INTERRUPTS IN 89C51:


There are basically five interrupts available to the user. Reset is also
considered as an interrupt. There are two interrupts for timer, two interrupts for
external hardware interrupt and one interrupt for serial communication.

Memory Interrupt
Location Name
0000H Reset
0003H External
000BH interrupt 0
0013H Timer
001BH interrupt 0
0023H External
interrupt 1
Timer
CHAPTER 6
POWER SUPPLY

6.1 Introduction :
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.

6.2 Circuit Explanation:

6.2.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:

6.2.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.
A simplified transformer design is shown below. 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.
An ideal step-down transformer showing magnetic flux in the core

6.2.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. The area is constant,
being equal to the cross-sectional area of the transformer core, whereas the magnetic
field varies with time according to the excitation of the primary. 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 V P gives the basic equation for
stepping up or stepping down the voltage

6.2.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.

Pincoming = IPVP = Poutgoing = ISVS


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 < IP) by the same factor. Transformers are efficient so this formula is
a reasonable approximation.
If the voltage is increased (stepped up) (VS > VP), then the current is decreased
(stepped down) (IS < IP) 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 Z S 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 Z P of the primary circuit


appears to the secondary to be

Detailed operation :
The simplified description above neglects several practical factors, in particular
the primary current required to establish a magnetic field in the core, and the
contribution to the field due to current in the secondary circuit.
Models of an ideal transformer typically assume a core of negligible reluctance
with two windings of zero resistance. When a voltage is applied to the primary winding,
a small current flows, driving flux around the magnetic circuit of the core. The current
required to create the flux is termed the magnetizing current; since the ideal core has
been assumed to have near-zero reluctance, the magnetizing current is negligible,
although still required to create the magnetic field.
The changing magnetic field induces an electromotive force (EMF) across each
winding. Since the ideal windings have no impedance, they have no associated voltage
drop, and so the voltages VP and VS measured at the terminals of the transformer, are
equal to the corresponding EMFs. The primary EMF, acting as it does in opposition to
the primary voltage, is sometimes termed the "back EMF". This is due to Lenz's law
which states that the induction of EMF would always be such that it will oppose
development of any such change in magnetic field.

6.2.2 Bridge 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 same output voltage.

6.2.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.

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.
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.
In some designs, a series resistor at the load side of the capacitor is added. The
smoothing can then be improved by adding additional stages of capacitor–resistor pairs,
often done only for sub-supplies to critical high-gain circuits that tend to be sensitive to
supply voltage noise.
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. For example, if the load
draws an average current of n Amps, and the diodes conduct for 10% of the time, the
average diode current during conduction must be 10n Amps. This non-sinusoidal
current leads to harmonic distortion and a poor power factor in the AC supply.
In a practical circuit, when a capacitor is directly connected to the output of a
bridge, the bridge diodes must be sized to withstand the current surge that occurs when
the power is turned on at the peak of the AC voltage and the capacitor is fully
discharged. Sometimes a small series resistor is included before the capacitor to limit
this current, though in most applications the power supply transformer's resistance is
already sufficient.
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.
Some early console radios created the speaker's constant field with the current
from the high voltage ("B +") power supply, which was then routed to the consuming
circuits, (permanent magnets were considered too weak for good performance) to
create the speaker's constant magnetic field. The speaker field coil thus performed 2
jobs in one: it acted as a choke, filtering the power supply, and it produced the magnetic
field to operate the speaker.

6.2.4 Voltage Regulator :


A voltage regulator is an electrical regulator designed to automatically maintain a
constant voltage level.
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. These devices typically support an input voltage which can be anywhere
from a couple of volts over the intended output voltage, up to a maximum of 35 or 40
volts, and can typically provide up to around 1 or 1.5 amps of current (though smaller or
larger packages may have a lower or higher current rating).
CHAPTER 7
LCD (Liquid Crystal Display)

7.1 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

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. However, the cost for field-effect
units is typically higher, and their height is limited to 2 inches. On the other hand, light-
scattering units are available up to 8 inches in height. Field-effect LCD is used in the
project for displaying the appropriate information.

7.2 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

EN (Enable LCD):

EN bit is to ENABLE or DISABLE the LCD. When ever controller wants to


write some thing into LCD or READ acknowledgment from LCD 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
7.3 LCD diagram:

16 x 2 Char LCD

D0 EN RW RS Vf GND
A K D7

ACK
Vcc
D0 – D7

R1

R2

Block Diagram
LCD
D0-D7 RS RW EN

Data Lines
Embedded
Controller
P1.0

P1.1

P1.2
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

7.4 FLOWCHART:
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

1
CHAPTER 8
GSM MODEM

8.1 INTRODUCTION:
GSM (Global System for Mobile communications) is an open, digital cellular technology
used for transmitting mobile voice and data services.

GSM (Global System for Mobile communication) is a digital mobile telephone system
that is widely used in Europe and other parts of the world. GSM uses a variation of Time
Division Multiple Access (TDMA) and is the most widely used of the three digital wireless
telephone technologies (TDMA, GSM, and CDMA). GSM digitizes and compresses data, then
sends it down a channel with two other streams of user data, each in its own time slot. It operates
at either the 900 MHz or 1,800 MHz frequency band. It supports voice calls and data transfer
speeds of up to 9.6 kbit/s, together with the transmission of SMS (Short Message Service).

8.1.1 History:
In 1982, the European Conference of Postal and Telecommunications Administrations
(CEPT) created the Group Special Mobile (GSM) to develop a standard for a mobile telephone
system that could be used across Europe. In 1987, a memorandum of understanding was signed
by 13 countries to develop a common cellular telephone system across Europe. Finally the
system created by SINTEF lead by Torleiv Maseng was selected.
In 1989, GSM responsibility was transferred to the European Telecommunications
Standards Institute (ETSI) and phase I of the GSM specifications were published in 1990. The
first GSM network was launched in 1991 by Radiolinja in Finland with joint technical
infrastructure maintenance from Ericsson.
By the end of 1993, over a million subscribers were using GSM phone networks being
operated by 70 carriers across 48 countries. As of the end of 1997, GSM service was available in
more than 100 countries and has become the de facto standard in Europe and Asia.
8.2 GSM Frequencies:
GSM networks operate in a number of different frequency ranges (separated into GSM
frequency ranges for 2G and UMTS frequency bands for 3G). Most 2G GSM networks operate
in the 900 MHz or 1800 MHz bands. Some countries in the Americas (including Canada and the
United States) use the 850 MHz and 1900 MHz bands because the 900 and 1800 MHz frequency
bands were already allocated. Most 3G GSM networks in Europe operate in the 2100 MHz
frequency band. The rarer 400 and 450 MHz frequency bands are assigned in some countries
where these frequencies were previously used for first-generation systems.
GSM-900 uses 890–915 MHz to send information from the mobile station to the base
station (uplink) and 935–960 MHz for the other direction (downlink), providing 124 RF channels
(channel numbers 1 to 124) spaced at 200 kHz. Duplex spacing of 45 MHz is used. In some
countries the GSM-900 band has been extended to cover a larger frequency range. This 'extended
GSM', E-GSM, uses 880–915 MHz (uplink) and 925–960 MHz (downlink), adding 50 channels
(channel numbers 975 to 1023 and 0) to the original GSM-900 band.
Time division multiplexing is used to allow eight full-rate or sixteen half-rate speech
channels per radio frequency channel. There are eight radio timeslots (giving eight burst periods)
grouped into what is called a TDMA frame. Half rate channels use alternate frames in the same
timeslot. The channel data rate for all 8 channels is 270.833 Kbit/s, and the frame duration is
4.615 ms.
The transmission power in the handset is limited to a maximum of 2 watts in
GSM850/900 and 1 watt in GSM1800/1900. GSM operates in the 900MHz and 1.8GHz bands in
Europe and the 1.9GHz and 850MHz bands in the US. The 850MHz band is also used for GSM
and 3G in Australia, Canada and many South American countries. By having harmonized
spectrum across most of the globe, GSM’s international roaming capability allows users to
access the same services when travelling abroad as at home. This gives consumers seamless and
same number connectivity in more than 218 countries.
Terrestrial GSM networks now cover more than 80% of the world’s population. GSM
satellite roaming has also extended service access to areas where terrestrial coverage is not
available.
Mobile Telephony Standards
1G

The first generation of mobile telephony (written 1G) operated using analogue communications
and portable devices that were relatively large. It used primarily the following standards:
• AMPS (Advanced Mobile Phone System), which appeared in 1976 in the United States,
was the first cellular network standard. It was used primarily in the Americas, Russia and
Asia. This first-generation analogue network had weak security mechanisms which
allowed hacking of telephones lines.
• TACS (Total Access Communication System) is the European version of the AMPS
model. Using the 900 MHz frequency band, this system was largely used in England and
then in Asia (Hong-Kong and Japan).
• ETACS (Extended Total Access Communication System) is an improved version of the
TACS standard developed in the United Kingdom that uses a larger number of
communication channels.
The first-generation cellular networks were made obsolete by the appearance of an entirely
digital second generation.

Second Generation of Mobile Networks (2G)

The second generation of mobile networks marked a break with the first generation of cellular
telephones by switching from analogue to digital. The main 2G mobile telephony standards are:
• GSM (Global System for Mobile communications) is the most commonly used standard
in Europe at the end of the 20th century and supported in the United States. This standard
uses the 900 MHz and 1800 MHz frequency bands in Europe. In the United States,
however, the frequency band used is the 1900 MHz band. Portable telephones that are
able to operate in Europe and the United States are therefore called tri-band.
• CDMA (Code Division Multiple Access) uses a spread spectrum technique that allows a
radio signal to be broadcast over a large frequency range.
• TDMA (Time Division Multiple Access) uses a technique of time division of
communication channels to increase the volume of data transmitted simultaneously.
TDMA technology is primarily used on the American continent, in New Zealand and in
the Asia-Pacific region.

With the 2G networks, it is possible to transmit voice and low volume digital data, for example
text messages (SMS, for Short Message Service) or multimedia messages (MMS, for Multimedia
Message Service). The GSM standard allows a maximum data rate of 9.6 kbps.

Extensions have been made to the GSM standard to improve throughput. One of these is
the GPRS (General Packet Radio System) service which allows theoretical data rates on the
order of 114 Kbit/s but with throughput closer to 40 Kbit/s in practice. As this technology does
not fit within the "3G" category, it is often referred to as 2.5G

The EDGE (Enhanced Data Rates for Global Evolution) standard, billed as 2.75G,
quadruples the throughput improvements of GPRS with its theoretical data rate of 384 Kbps,
thereby allowing the access for multimedia applications. In reality, the EDGE standard allows
maximum theoretical data rates of 473 Kbit/s, but it has been limited in order to comply with the
IMT-2000 (International Mobile Telecommunications-2000) specifications from the ITU
(International Telecommunications Union).

3G

The IMT-2000 (International Mobile Telecommunications for the year 2000) specifications
from the International Telecommunications Union (ITU) defined the characteristics of 3G (third
generation of mobile telephony). The most important of these characteristics are:
• High transmission data rate.
• 144 Kbps with total coverage for mobile use.
• 384 Kbps with medium coverage for pedestrian use.
• 2 Mbps with reduced coverage area for stationary use.
• World compatibility.
• Compatibility of 3rd generation mobile services with second generation networks.

3G offers data rates of more than 144 Kbit/s, thereby allowing the access to multimedia uses
such as video transmission, video-conferencing or high-speed internet access. 3G networks use
different frequency bands than the previous networks: 1885-2025 MHz and 2110-2200 MHz.

The main 3G standard used in Europe is called UMTS (Universal Mobile


Telecommunications System) and uses WCDMA (Wideband Code Division Multiple Access)
encoding. UMTS technology uses 5 MHz bands for transferring voice and data, with data rates
that can range from 384 Kbps to 2 Mbps. HSDPA (High Speed Downlink Packet Access) is a
third generation mobile telephony protocol, (considered as "3.5G"), which is able to reach data
rates on the order of 8 to 10 Mbps. HSDPA technology uses the 5 GHz frequency band and uses
WCDMA encoding.

8.3 GSM Standards :


The GSM (Global System for Mobile communications) network is at the start of the
21st century, the most commonly used mobile telephony standard in Europe. It is called as
Second Generation (2G) standard because communications occur in an entirely digital mode,
unlike the first generation of portable telephones. When it was first standardized in 1982, it was
called as Group Special Mobile and later, it became an international standard called "Global
System for Mobile communications" in 1991.
In Europe, the GSM standard uses the 900 MHz and 1800 MHz frequency bands. In the
United States, however, the frequency band used is the 1900 MHz band. For this reason, portable
telephones that are able to operate in both Europe and the United States are called tri-band while
those that operate only in Europe are called bi-band.
The GSM standard allows a maximum throughput of 9.6 kbps which allows transmission
of voice and low-volume digital data like text messages (SMS, for Short Message Service) or
multimedia messages (MMS, for Multimedia Message Service).

GSM uses narrowband TDMA, which allows eight simultaneous calls on the same radio
frequency. There are three basic principles in multiple access, FDMA (Frequency Division
Multiple Access), TDMA (Time Division Multiple Access), and CDMA (Code Division
Multiple Access). All three principles allow multiple users to share the same physical channel.
But the two competing technologies differ in the way user sharing the common resource.

TDMA allows the users to share the same frequency channel by dividing the signal into
different time slots. Each user takes turn in a round robin fashion for transmitting and receiving
over the channel. Here, users can only transmit in their respective time slot.

CDMA uses a spread spectrum technology that is it spreads the information contained in
a particular signal of interest over a much greater bandwidth than the original signal. Unlike
TDMA, in CDMA several users can transmit over the channel at the same time.

TDMA in brief:

In late1980’s, as a search to convert the existing analog network to digital as a means to


improve capacity, the cellular telecommunications industry association chose TDMA over
FDMA. Time Division Multiplex Access is a type of multiplexing where two or more channels
of information are transmitted over the same link by allocating a different time interval for the
transmission of each channel. The most complex implementation using TDMA principle is of
GSM’s (Global System for Mobile communication). To reduce the effect of co-channel
interference, fading and multipath, the GSM technology can use frequency hopping, where a call
jumps from one channel to another channel in a short interval.
TDMA systems still rely on switch to determine when to perform a handoff. Handoff
occurs when a call is switched from one cell site to another while travelling. The TDMA handset
constantly monitors the signals coming from other sites and reports it to the switch without
caller’s awareness. The switch then uses this information for making better choices for handoff
at appropriate times. TDMA handset performs hard handoff, i.e., whenever the user moves from
one site to another, it breaks the connection and then provides a new connection with the new
site.

Advantages of TDMA:

There are lots of advantages of TDMA in cellular technologies.

• It can easily adapt to transmission of data as well as voice communication.


• It has an ability to carry 64 kbps to 120 Mbps of data rates. This allows the operator to do
services like fax, voice band data and SMS as well as bandwidth intensive application
such as multimedia and video conferencing.
• Since TDMA technology separates users according to time, it ensures that there will be
no interference from simultaneous transmissions.
• It provides users with an extended battery life, since it transmits only portion of the time
during conversations. Since the cell size grows smaller, it proves to save base station
equipment, space and maintenance.
TDMA is the most cost effective technology to convert an analog system to digital.

Disadvantages of TDMA:

One major disadvantage using TDMA technology is that the users has a predefined time
slot. When moving from one cell site to other, if all the time slots in this cell are full the user
might be disconnected. Likewise, if all the time slots in the cell in which the user is currently in
are already occupied, the user will not receive a dial tone.

The second problem in TDMA is that it is subjected to multipath distortion. To overcome


this distortion, a time limit can be used on the system. Once the time limit is expired, the signal is
ignored.

The concept of cellular network

Mobile telephone networks are based on the concept of cells, circular zones that overlap
to cover a geographical area.
Cellular networks are based on the use of a central transmitter-receiver in each cell,
called a "base station" (or Base Transceiver Station, written BTS). The smaller the radius of a
cell, the higher is the available bandwidth. So, in highly populated urban areas, there are cells
with a radius of a few hundred meters, while huge cells of up to 30 kilometers provide coverage
in rural areas.
In a cellular network, each cell is surrounded by 6 neighbouring cells (thus a cell is
generally drawn as a hexagon). To avoid interference, adjacent cells cannot use the same
frequency. In practice, two cells using the same frequency range must be separated by a distance
of two to three times the diameter of the cell.

8.4 Architecture of the GSM Network:


In a GSM network, the user terminal is called a mobile station. A mobile station is made
up of a SIM (Subscriber Identity Module) card allowing the user to be uniquely identified and a
mobile terminal. The terminals (devices) are identified by a unique 15-digit identification
number called IMEI (International Mobile Equipment Identity). Each SIM card also has a
unique (and secret) identification number called IMSI (International Mobile Subscriber
Identity). This code can be protected using a 4-digit key called a PIN code.

The SIM card therefore allows each user to be identified independently of the terminal
used during communication with a base station. Communications occur through a radio link (air
interface) between a mobile station and a base station.
All the base stations of a cellular network are connected to a base station
controller (BSC) which is responsible for managing distribution of the resources. The system
consisting of the base station controller and its connected base stations is called the Base Station
Subsystem (BSS).

Finally, the base station controllers are themselves physically connected to the Mobile
Switching Centre (MSC), managed by the telephone network operator, which connects them to
the public telephone network and the Internet. The MSC belongs to a Network Station
Subsystem (NSS), which is responsible for managing user identities, their location and
establishment of communications with other subscribers. The MSC is generally connected to
databases that provide additional functions:
CHAPTER 9

GPS(Global Positioning System)

9.1 INTRODUCTION OF GPS MODULE:


Global Positioning System (GPS) is a Global Navigation Satellite System (GNSS) developed

by the United States Department of Defense. It is the only fully functional GNSS in the

world. It uses a constellation of between 24 and 32 Medium Earth Orbit satellites that

transmit precise microwave signals, which enable GPS receivers to determine their current

location, the time, and their velocity. Its official name is NAVSTAR GPS. Although

NAVSTAR is not an acronym a few backronyms have been created for it.0. The GPS

satellite constellation is managed by the United States Air Force 50th Space Wing. GPS is

often used by civilians as a navigation system GPS receiver calculates its position by

carefully timing the signals sent by the GPS satellites high above the Earth. Each satellite

continually transmits messages containing the time the message was sent, precise orbital

information (the ephemeris), and the general system health and rough orbits of all GPS

satellites (the almanac). The receiver measures the transit time of each message and

computes the distance to each satellite. Geometric trilateration is used to combine these

distances with the location of the satellites to determine the receiver's location. The position

is displayed, perhaps with a moving map display or latitude and longitude; elevation

information may be included. Many GPS units also show derived information such as

direction and speed, calculated from position changes.

General Packet Radio Service (GPRS) is a packet oriented Mobile Data Service available to
Newer Garmin GPS receivers with WAAS (Wide Area Augmentation System) capability can

improve accuracy to less than three meters on average. No additional equipment or fees are

required to take advantage of WAAS. Users can also get better accuracy with Differential GPS

(DGPS), which corrects GPS signals to within an average of three to five meters. The U.S. Coast

Guard operates the most common DGPS correction service. This system consists of a network of

towers that receive GPS signals and transmit a corrected signal by beacon transmitters. In order

to get the corrected signal, users must have a differential beacon receiver and beacon antenna in

addition to their GPS.

9.3 GPS Satellite System:

The 24 satellites that make up the GPS space segment are orbiting the earth about 12,000 miles

above us. They are constantly moving, making two complete orbits in less than 24 hours. These

satellites are travelling at speeds of roughly 7,000 miles an hour.


GPS satellites are powered by solar energy. They have backup batteries onboard to keep them

running in the event of a solar eclipse, when there's no solar power. Small rocket boosters on

each satellite keep them flying in the correct path.

Here are some other interesting facts about the GPS satellites (also called NAVSTAR, the

official U.S. Department of Defense name for GPS):

• The first GPS satellite was launched in 1978.

• A full constellation of 24 satellites was achieved in 1994.

• Each satellite is built to last about 10 years. Replacements are constantly being built and

launched into orbit.

• A GPS satellite weighs approximately 2,000 pounds and is about 17 feet across with the

solar panels extended.

• Transmitter power is only 50 watts or less.

GPS satellites transmit two low power radio signals, designated L1 and L2. Civilian GPS uses

the L1 frequency of 1575.42 MHz in the UHF band. The signals travel by line of sight, meaning

they will pass through clouds, glass and plastic but will not go through most solid objects such as

buildings and mountains.

A GPS signal contains three different bits of information - a pseudorandom code, ephemeris data

and almanac data. The pseudorandom code is simply an I.D. code that identifies which satellite is

transmitting information. You can view this number on your Garmin GPS unit's satellite page, as

it identifies which satellites it's receiving.


• Signal multipath - This occurs when the GPS signal is reflected off objects such as tall

buildings or large rock surfaces before it reaches the receiver. This increases the travel time

of the signal, thereby causing errors.

• Receiver clock errors - A receiver's built-in clock is not as accurate as the atomic clocks

onboard the GPS satellites. Therefore, it may have very slight timing errors.

• Orbital errors - Also known as ephemeris errors, these are inaccuracies of the satellite's

reported location.

• Number of satellites visible - The more satellites a GPS receiver can "see," the better the

accuracy. Buildings, terrain, electronic interference, or sometimes even dense foliage can

block signal reception, causing position errors or possibly no position reading at all. GPS

units typically will not work indoors, underwater or underground.

• Satellite geometry/shading - This refers to the relative position of the satellites at any given

time. Ideal satellite geometry exists when the satellites are located at wide angles relative to

each other. Poor geometry results when the satellites are located in a line or in a tight

grouping.

Intentional degradation of the satellite signal - Selective Availability (SA) is an intentional

degradation of the signal once imposed by the U.S. Department of Defense. SA was

intended to prevent military adversaries from using the highly accurate GPS signals. The

government turned off SA in May 2000, which significantly improved the accuracy of

civilian GPS receivers.

9.5 Applications :

GPS has a variety of applications on land, at sea and in the air. Basically, GPS is usable

everywhere except where it's impossible to receive the signal such as inside most buildings, in
caves and other subterranean locations, and underwater. The most common airborne applications

are for navigation by general aviation and commercial aircraft. At sea, GPS is also typically used

for navigation by recreational boaters, commercial fishermen, and professional mariners. Land-

based applications are more diverse. The scientific community uses GPS for its precision timing

capability and position information.

Surveyors use GPS for an increasing portion of their work. GPS offers cost savings by drastically

reducing setup time at the survey site and providing incredible accuracy. Basic survey units,

costing thousands of dollars, can offer accuracies down to one meter. More expensive systems

are available that can provide accuracies to within a centimeter.

Recreational uses of GPS are almost as varied as the number of recreational sports available.

GPS is popular among hikers, hunters, snowmobilers, mountain bikers, and cross-country skiers,

just to name a few. Anyone who needs to keep track of where he or she is, to find his or her way

to a specified location, or know what direction and how fast he or she is going can utilize the

benefits of the global positioning system.

GPS is now commonplace in automobiles as well. Some basic systems are in place and provide

emergency roadside assistance at the push of a button (by transmitting your current position to a

dispatch center). More sophisticated systems that show your position on a street map are also

available. Currently these systems allow a driver to keep track of where he or she is and suggest

the best route to follow to reach a designated location.


CHAPTER 10

RELAYS :

10.1 Introduction :

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: Circuit symbol of a relay


10.2 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: 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 (eg 1N4148) 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. There can be one or more contacts. i.e., different types like SPST (single pole single throw),
SPDT (single pole double throw) and DPDT (double pole double throw) relays.

3. 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. The relay has a
minimum voltage, below which the coil will not be energized. This minimum voltage is called
the “pull-in” voltage.

4. 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.

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
SOURCE CODE

#include <lpc214x.h>

#include <string.h>

#include<stdio.h>

#include"gpio.h"

#include"lcd.h"

#include"serial.h"

#define r1 P0_20

#define r2 P0_21

unsigned char
gchr='x',gchr1='x',gchr2='x',gchr3='x',gchr4='x',gchr5='x',gchr6='x',ch='x',strx[4]="0000",stry[4]
="0000",strz[4]="0000";

unsigned char data1[100];

void serial0_RxISR(void) __irq;

void serial1_RxISR(void) __irq;

int set=1;
void pin()

PINSEL0=0X00050005;//SELECTING PIN OPERATION

PINSEL1=0X15000000;

PINSEL2=0X00000000;

IODIR0=0xffffffff;

IODIR1=0XFFFFFFFF;//PORT1 AS OUTPUT

IOCLR1=0XFFFFFFFF;

int inp0(int pinNumber)

// Read the current state of all pins in GPIO block 0

int pinBlockState = IOPIN0;

// Read the value of 'pinNumber'

int pinState = (pinBlockState & (/*1 <<*/ pinNumber)) ? 1 : 0;

// Return the value of pinState

return pinState;

void InitSerial0Int(unsigned isrPtr)

U0IER = 0x01;
VICVectCntl0 = 0x00000026; //select a
priority slot for a given interrupt

VICVectAddr0 = (unsigned long)isrPtr; //pass the address of the IRQ into the
VIC slot

VICIntEnable |= 0x00000040; //enable


interrupt2

void InitSerial1Int(unsigned isrPtr)

U1IER = 0x01;

VICVectCntl1 = 0x00000027; //select a


priority slot for a given interrupt

VICVectAddr1 = (unsigned long)isrPtr; //pass the address of the IRQ into the
VIC slot

VICIntEnable |= 0x00000080; //enable


interrupt2

unsigned char rcv,count=0;

void okcheck()

unsigned char rr;

do{

rr = receive_0();

}while(rr != 'K');
}

void okc()

unsigned char rr;

do{

rr = receive_1();

}while(rr != 'K');

int main()

pin();

IOCLR0=r1;IOCLR0=r2;

ser_init_0(0x61,0x00);

ser_init_1(0x61,0x00);

initlcd();

stringlcd(0x80," IOT BASED");delay(500);//clcd(1);

stringlcd(0xC0,"DEVICE CONTROL");delay(1000);clcd(1);

string_0("AT\r\n");okcheck();

string_0("ATE0\r\n");okcheck();

string_0("AT+CMGF=1\r\n");okcheck();

string_0("AT+CNMI=1,2,0,0\r\n");okcheck();
clcd(1);stringlcd(0x80,"READY TO READ DATA");

stringlcd(0xc0,"FROM SERVER");delay(300);

while(1)

stringlcd(0x01,"AT"); string_0("AT\r\n"); okcheck();delay(5000);

stringlcd(0x01,"ATE0"); string_0("ATE0\r\n"); okcheck();delay(5000);

stringlcd(0x01,"AT+SAPBR=3,1,CONTYPE
GPRS");string_0("AT+SAPBR=3,1,");send_0('"');string_0("Contype");send_0('"');send_0(',');sen
d_0('"');string_0("GPRS");send_0('"');string_0("\r\n");delay(5000);

stringlcd(0x01,"AT+SAPBR=3,1, APN
WWW");string_0("AT+SAPBR=3,1,");send_0('"');string_0("APN");send_0('"');send_0(',');send_
0('"');string_0("WWW");send_0('"');string_0("\r\n");delay(5000);

stringlcd(0x01,"AT+SAPBR=1,1");string_0("AT+SAPBR=1,1\r\n");delay(5000);

stringlcd(0x01,"AT+SAPBR=2,1");string_0("AT+SAPBR=2,1\r\n");delay(5000);

stringlcd(0x01,"AT+HTTPINIT");string_0("AT+HTTPINIT\r\n");delay(5000);

stringlcd(0x01,"AT+HTTPPARA");string_0("AT+HTTPPARA=");send_0('"');string_0("URL");
send_0('"');send_0(',');send_0('"');string_0("api.thingspeak.com/channels/272149/fields/1.json?re
sults=1");send_0('"');string_0("\r\n");delay(3000);

start:

stringlcd(0x01,"AT+HTTACTION=0");string_0("AT+HTTPACTION=0\r\n");okcheck();

do{
//
API.thingspeak.com/channels/219582/field/1.json

ch = receive_0();

}while(ch != '+');
stringlcd(0xC0,"AT+HTTACTION=0"); string_0("AT+HTTPACTION=0\r\n");okcheck();

do{

ch = receive_0();

}while(ch != '+');

stringlcd(0x01,"AT+HTTPREAD");string_0("AT+HTTPREAD\r\n");

do{

rcv=receive_0();

if((rcv=='O')||(rcv=='K'))

goto start;

}while(rcv != '[');

back:rcv=receive_0();

if(rcv=='{')

count=0;

do{

rcv=receive_0();

data1[count]=rcv;

count=count+1;

}while(rcv != '}');

rcv=receive_0();

if(rcv!=']')

goto back;
}

clcd(1);

dlcd(data1[58]);dlcd(data1[59]);dlcd(data1[60]);delay(2000);

if((data1[58]=='1')||(data1[59]=='1')||(data1[60]=='1'))

stringlcd(0x01,"LOAD-1 ON "); delay(100);

IO0SET=r1;

delay(500);

if((data1[58]=='2')||(data1[59]=='2')||(data1[60]=='2'))

stringlcd(0x01,"LOAD-1 OFF"); delay(100);

IO0CLR=r1;delay(500);

if((data1[58]=='3')||(data1[59]=='3')||(data1[60]=='3'))

stringlcd(0x01,"LOAD-2 ON "); delay(100);

IO0SET=r2;delay(500);

if((data1[58]=='4')||(data1[59]=='4')||(data1[60]=='4'))

stringlcd(0x01,"LOAD-2 OFF"); delay(100);

IO0CLR=r2;delay(500);

}
}

void serial0_RxISR(void) __irq

unsigned char rec1;

rec1 = receive_0();

if(rec1 == '*')

gchr1 = receive_0();

if(gchr1=='1')

IOSET0=r1;

if(gchr1=='2')

IOCLR0=r1;

if(gchr1=='3')

IOSET0=r2;

}
if(gchr1=='4')

IOCLR0=r2;

VICVectAddr = 0x00000000; //Dummy


write to signal end of interrupt

void serial1_RxISR(void) __irq

unsigned char ch;

ch = receive_1();

if(ch == '*')

VICVectAddr = 0x00000000; //Dummy


write to signal end of interrupt

}
RESULTS :

The main features of the proposed platform were compared to those of other solutions
designed for distributed sensing. The evaluation is carried out by considering [8] and [35], where
an extensive survey of the state of the art of IoT nodes is performed. In order to make a fair
comparison, we considered a number of 58 IoT commercial devices that are implemented on
PCB, out of 142 included in [8] and [35] at the date of writing. First of all, it is worth noting that
the proposed sensor node is the only one exploiting energy harvesting based on PV cells. It also
follows from the comparison that the maximum size (along three dimensions) of the proposed
device (86 mm) is slightly higher than the average value, equal to 62 mm, of the considered 58
devices. Nonetheless, it is worth noting that the overall volume of the proposed node, equal to 13
932 mm3, is much lower (about an order of magnitude) than the average value, equal to 130 360
mm3 [35]. This is mainly due to the low thickness of the overall assembled system in Fig. 6,
which is equal to 3 mm only. Fig. 13a shows the distribution of the sensitivity of RF receivers of
the IoT devices (in this case, all the 142 devices in [35] are considered). It is apparent that the
transceiver adopted in this work exhibits the best performance, which is 21 dBm
CONCLUSION :
An innovative WSN platform expressly conceived for ambient monitoring in
indoor environments, but which could be efficiently applied also in other IoT applications, has
been proposed, designed and experimentally tested.

It consists of a self-powered autonomous sensor node that exploits


embedded PV panels to harvest the energy, a microcontroller, a RF transceiver (plus antenna)
and different sensors.

The main strength of the prototype is to achieve the desired (complex)


functionality in a small volume with very low power consumption while ensuring ambient
monitoring even during night hours. As an example of application, the proposed system was
tailored for measuring ambient light, temperature, humidity and pressure inside a typical office
that alternates working hours with artificial light and dark hours during night, week-ends or
holydays.

The implemented node can harvest indoor ambient light starting from 100 lux
and, according to the available energy, adaptively sets the sensors acquisition and RF
transmission rate. Moreover, it provides relatively long-distance data transmission (tens of
meters) with air data rate from 1 to 500 kbps. The WSN node device is implemented on a
flexible PCB and occupies the same area of a credit card.

A comprehensive comparison with other commercial IoT systems


implemented on a PCB shows that the proposed platform represents a sensible advance of the
state of the art thanks to its very high flexibility, low standby power consumption and small
volume
FUTURE SCOPE :
The energy storage devices of the WSN node and its worst-case
power consumption have been tailored by specifying acquisition and data transmission rates to
reach the energy balance, also on the basis of the system architecture described in Sec. II, of the
available energy source, and of the “office” case study selected in Sec. III.

Energy Source. Each PV module provides a maximum output power of


about 46 μW under a radiation of 300 lux. Since the PV panel is made up of 2 strings of 3 series-
connected modules (Fig. 3), the total power from the PV panel, Ppanel, is 276 μW. Moreover,
SPV1050 has a power conversion efficiency of 77% and an efficiency of 96% related to the
Maximum Power Point Tracker (MPPT) algorithm, thus the available output power is: Pavail =
Ppanel 0.96 0.77 = 204 μW. Assuming a nominal battery voltage of 3.9 V, and 8 h of light per
working day, the WPN node can store a charge of: 204 μW 8 h / 3.9 V = 418.5 μAh.
Storage. The EFL700A39 rechargeable solid-state lithium thin-film battery has a capacity of 700
μAh. Its operating voltage ranges from 3.6 V to 4.2 V. It can also provide maximum a
continuous discharge current of 5 mA and a maximum pulsed discharge current of 10 mA.
Current consumption. Current consumption of each component has been evaluated in the three
different operating modes (sleep, run and peak) by taking into account the electrical
characteristics included in the datasheets and summarized in Table III. These data take into
account consumption of external RTC, ambient sensor, power management, microcontroller and
RF module.

Energy Sustainability. The best trade-off between energy sustainability


and expected performance was met by selecting a suitable number of acquisition and
transmission cycles within the different scenarios WD, WN and WE. The energy sustainability
of the WSN node can be hence ascertained. Table II shows the amount of charge and duration in
the envisaged operating scenarios. Combining consumption and energy production data together,
the battery charge and, consequently, the system energy balance was evaluated. Figure 14 shows
the battery state of charge during the four weeks, assuming that the battery is fully charged when
the system is switched on. In the worst case (i.e., at the end of the weekend) the battery charge is
still above 20% ensuring an adequate lifetime. Moreover, along the week the system is able to
fully recharge the battery. In particular, it is fully recharged at the beginning of every WE,
confirming a positive energy balance. In case of a prolonged absence of light, the power manager
will disconnect the battery to preserve its lifetime and to avoid a condition of over discharge.
Later, when the energy source will be available again, the platform is able to restart its
functionality, without the user intervention, reconnecting the battery and requesting a new
operating configuration from the central node, as showed in the flow diagram in Fig. 9. Finally,
the base station can adapt the acquisition and transmission rate depending on the residual charge
level of the battery.
REFERENCES :
[1] J. Byun, B. Jeon, J. Noh, Y. Kim, and S. Park,
“An intelligent self-adjusting sensor for smart home [12] A. A. Aziz, Y. A. Sekercioglu, P. Fitzpatrick,
services based on ZigBee communications,” IEEE and M. Ivanovich, “A survey on distributed
Trans. Consum. Electron., vol. 58, no. 3, pp. 794– topology control techniques for extending the
802, Aug. 2012. lifetime of battery powered wireless sensor
[2] T. W. Foster, D. Vardhan Bhatt, G. P. Hancke, networks,” IEEE Communications Surveys
and B. Silva, “A Web-Based Office Climate Tutorials, vol. 15, no. 1, pp. 121–144, 2013.
Control System Using Wireless Sensors”, IEEE [13] K. Gill, S.-H. Yang, F. Yao, and X. Lu. “A
Sensors Journal, vol. 16, no. 15, pp.6104-6113, ZigBee-Based Home Automation System,” IEEE
Aug. 2016. Trans. on Consumer Electron., vol. 55, no. 2, pp.
[3] S. D. T. Kelly, N. K. Suryadevara and S. C. 422-430, May 2009.
Mukhopadhyay, “Towards the Implementation of [14] I-K Hwang, D-Sung Lee, J-Wk Baek, “Home
IoT for Environmental Condition Monitoring in network configuring scheme for all electric
Homes,” IEEE Sensors Journal, vol. 13, no. 10, appliances using ZigBee-based integrated remote
pp.3846-3853, Oct. 2013. controller,” IEEE Trans. on Consumer Electron.,
[4] K. Shafiullah, K.P. Al-Saki, and A.A. Nabil, vol.55, no. 3, pp. 1300-1307, August 2009.
Wireless Sensor Networks - Current Status and [15] J. Han, H. Lee, and K.-R. Park. “Remote-
Future Trends, CRC Press, 2012. controllable and energy-saving room architecture
[5] F. Viani, F. Robol, A. Polo, P. Rocca, G. based on ZigBee communication,” IEEE Trans.
Oliveri, and A. Massa, “Wireless architectures for Consumer Electron., vol. 55, no 1, pp. 264-268,
heterogeneous sensing in smart home applications: Feb. 2009.
Concepts and real implementation,” Proc. IEEE, [16] A. Wheeler, “Commercial Applications of
vol. 101, no. 11, pp. 2381–2396, Nov. 2013. Wireless Sensor Networks Using ZigBee,” IEEE
[6] C. Gomez and J. Paredells, “Wireless home Communications Magazine, vol. 45, no. 4, pp. 70–
automation networks: A survey of architectures and 77, April 2007.
technologies,” IEEE Communications Magazine, [17] H. Qin and W. Zhang, “Zigbee-assisted power
vol. 48, no. 6, pp. 92-101, 2010. saving management for mobile devices,” IEEE
[7] M. Alioto, Ed., Enabling the Internet of Trans. Mobile Computing, vol. 13, no. 12, pp.
Things—From Integrated Circuits to Integrated 2933–2947, Dec 2014.
Systems. New York: Springer-Verlag, 2017. [18] R. Zhou, Y. Xiong, G. Xing, L. Sun, and J.
[8] M. Alioto and M. Shahghasemi, “The Internet Ma, “ZiFi: Wireless LAN Discovery via ZigBee
of Things on Its Edge: Trends Toward Its Tipping Interference Signatures,” in Annual International
Point,” IEEE Consumer Electronics Magazine, vol. Conference on Mobile Computing and Networking.
7, no. 1, pp. 77-87, Jan. 2018. ACM, 2010.
[9] B. Martinez, M. Monton, I. Vilajosana, and J. [19] R. Pozza, M. Nati, S. Georgoulas, K.
Prades, “The Power of Models: Modeling Power Moessner, and A. Gluhak, “Neighbor Discovery for
Consumption for IoT Devices,” IEEE Sensors Opportunistic Networking in Internet of Things
Journal, vol. 15, no. 10, pp. 5777–5789, Oct. 2015. Scenarios: A Survey,” IEEE Access, vol. 3, pp.
[10] M. Magno, F. Ait Aoudia, M. Gautier, O. 1101–1131, 2015.
Berder, L. Benini, “WULoRa: An Energy Efficient [20] STMicroelectronics, “Wireless connectivity
IoT End-Node for Energy Harvesting and for IoT applications,” [Online].
Heterogeneous Communication,” in Proc. of the http://www.st.com/resource/en/brochure/brwireless
Conference on Design, Automation and Test in _web.pdf
Europe, DATE’17, Lausanne, 2017, pp. 1528–1533. [21] ST Microelectronics, “Ultralow power energy
[11] M. Magno, S. Marinkovic, D. Brunelli, E. harvester and battery charger”, SPV1050 datasheet,
Popovici, B. O'Flynn and L. Benini, “Smart power Nov. 2013 [Revised Aug. 2015].
unit with ultra low power radio trigger capabilities [22] ST Microelectronics, “EnFilm™ -
for wireless sensor networks,” in Proc. of the rechargeable solid-state lithium thin film battery”,
Conference on Design, Automation and Test in EFL700A39 datasheet, Apr. 2010 [Revised June
Europe, ser. DATE ’12. San Jose, CA, 2012, pp. 2014].
75–80.
[23] F. Pulvirenti, A. La Scala, D. Ragonese, K.
D’Souza, G. M. Tina, and S. Pennisi, “4-Phase
Interleaved Boost Converter with IC Controller for
Distributed Photovoltaic Systems,” IEEE Trans.
Circ. Syst.—I: Reg. Pap., vol. 60, no. 11, Nov.
2013.
[24] K. K. Tse, B. M. T. Ho, H. S.-H. Chung, and
S. Y. Ron Hui, “A comparative study of maximum-
power-point trackers for photovoltaic panels using
switching-frequency modulation scheme,” IEEE
Trans. Ind. Electron., vol. 51, no. 2, pp. 410–418,
Apr. 2004.
[25] A.D. Grasso, S. Pennisi, “A Micro-Scale
Inductorless MPPT DC-DC Converter”, IET Power
Electronics, Vol. 6, No. 8, pp. 1634–1639, Sept.
[26] ST Microelectronics, “MEMS digital output
motion sensor: ultra-low-power high-performance
3-axis "nano" accelerometer”, LIS3DH datasheet,
May 2010 [Revised Dec. 2016].
[27] ST Microelectronics, “Capacitive digital
sensor for relative humidity and temperature”,
HTS221 datasheet, May 2014 [Revised Aug. 2016].
[28] ST Microelectronics, “MEMS pressure sensor:
260-1260 hPa absolute digital output barometer”,
LPS25H datasheet, Jul. 2013 [Revised Apr. 2016].
[29] ST Microelectronics, “Ultra-low-power 32-bit
MCU Arm®-based Cortex®-M0+, up to 64 KB
Flash memory, 8 KB SRAM, 2 KB EEPROM,
USB, ADC, DAC”, STM32L052x6 STM32L052x8
datasheet, Feb. 2014 [Revised Sep. 2017].
[30] ST Microelectronics, “Low data rate, low
power sub-1GHz transceiver”, SPIRIT1 datasheet,
Feb. 2012 [Revised Oct. 2016].
[31] ST Microelectronics, “Using the SPIRIT1
transceiver under EN 300 220 at 868 MHz”, Appl.
Note AN4110, Jul. 2012.
[32] ST Microelectronics, “Dynamic NFC/RFID
tag IC with 64-Kbit EEPROM, energy harvesting,
I²C bus and ISO 15693 RF interface”, M24LR64E-
R datasheet, Apr. 2012 [Revised Jul. 2017].
[33] C.A. Di Carlo, L Di Donato, G.S. Mauro, R.
La Rosa, P. Livreri, and G. Sorbello, “A circularly
polarized wideband high gain patch antenna for
wireless power transfer”, Microw. and Opt. Tech.
Lett., Vol. 60, Issue 3, pp 620-625, Mar. 2018.
[34] ST Microelectronics, “50 Ω nominal input /
conjugate match balun to SPIRIT1 with integrated
harmonic filter”, BALF-SPI-01D3 datasheet, Aug.
2013 [Revised Nov. 2015].
[35] M. Shahghasemi, M. Alioto, “IoT database,”
[Online]. Available: http://www.green-ic.org/iotdb
[last accessed Oct.11.2018].
International Journal of Advanced Research in Engineering
ISSN(O): 2493 – 6201 www.ijariet.org

Certificate of Acceptance
This is to certify that our review board has accepted research paper of

Ch .sai Kumar, Prof J.Sravanthi and Prof D.Nagaravi Kiran


entitled

“An investigation on energy efficient wireless sensor network for home and office automation”

M.Jithendra Reddy
Asst Editor In Chief
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 07 | July 2019 www.irjet.net p-ISSN: 2395-0072

An Investigation On Energy-Efficient Wireless Sensor Network for


Home/Office Automation
First Author1, Second Author2, Third Author3 Font Size 12
1First
Author Affiliation & Address
2Second
Author Affiliation & Address Font size 11
3Example: Professor, Dept. of xyz Engineering, xyz college, state, country

---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract At this purpose, each WSN physical node is equipped with
Smart homes/offices based on Wireless Sensor Networks multi-sensor devices for heterogeneous ambient sensing and
(WSNs) can provide an assisted living and working is also able to store, pre-process, transmit and receive data to
environment to the users. In these applications, the a host controller. More generally, intelligent wireless
distributed network nodes are made up of low-power low- interconnected sensing devices are expected to pervade all
cost high-energy-efficient electronic platforms equipped with the emerging applications in the Internet of Things (IoT) area
sensors, microcontroller, radio and antenna, able to [7]-[10]. In this context, key performances of the WSN nodes
periodically sense, receive, store, pre-process and transmit are reduced power consumption and maximum throughput
ambient data to a remote host station. Conventional nodes at a maximum communication distance [9]. Additional
are usually supplied by batteries, resulting in a significant specifications that must be considered are cost, size and ease
limitation to the life time and to the maximum number of of configuration and installation [7]-[8]. Presently, to prolong
deployable devices. To meet the demand of next Internet of the battery life up to months or even years, WSN nodes are
Things (IoT) applications, requiring a vast plurality of implemented through energy-efficient communication
interconnected wireless network nodes, this paper presents schemes combined with low-power design [7], [11]-[12]. To
the design and implementation of a WSN platform whose this end, Wi-Fi, ZigBee, and Bluetooth are popular wireless
nodes are energetically autonomous thanks to an embedded protocols which use a license-free ISM (Industrial, Scientific
photovoltaic (PV) panel associated to a rechargeable battery and Medical) frequency band. ZigBee, in particular, offers the
and a power-efficient design with optimized power- best trade-off between cost and communication distance, as
management strategy. The implemented node is able to proven by the several related papers in the literature [12]-
harvest indoor ambient light starting from 100 lux and, [16]. Combination of Wi-Fi and Zigbee are also proposed for
according to the available energy, adaptively sets the sensors power saving [17], [18]. Another solution embeds several
acquisition and RF transmission rate. Moreover, it provides radio modules to reduce energy consumption and latency for
long-distance data transmission with air data rate from 1 to neighbor discovery and opportunistic networking [19], but at
500 kbps. The WSN node device is implemented on an 8.6 x the expense of increasing both the size and cost of devices.
5.4-cm2 flexible PCB, being therefore amenable to conform Nevertheless, the use of Wi-Fi, Bluetooth and Zigbee as a low
even to curved surfaces. Comparison with commercial IoT power radio is still too costly for WSN applications. Bluetooth
nodes reveals a significant improvement in the state of the Low Energy (BLE) protocol reduces power consumption and
art. provides connection to smart phones with easy setup but has
limited operating range and is subject to royalties, which
Key Words: WSN, Internet of Things (IoT), low power, makes BLE unsuitable for WSN ubiquitous low-cost devices.A
microcontrollers, Energy harvesting, home last, profitable, approach is offered by Sub-1GHz wireless
automation,low power processors. connectivity schemes providing long distance communication
(tens of kilometers, thanks to the lower frequencies
1. INTRODUCTION exploited) in a less crowded spectrum than ISM band (769
Home/Office automation consists in the exploitation of MHz - 935 MHz), while requiring lower power Consumption
micro/nanoelectronic technology within the home/office [20]. The main disadvantage can be related to the dimension
environment to assist and enhance the quality of life/work of of the antenna and the need of an additional transceiver in
its occupants through the main goals of increasing comfort, the concentrator node. It should be also observed that most
saving energy and providing remote surveillance and real researches in the field are just proposals, and very few are
time monitoring [1]-[3]. Wireless Sensor Network (WSN) complete implementations [10]. To take both the research
platforms are exploited to implement this paradigm [4]-[6]. and implementation a step further, this paper presents a

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 07 | July 2019 www.irjet.net p-ISSN: 2395-0072

novel design of a WSN platform amenable to home/office protocols. Moreover, every node can easily act as an IoT
automation and, more generally, to IoT applications thanks gateway if connected to a processing host that collects and
to its reduced dimension and its energy autonomy. The WSN store the data coming from the sensor nodes. The flexible
nodes are able to make available information from several PCB embeds a flexible PV panel and printed integrated
sensor devices (temperature, humidity, presence, etc.) to the antenna. Thin film batteries and low-profile components are
user or to a centralized control host. also employed to achieve both compact dimensions
(compatible with the size of a credit card: 8.6 x 5.4 cm2) and
ability to conform non-flat surfaces.
Finally, the GUI provides an easy configuration tool and
allows the user to interact with the system.
The paper is organized as follows. Section II describes the
WSN node architecture, energy management strategy and first
component selection based on the energy budget
specifications (discussed in the Appendix). Example of
application and further implementation highlights are
presented in Section III, whereas experimental results are
shown in Section IV. Finally, a comprehensive performance
comparison with other implemented platforms for distributed
Fig. 1. WSN node functional block diagram sensing is reported in Section V. Concluding remarks are
. summarized in Section VI.
Low-power operation and energy efficiency are obtained
Through careful hardware and software co-design. To this II. ARCHITECTURE AND ENERGY MANAGEMENT STRATEGY
end, the microcontroller, which manages the whole ystem, OF THE WSN NODE
does not execute a rigid control algorithm but adaptively Since the WSN node must be able to periodically sense,
changes tasks and their timings by taking into account the receive, store, pre-process and transmit ambient data to a
energy available to the node and the power consumption of remote host station, its overall architecture can be divided into
each task. Long distance communication is enabled through the three main functional subsystems, namely: energy, sensor
the use of a specific radio module allowing more flexibility in and control, and communication, as shown in Fig. 1. The
frequency, modulation schemes and protocols. In particular, energy subsystem includes components and circuits that
comparing the implemented platform with existing similar supersede harvesting, storage and energy management.
solutions, the main significant advantages are summarized Sensors aimed to environmental monitoring are part of the
below: sensor and control subsystem. Of course, the type and number
1) the node is energetically autonomous; of sensors is dictated by the specific application. The
2) highly configurable RF connectivity; microcontroller manages the sensors and oversees the overall
3) the node is implemented on a flexible and compact PCB; system operation. Data from sensors are cyclically sampled
4) a Graphical User Interface (GUI) is developed and and sent to an external base station through the
provided to the final user. communication subsystem. Starting from these general
The first feature is obtained through indoor energy harvesting assumptions and considerations, the proposed platform has
from an embedded photovoltaic (PV) panel associated to a been designed as illustrated in Fig. 2 and as summarized in
rechargeable battery and through through innovative energy- Table I, where the main specifications and functions of the
aware power managing policy. Consequently, periodic human different subsystems are briefly reported. Each subsystem is
maintenance required by devices powered by a primary described in detail below.
battery is avoided. As far as the connectivity is concerned, the
proposed platform exhibits a high level of flexibility,
providing different transmission bands, protocols, and data
rates to the designer. In such a way the system can meet the
specified energy constraints and cost budget allowing the
designer to develop proprietary RF point-to-point and mesh
protocols. In particular, the system supports the realization of
mesh networks through IPv6 over Low-Power Wireless
Personal Area Networks (6LoWPAN) protocol in which every
node has its own IPv6 address, allowing direct connection to
the Internet by using open standards.
The use of point-to-point or mesh network architecture
depends upon the specific application. Indeed, if the area to be
monitored is very large, a mesh architecture would guarantee
a better coverage using a single gateway. The proposed
platform fits also this scenario by supporting different

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 2
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 07 | July 2019 www.irjet.net p-ISSN: 2395-0072

from balanced to unbalanced mode at the output of the


SPIRIT1 radio through the ultra miniaturized balun BALF-
SPI-01D3 [34]. The antenna input impedance can be
controlled by choosing the slot dimensions and the distance, d,
between the 50-Ohm micro strip line and the substrate edge.
Without substantially modifying the principles and strategies
that addressed the design of the first prototype, the second
demonstrator, shown in Fig. 6, was aimed at optimizing the
whole system form factor and at exploiting the photovoltaic
panel flexibility, with all the components soldered on the
same credit-card-size (8.6 x 5.4-cm2) flexible PCB. Starting
from the scheme in Fig. 2, several optimizations were carried
out involving the DC-DC converter section, the firmware of
the microcontroller, the radio transceiver and the antenna. In
this second version the antenna is a printed dipole antenna (as
in Fig. 4b) which does not require a balun, but only lumped
Fig. 2. Block diagram of the proposed WSN node. loss-less components for impedance transformation and
matching.
The energy subsystem includes as main elements the PV Fig. 7 shows a screenshot of the graphical user interface
panel, a rechargeable thin film battery, as well as some blocks (GUI) that was developed to allow easy interfacing between
constituting the Power Management Unit (PMU) for the sensor nodes and a concentrator connected to a computer
optimized use of the available harvested energy. through the USB port. The GUI allows to retrieve data from
WSN platform characteristics the various WSN nodes and to store them into a MySql
database. Moreover, it allows the user to set the configuration
of each node by enabling its sensors and, if required, to force
the acquisition and transmission rate. The energy
sustainability of the system has been tailored for indoor
operating environments. As an example, an “office”
application case is considered, with the following three
operating scenarios, denoted as WD, WN and WE and
illustrated in Fig. 8:

III. PROTOTYPING
Two subsequent prototypes were designed and fabricated in
order to validate the proposed platform and the energy
management strategies. The first prototype is shown in Fig. 5
and was originally conceived to allow easy monitoring and Fig. 3. Second prototype: a) top view; b) bottom view
testing as well as easy comparison of different solutions and
components in terms of performance and power IV. EXPERIMENTAL VALIDATION
consumptions. It implements the architecture discussed in the Experimental measurements were performed to initially verify
previous section by distributing the various devices on two the operating states of individual sections of the node and
different PCBs: a motherboard and a daughterboard. Among their targeted current consumptions. These contributes were
the possible alternatives, a point-to-point communication aggregated to evaluate the energy weights associated to the
protocol with acknowledgement, directly accessing the link expected three operating scenarios defined in Sec. 3. Then,
layer of the SPIRIT1, was adopted. This design choice has overall system functionality was checked, and main sequences
been adopted for a proficient transmission of short messages tested to verify that an optimum trade-off between
from different nodes to a single centralized control host. The functionalities and energy constraints was met. The input
motherboard includes the components constituting the sensor scattering parameter, |S11|, of the slot antenna has been
and control subsystems as well as the main components of the measured and, although the resonance is at a higher frequency
energy subsystem. The daughterboard includes the PV panels, than that predicted by simulations, the antenna is well
ambient light sensor and the integrated monopole slot antenna. matched at 868 MHz, as it is apparent from Fig.10. The folded
It is fed by a 50-Ohm micro strip and requires transformation dipole antenna exhibits similar gain and radiation power

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 3
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 07 | July 2019 www.irjet.net p-ISSN: 2395-0072

pattern. However, it was not characterized standalone but,


directly in the system. The overall system was then evaluated.
With reference to the flow chart shown in Fig. 8, two main
sequences were considered: the former includes the system
awakening, initialization, after-awakening controls, and a
complete cycle of sensor data acquisition (sequence A); the
latter includes, in addition to the previous phases, also the
final power-hungry phase of data transmission to the
concentrator node (sequence B). As previously stated, the
transmission phase requires a relatively long period to charge
the supercapacitor with the energy required for two
transmissions (the first one, optional, for synchronization
purposes and the other, mandatory, for data transmission). The
use of the supercapacitor allows sustaining the current
absorption peaks required by the RF communication without
relying on the battery.
Fig. 11 shows the measured current consumption during the
two aforementioned operating sequences. Sequence A, as
illustrated in Fig. 11a, starts at 1.6 s and ends at 4.4 s. Its
average current consumption is 662 A, with an average
charge consumption of 0.52 A/h. Assuming an average
operating battery level of 3.9 V, the average power
consumption is 2.58 mW. Sequence B, as illustrated in Fig.
11b, starts approximately at 2 s. After initial sensor data
acquisition, the supercapacitor

Fig. 5. Measured current consumption: a) sensor data reading and storage,


b) sensor data reading and precharge of supercapacitor

Fig. 4. Measured slot antenna scattering parameter

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 4
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 07 | July 2019 www.irjet.net p-ISSN: 2395-0072

Fig. 12. Ambient parameters acquired over 4 days:


a) temperature, b) pressure, c) humidity, d) ambient light.

V. COMPARISON WITH RESULTS

The main features of the proposed platform were


compared to those of other solutions designed for
distributed sensing. The evaluation is carried out by
considering [8] and [35], where an extensive survey of the
state of the art of IoT nodes is performed. In order to make
a fair comparison, we considered a number of 58 IoT
commercial devices that are implemented on PCB, out of
142 included in [8] and [35] at the date of writing. First of
all, it is worth noting that the proposed sensor node is the
only one exploiting energy harvesting based on PV cells. It
also follows from the comparison that the maximum size
(along three dimensions) of the proposed device (86 mm)
is slightly higher than the average value, equal to 62 mm,
of the considered 58 devices. Nonetheless, it is worth
noting that the overall volume of the proposed node, equal
to 13 932 mm3, is much lower (about an order of
magnitude) than the average value, equal to 130 360 mm3
[35]. This is mainly due to the low thickness of the overall
assembled system in Fig. 6, which is equal to 3 mm only.
Fig. 13a shows the distribution of the sensitivity of RF
receivers of the IoT devices (in this case, all the 142
devices in [35] are considered). It is apparent that the
transceiver adopted in this work exhibits the best
performance, which is 21 dBm

Fig. 6. Performance comparison with commercial devices on PCB reported


in [35] a) RF receiver sensitivity; b) number of devices embedding each type
of sensor.

lower than the average value. In addition, the proposed


node shows the highest value of the maximum transmit
power, equal to 16 dBm (the average value is 6 dBm).
Finally, the proposed system has the highest level of
configurability in terms of RF carrier frequency, as
detailed in Section II.C, whereas most of the commercial
products (nearly 60%) adopts Bluetooth, ZigBee or WiFi
protocols operating in the ISM 2.4-GHz band. Only
Waspmote shows a similar level of flexibility and,
moreover, is the only other device equipped with NFC
interface. Regarding power consumption, the standby
current of the proposed device, equal to 3 A, is only 30%
of the average value of 9.6 A [35]. Finally, Fig. 13b
illustrates the number of devices embedding different
types of sensors. The histogram shows that the proposed
solution embeds four of the sensors, namely temperature,
humidity, accelerometer, and pressure that are mostly
present in all devices. It is worth noting that other sensors
can be easily added to the node by exploiting the onboard
I2C interface.
Aa a result, the comparison with the state of the art shows
that the proposed platform has remarkable advantages in

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 5
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 07 | July 2019 www.irjet.net p-ISSN: 2395-0072

terms of system configurability, dimensions and standby Storage. The EFL700A39 rechargeable solid-state lithium
power that allows to satisfy many potential different thin-film battery has a capacity of 700 μAh. Its operating
applications with better performance than other similar voltage ranges from 3.6 V to 4.2 V. It can also provide
commercial solutions. maximum a continuous discharge current of 5 mA and a
maximum pulsed discharge current of 10 mA.
VI. CONCLUSION Current consumption. Current consumption of each
An innovative WSN platform expressly conceived for component has been evaluated in the three different
ambient monitoring in indoor environments, but which operating modes (sleep, run and peak) by taking into
could be efficiently applied also in other IoT applications, account the electrical characteristics included in the
has been proposed, designed and experimentally tested. datasheets and summarized in Table III. These data take
It consists of a self-powered autonomous sensor node that into account consumption of external RTC, ambient
exploits embedded PV panels to harvest the energy, a sensor, power management, microcontroller and RF
microcontroller, a RF transceiver (plus antenna) and module.
different sensors. Energy Sustainability. The best trade-off between energy
The main strength of the prototype is to achieve the sustainability and expected performance was met by
desired (complex) functionality in a small volume with selecting a suitable number of acquisition and
very low power consumption while ensuring ambient transmission cycles within the different scenarios WD, WN
monitoring even during night hours. As an example of and WE. The energy sustainability of the WSN node can be
application, the proposed system was tailored for hence ascertained. Table II shows the amount of charge
measuring ambient light, temperature, humidity and and duration in the envisaged operating scenarios.
pressure inside a typical office that alternates working Combining consumption and energy production data
hours with artificial light and dark hours during night, together, the battery charge and, consequently, the system
week-ends or holydays. energy balance was evaluated. Figure 14 shows the
The implemented node can harvest indoor ambient light battery state of charge during the four weeks, assuming
starting from 100 lux and, according to the available that the battery is fully charged when the system is
energy, adaptively sets the sensors acquisition and RF switched on. In the worst case (i.e., at the end of the
transmission rate. Moreover, it provides relatively long- weekend) the battery charge is still above 20% ensuring
distance data transmission (tens of meters) with air data an adequate lifetime. Moreover, along the week the system
rate from 1 to 500 kbps. The WSN node device is is able to fully recharge the battery. In particular, it is fully
implemented on a flexible PCB and occupies the same area recharged at the beginning of every WE, confirming a
of a credit card. positive energy balance. In case of a prolonged absence of
A comprehensive comparison with other commercial IoT light, the power manager will disconnect the battery to
systems implemented on a PCB shows that the proposed preserve its lifetime and to avoid a condition of over
platform represents a sensible advance of the state of the discharge. Later, when the energy source will be available
art thanks to its very high flexibility, low standby power again, the platform is able to restart its functionality,
consumption and small volume without the user intervention, reconnecting the battery
and requesting a new operating configuration from the
VII.APPENDIX central node, as showed in the flow diagram in Fig. 9.
The energy storage devices of the WSN node and its worst- Finally, the base station can adapt the acquisition and
case power consumption have been tailored by specifying transmission rate depending on the residual charge level
acquisition and data transmission rates to reach the of the battery.
energy balance, also on the basis of the system
architecture described in Sec. II, of the available energy
source, and of the “office” case study selected in Sec. III.
Energy Source. Each PV module provides a maximum
output power of about 46 μW under a radiation of 300 lux.
Since the PV panel is made up of 2 strings of 3 series-
connected modules (Fig. 3), the total power from the PV
panel, Ppanel, is 276 μW. Moreover, SPV1050 has a power
conversion efficiency of 77% and an efficiency of 96%
related to the Maximum Power Point Tracker (MPPT)
algorithm, thus the available output power is: Pavail =
Ppanel 0.96 0.77 = 204 μW. Assuming a nominal battery
voltage of 3.9 V, and 8 h of light per working day, the WPN
node can store a charge of: 204 μW 8 h / 3.9 V = 418.5 Fig. 14. Battery state of charge during four weeks and
μAh. different scenarios

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 6
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 07 | July 2019 www.irjet.net p-ISSN: 2395-0072

VIII.REFERENCES ZigBee-based integrated remote controller,” IEEE Trans.


[1] J. Byun, B. Jeon, J. Noh, Y. Kim, and S. Park, “An on Consumer Electron., vol.55, no. 3, pp. 1300-1307, August
intelligent self-adjusting sensor for smart home services 2009.
based on ZigBee communications,” IEEE Trans. Consum. [15] J. Han, H. Lee, and K.-R. Park. “Remote-controllable
Electron., vol. 58, no. 3, pp. 794–802, Aug. 2012. and energy-saving room architecture based on ZigBee
[2] T. W. Foster, D. Vardhan Bhatt, G. P. Hancke, and B. communication,” IEEE Trans. Consumer Electron., vol. 55,
Silva, “A Web-Based Office Climate Control System Using no 1, pp. 264-268, Feb. 2009.
Wireless Sensors”, IEEE Sensors Journal, vol. 16, no. 15, [16] A. Wheeler, “Commercial Applications of Wireless
pp.6104-6113, Aug. 2016. Sensor Networks Using ZigBee,” IEEE Communications
[3] S. D. T. Kelly, N. K. Suryadevara and S. C. Magazine, vol. 45, no. 4, pp. 70–77, April 2007.
Mukhopadhyay, “Towards the Implementation of IoT for [17] H. Qin and W. Zhang, “Zigbee-assisted power saving
Environmental Condition Monitoring in Homes,” IEEE management for mobile devices,” IEEE Trans. Mobile
Sensors Journal, vol. 13, no. 10, pp.3846-3853, Oct. 2013. Computing, vol. 13, no. 12, pp. 2933–2947, Dec 2014.
[4] K. Shafiullah, K.P. Al-Saki, and A.A. Nabil, Wireless [18] R. Zhou, Y. Xiong, G. Xing, L. Sun, and J. Ma, “ZiFi:
Sensor Networks - Current Status and Future Trends, CRC Wireless LAN Discovery via ZigBee Interference
Press, 2012. Signatures,” in Annual International Conference on Mobile
[5] F. Viani, F. Robol, A. Polo, P. Rocca, G. Oliveri, and A. Computing and Networking. ACM, 2010.
Massa, “Wireless architectures for heterogeneous sensing [19] R. Pozza, M. Nati, S. Georgoulas, K. Moessner, and A.
in smart home applications: Concepts and real Gluhak, “Neighbor Discovery for Opportunistic
implementation,” Proc. IEEE, vol. 101, no. 11, pp. 2381– Networking in Internet of Things Scenarios: A Survey,”
2396, Nov. 2013. IEEE Access, vol. 3, pp. 1101–1131, 2015.
[6] C. Gomez and J. Paredells, “Wireless home automation [20] STMicroelectronics, “Wireless connectivity for IoT
networks: A survey of architectures and technologies,” applications,” [Online].
IEEE Communications Magazine, vol. 48, no. 6, pp. 92-101, http://www.st.com/resource/en/brochure/brwireless_w
2010. eb.pdf
[7] M. Alioto, Ed., Enabling the Internet of Things—From [21] ST Microelectronics, “Ultralow power energy
Integrated Circuits to Integrated Systems. New York: harvester and battery charger”, SPV1050 datasheet, Nov.
Springer-Verlag, 2017. 2013 [Revised Aug. 2015].
[8] M. Alioto and M. Shahghasemi, “The Internet of Things [22] ST Microelectronics, “EnFilm™ - rechargeable solid-
on Its Edge: Trends Toward Its Tipping Point,” IEEE state lithium thin film battery”, EFL700A39 datasheet, Apr.
Consumer Electronics Magazine, vol. 7, no. 1, pp. 77-87, Jan. 2010 [Revised June 2014].
2018. [23] F. Pulvirenti, A. La Scala, D. Ragonese, K. D’Souza, G.
[9] B. Martinez, M. Monton, I. Vilajosana, and J. Prades, M. Tina, and S. Pennisi, “4-Phase Interleaved Boost
“The Power of Models: Modeling Power Consumption for Converter with IC Controller for Distributed Photovoltaic
IoT Devices,” IEEE Sensors Journal, vol. 15, no. 10, pp. Systems,” IEEE Trans. Circ. Syst.—I: Reg. Pap., vol. 60, no.
5777–5789, Oct. 2015. 11, Nov. 2013.
[10] M. Magno, F. Ait Aoudia, M. Gautier, O. Berder, L. [24] K. K. Tse, B. M. T. Ho, H. S.-H. Chung, and S. Y. Ron Hui,
Benini, “WULoRa: An Energy Efficient IoT End-Node for “A comparative study of maximum-power-point trackers
Energy Harvesting and Heterogeneous Communication,” for photovoltaic panels using switching-frequency
in Proc. of the Conference on Design, Automation and Test in modulation scheme,” IEEE Trans. Ind. Electron., vol. 51, no.
Europe, DATE’17, Lausanne, 2017, pp. 1528–1533. 2, pp. 410–418, Apr. 2004.
[11] M. Magno, S. Marinkovic, D. Brunelli, E. Popovici, B. [25] A.D. Grasso, S. Pennisi, “A Micro-Scale Inductorless
O'Flynn and L. Benini, “Smart power unit with ultra low MPPT DC-DC Converter”, IET Power Electronics, Vol. 6, No.
power radio trigger capabilities for wireless sensor 8, pp. 1634–1639, Sept.
networks,” in Proc. of the Conference on Design, [26] ST Microelectronics, “MEMS digital output motion
Automation and Test in Europe, ser. DATE ’12. San Jose, CA, sensor: ultra-low-power high-performance 3-axis "nano"
2012, pp. 75–80. accelerometer”, LIS3DH datasheet, May 2010 [Revised
[12] A. A. Aziz, Y. A. Sekercioglu, P. Fitzpatrick, and M. Dec. 2016].
Ivanovich, “A survey on distributed topology control [27] ST Microelectronics, “Capacitive digital sensor for
techniques for extending the lifetime of battery powered relative humidity and temperature”, HTS221 datasheet,
wireless sensor networks,” IEEE Communications Surveys May 2014 [Revised Aug. 2016].
Tutorials, vol. 15, no. 1, pp. 121–144, 2013. [28] ST Microelectronics, “MEMS pressure sensor: 260-
[13] K. Gill, S.-H. Yang, F. Yao, and X. Lu. “A ZigBee-Based 1260 hPa absolute digital output barometer”, LPS25H
Home Automation System,” IEEE Trans. on Consumer datasheet, Jul. 2013 [Revised Apr. 2016].
Electron., vol. 55, no. 2, pp. 422-430, May 2009. [29] ST Microelectronics, “Ultra-low-power 32-bit MCU
[14] I-K Hwang, D-Sung Lee, J-Wk Baek, “Home network Arm®-based Cortex®-M0+, up to 64 KB Flash memory, 8
configuring scheme for all electric appliances using

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 7

Potrebbero piacerti anche