Upload
nishant-shristiraj
View
78
Download
1
Embed Size (px)
Citation preview
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 1
INTRODUCTION
1.1 Statement of problem Lack of mobility in certain group of dependents and disabled people forces them
to spend a lot of time at home. In many cases this limitation bounds them within the four
walls of a specific room such as bedroom or living room in the house, where the security
of such dependent population becomes a matter of concern when they are alone.
Reducing the digital divide by using simpler and semi-automatic techniques leads to
better adaptability in this age group and easy access for people with disabilities.
In recent years, the elderly population (age 60+) in the India has rapidly expanded
and continues to grow at an exponential rate. In the United States, the current size of the
elderly population is approximately 35 million and it is projected to be 53 million by
2020 and 77 million by 2040.Within this population, several people have one or more
disabilities as well as difficulty performing normal activities of daily living.In 1995,
52.5% of the elderly population reported having at least one disability and about one-third
reported having a severe disability.Usually they have health issues and bad physical
mobility, and sometimes, when they have some type of problem, it is complicated for the
authorities or the health care services to notice that they are in trouble.
1.2 Objective
The objective of this project is to design a home which helps the people above the
age of 60 and with disabilities, to operate devices such as lights, fans, etc., inside the
house with minimal technical hindrance, so that their reluctance to adapt to latest
technology can be taken care of. It also incorporates pre-defined actions in case of any
internal threats. It implements the algorithm for speech processing (light, fan, water
heater) and wireless sensor network for controlling the home appliances (gas,
temperature, fire). It also incorporates the sensor module for automatic control.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 2
1.3 Motivation
Nowadays the presence of home automation and environmental control systems in
homes and in public buildings has been increased. These systems are capable of
automating a home through energy management, safety, welfare and communication
allowing a more efficient use of energy available and therefore contribute greatly to the
sustainable development of our society. There are several different home automation
technologies around the world for choosing, with their own advantages and
disadvantages. With the popularity of mobile devices today and the emergence of smart
home devices, the general population is becoming more and more comfortable with their
use. There have been multiple attempts to use these devices to control and communicate
with home appliances remotely; creating what is known as the Internet of Things (IoT).
However, a key challenge of using these smart devices is that many of their Graphical
User Interface (GUI) controls are difficult to be used by the disabled.
1.4 Solutions
A speech processing module is used to record the voice of the member in the
house. The recorded speech is then processed and the processed data is sent to the
microcontroller to switch on/off the devices. Different sensors are incorporated which
works automatically without any manual interference. The two independent sensors
implemented in this project are Gas sensor and Smoke sensor. Whenever there is any
unwanted smoke or gas leakage, an alarm will be raised. A GSM module is used, which
sends a message to the registered mobile in case of any such threat. The gas sensor part is
linked with a solenoid valve, which automatically cuts the LPG supply from the pipe
itself.
Another featured solution is automatic working of devices, namely fan and lights
through temperature sensor and LDR. The fan is automatically switched on when the
temperature crosses a predefined threshold level and switched off when at normal
temperature. LDR makes sure that there is sufficient sunlight inside the room, if not,
lights will switch on automatically. The user has a choice to switch between automatic
working of these components or control them manually.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 3
1.5 Report Organisation This report is presented in 7 chapters and is organized as follows:
Chapter 2 gives the literature review on existing home automation and security
methodologies such as Web based automation, B-Live home, Home theatre personal
computers, home automation using BUI (Brain User Interface).
Chapter 3 explains the methodology adopted to achieve the objectives and detailed
explanation of the block diagram and different functional components in the project.
Chapter 4 gives the description of different hardware components used along with their
working and software invoking methods and software description.
Chapter 5 highlights the results of different sensors, GSM module and devices connected
through relays and output is displayed on the LCD.
Chapter 6 presents the advantages, conclusion and future scope of the project work.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 4
LITERATURE SURVEY
The following literature survey will help in analysing the project requirements and
also detailed study of challenges in the existing system.
This paper “Home Automation to Promote Independent Living in Elderly
Population” by A. M. Cole and B. Q. Tran [1] designs a toolkit for independent living has
been developed to monitor activity and automate daily tasks and routines for elderly
persons living at home. Off-the-shelf components manufactured by x10, Inc., which
operate via radio frequency and power line carrier technology, can be integrated into
existing living environments to promote home security, home safety, and independent
living. Accompanying software has been developed to passively monitor and trend
activity patterns within the home in order to predict changes in health status and early
onset of chronic illness. The independent living toolkit serves to promote health
maintenance and active engagement within the aging population.
This paper “Home Automation based Sensor System for Monitoring Elderly
People Safety” by J. A. Nazabal.... [2] describes the work to develop a low cost home
automation based sensor system for remote monitoring the behaviour of elder people at
their own homes. With a combination of data obtained from strategically placed sensors
and a series of editable rules, an abnormal behaviour can be detected and the
corresponding action taken.
This paper “B-Live - A Home Automation System for Disabled and Elderly
People” by Vasco Santos.... [3] describes the architecture, operation and implementation
of the B-Live home automation system. This system has been developed at Micro I/O for
assisting elderly and disabled people in their homes. The paper also discusses the
demonstrator deployed at the CMRRC RoviscoPais and proposes an improved
information exchange mechanism for the B-Live system.
This paper “Design and Implementation of a Wi-Fi Based Home Automation
System” by Ahmed ElShafee and Karim AlaaHamed [4] presents a design and prototype
implementation of new home automation system that uses Wi-Fi technology as a network
infrastructure connecting its parts. The proposed system consists of two main
components; the first part is the server (web server), which presents system core that
manages, controls, and monitors users’ home. Users and system administrator can locally
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 5
(LAN) or remotely (internet) manages and control system code. Second part is hardware
interface module, which provides appropriate interface to sensors and actuator of home
automation system. Unlike most of available home automation system in the market the
proposed here system is scalable that one server can manage many hardware interface
modules as long as it exists on Wi-Fi network coverage. System supports a wide range of
home automation devices like power management components, and security components.
The proposed system is better from the scalability and flexibility point of view than the
commercially available home automation systems.
This paper “Vision-Based Displacement Sensor for People with Serious Spinal
Cord Injury” by Chao Zhang.... [5] explains that spinal injuries occur due to accidents,
such as traffic accidents, accidental falls both on the job and at home and sports accidents.
In the case of serious spinal cord injury patient’s physical abilities are mostly limited to
the neck and head. This paper develops a vision-based interface system for these serious
disabled patients with such as spinal injuries. The system consists of one web video
camera and a desktop computer. In this paper a robust object search algorithm is
developed. It enables accurate measurement of displacement by tracking features on the
patient’s face without any other sensors. The efficacy of the vision-based interface system
for measuring dynamic facial movement was demonstrated through a comparison with a
previously developed system to use conventional template matching algorithm.
This paper “Augmented Reality Control Home (ARCH) for Disabled and Elderly”
by Leroy Zi Wei Tang.... [6] describes that partially disabled people and elderly need care
givers in their daily routine, including performing simple activities such as reaching out
for switches and electrical appliances. The ageing population in Singapore has increased
tremendously which will lead to more demand for care givers and domestic helpers. But
they incur much cost. With the popularity of mobile devices and the emergence of smart
home devices today, it is possible to control and communicate with home appliances
remotely. In this paper, we will describe how we implemented augmented reality, voice
control & web server to control these home electrical appliances for elderly and disabled.
This paper “Improving the quality of life of dependent and disabled people
through home automation and Tele-assistance” by AnidoRifon.... [7] describes lack of
mobility in certain groups of dependents forces them to spend a lot of time at home. In
many cases, this limitation makes these people to stay most of the time in a specific room
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 6
in their houses such as the bedroom or living room, where the only means of
entertainment and information gathering is the TV set. Most of present-day households
have a personal computer, but the digital divide and lack of adaptation produces certain
rejection in this population group. This paper discusses a proposal that leverages the
familiar TV set to be used as the user interface for a complete Tele-assistance system and
control centre of home automation devices. For this, the system makes use of a Home
Theatre Personal Computer (HTPC) connected to the TV and offers the features like the
monitoring and remote monitoring of a wide range of vital signs, intelligent adaptation of
services and interfaces according to the level and type of disability, and centralized
control of home automation devices installed at home.
This paper “Review On: Home Automation System for Disabled People Using
BCI” by S.P.Pande1 and PravinSen [8] describes the development in home automation is
moving forward towards the future in creating the ideal smart homes environment.
Optionally, home automation system design also been develop for certain situation which
for those who need a special attention such as old age person, sick patients, and
handicapped person. A brain computer interface (BCI), often called a mind-machine
interface (MMI), or sometimes called a brain machine interface (BMI), it is a direct
communication pathway between the brain and an external device. A brain computer
interface (BCI) is a device that enables severely disabled people to communicate and
interact with their environments using their brain waves. Most research investigating BCI
in humans has used scalp-recorded electroencephalography or intracranial
electrocorticography. The use of brain signals obtained directly from stereotactic depth
electrodes to control a BCI has not previously been explored. In this paper, we present a
smart home automation system using brain computer interface. The scope of this research
work will include the control and monitoring system for home appliances from Graphical
User Interface (GUI) using brain computer interface that use an input source and being
control wirelessly. The research methodology involved is application of knowledge in the
field of radio frequency communication, microcontroller and computer programming.
Finally, the result will be observed and analyze to obtain better solution in the future.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 7
METHODOLOGY
3.1 BLOCK DIAGRAM
Fig. 3.1: General block diagram General block diagram of E- Assistance for Elderly and Disabled is shown in figure
3.1. The microcontroller is the heart of the model. It receives the signals from different
sensors through the ADC and executes the actions accordingly. The 4- bit digital data is
also fed as an input to the controller and the output is given to the driver and relay circuit
to drive different components. The different values of the sensors and their corresponding
changes are displayed on the LCD. A switch is provided for the user to select between
manual and automatic working of temperature sensor and LDR. The output unit consists
of a GSM module, which is used for sending messages. The solenoid valve is used to
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 8
block the LPG pipe in case of any unwanted gas leakage. An alarm is raised in case of
unwanted smoke or gas leakage.
3.2 WORKING
The sensor network consists of four different sensors, namely Gas sensor, Smoke
sensor, Temperature sensor and LDR. The temperature sensor senses the surrounding
temperature and if the temperature is above a predefined value, it automatically switches
on the fan as shown in this project. The LDR ensures that there is enough sunlight inside
a room. If not, then its conductivity increases and it automatically switches on the lights
in the rooms. This process also ensures conservation of energy. The temperature and LDR
values are sent to the microcontroller, the output from the microcontroller is given to the
driver and it drives the relays which in turn control the devices. This process ensures
complete security and comfort for the elderly and disables people.
The devices can also be controlled manually by using the Speech Processing
module. The toggle switch has to be turned into manual mode; the user can record up to
14 different voices, to control 7 devices or different user to control different devices.
Each voice sample can be up to 2 seconds and control the devices through the relays.
The Gas sensor can be located on the top of the LPG cylinder. The solenoid valve
functions in accordance with the gas sensor. When in normal working of the cylinder, the
solenoid remains in on position. When there is an unwanted leakage, the gas sensor
senses the leakage and raises an alarm. The solenoid valve is then turned off and the LPG
supply is cut from the main cylinder. Simultaneously, a message is sent to the registered
mobile regarding the same.
The smoke sensor works in a similar manner. Any unwanted smoke, if detected
inside the house, raises an alarm and a message is sent to the same registered mobile
number regarding the same.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 9
HARDWARE AND SOFTWARE COMPONENTS
In this chapter we will have an Introduction to Microprocessors, Microprocessors
Basics, Types of Microcontrollers, Instruction set and Memory architecture of each
microcontroller, comparison between microcontrollers, why PIC Microcontrollers, Types
of PIC, why PIC 16F877A, Pin diagram and its description, Architecture, ADC, UART,
smoke sensor, temperature sensor, gas sensor, LDR, GSM, speech module, buzzer, driver
and relay, solenoid valve, switch, LCD and the software to give a decent idea about the
components used in this project.
4.1 MICROCONTROLLER UNIT
4.1.1 Introduction A microcontroller (μC or uC) is a solitary chip microcomputer fabricated from
VLSI fabrication. A micro controller is also known as embedded controller. Today
various types of microcontrollers are available in market with different word lengths such
as 4bit, 8bit, 64bit and 128bit microcontrollers. Microcontroller is a compressed
microcomputer manufactured to control the functions of embedded systems in office
machines, robots, home appliances, motor vehicles, and a number of other gadgets. A
microcontroller comprises of components like – memory, peripherals and most
importantly a processor. Microcontrollers are basically employed in devices that need a
degree of control to be applied by the user of the device.
4.1.2 Types of Microcontrollers
Microcontrollers are divided into categories according to their memory, architecture, bits
and instruction sets. So let’s discuss types of microcontrollers:-
4.1.2.1 BITS:
8 bits microcontroller executes logic & arithmetic operations. Examples of 8 bits
micro controller is Intel 8031/8051.
16 bits microcontroller executes with greater accuracy and performance in contrast
to 8-bit. Example of 16-bit microcontroller is Intel 8096.
32 bits microcontroller is employed mainly in automatically controlled appliances
such as office machines, implantable medical appliances, etc. It requires 32-bit
instructions to carry out any logical or arithmetic function.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 10
4.1.2.2 MEMORY:
External Memory Microcontroller – When an embedded structure is built with a
microcontroller which does not comprise of all the functioning blocks existing on a
chip it is named as external memory microcontroller. For illustration- 8031
microcontroller does not have program memory on the chip.
Embedded Memory Microcontroller – When an embedded structure is built with
a microcontroller which comprise of all the functioning blocks existing on a chip it
is named as embedded memory microcontroller. For illustration- 8051
microcontroller has all program & data memory, counters & timers, interrupts, I/O
ports and therefore its embedded memory microcontroller.
4.1.2.3 INSTRUCTION SET:
CISC- CISC means complex instruction set computer, it allows the user to apply 1
instruction as an alternative to many simple instructions.
RISC- RISC means Reduced Instruction Set Computers. RISC reduces the
operation time by shortening the clock cycle per instruction.
4.1.2.4 MEMORY ARCHITECTURE:
Princeton Memory Architecture Microcontroller
Harvard Memory Architecture Microcontroller
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 11
4.1.3 Comparison between different Microcontrollers:
Tab 4.1 Comparison between different microcontrollers courtesy: www.slideshare.net
4.1.4 Why PIC Microcontroller? PIC Microcontrollers are quickly replacing computers when it comes to
programming robotic devices. These microcontrollers are small and can be programmed
to carry out a number of tasks and are ideal for school and industrial project. PIC is a
family of Harvard architecture microcontrollers made by Microchip Technology, derived
from the PIC1640 originally developed by General Instrument’s Microelectronics
Division.
PICs are popular with both industrial developers and hobbyists alike due to their
low cost, wide availability, large user base, extensive collection of application notes,
availability of low cost or free development tools, and serial programming (and re-
programming with flash memory) capability.PIC has a very simple instruction set along
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 12
with that it also has an in- build ADC which is necessary for interfacing various sensors.
It also has two ports for serial communication which is required in this project.
Hence PIC Microcontroller is a better choice for this project.
4.1.5PIC16F87XA Device Features:
Tab 4.2 PIC 16F87XA Device Features courtesy: www.circuitstoday.com
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 13
4.1.6 WHY PIC16F877A?
Fig. 4.1 PIC 16F877A Microcontroller Module
4.1.6.1 High-Performance RISC CPU:
•Only 35 single-word instructions to learn
• All single-cycle instructions except for program branches, which are two-cycle
• Operating speed: DC – 20 MHz clock input, DC – 200 ns instruction cycle
• Up to 8K x 14 words of Flash Program Memory, Up to 368 x 8 bytes of Data Memory
(RAM),
Up to 256 x 8 bytes of EEPROM Data Memory
4.1.6.2 Peripheral Features:
• Timer0: 8-bit timer/counter with 8-bit prescaler
• Timer1: 16-bit timer/counter with prescalar, can be incremented during Sleep via
external
Crystal/clock
• Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler
• Two Capture, Compare, PWM modules
- Capture is 16-bit, max. Resolution is 12.5 ns
- Compare is 16-bit, max. Resolution is 200 ns
- PWM max. Resolution is 10-bit
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 14
4.1.6.3 CMOS Technology:
• Low-power, high-speed Flash/ EEPROM technology
• Fully static design
• Wide operating voltage range (2.0V to 5.5V)
• Commercial and Industrial temperature ranges
• Low-power consumption
4.1.7 Pin Diagram and its Description:
The 40 pins make it easier to use the peripherals as the functions are spread out
over the pins. This makes it easier to decide what external devices to attach without
worrying too much if there are enough pins to do the job.
One of the main advantages is that each pin is only shared between two or three functions
so it’s easier to decide what the pin function (other devices have up to 5 functions for a
pin).
Fig. 4.2 PIC 16F877A Pin Diagram courtesy: www.electrosome.com
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 15
4.1.7.1 DESCRIPTION OF EACH PIN:
Tab. 4.3 Pin details of PIC 16F877A courtesy: www.learn.mikroe.com
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 16
4.1.8 Architecture of PIC 16F877A MICROCONTROLLER
The PIC 16F877A microcontroller architecture comprises of CPU, I/O ports,
memory organization, A/D converter, timers/counters, interrupts, serial communication,
oscillator and CCP module which are discussed in detailed below.
Fig. 4.3 Architecture of PIC16F877A courtesy: www.edgefx.in
CPU (Central Processing Unit) - It is not different from other microcontrollers CPU and
the PIC microcontroller CPU consists of the ALU, CU, MU and accumulator,
etc. Arithmetic logic unit is mainly used for arithmetic operations and to take logical
decisions. Memory is used for storing the instructions after processing. To control the
internal and external peripherals, control unit is used which are connected to the CPU and
the accumulator is used for storing the results and further process.
Memory Organization-The memory module in the PIC microcontroller architecture
consists of RAM (Random Access Memory), ROM (Read Only Memory) and STACK.
I/O Ports-The series of PIC16F877A consists of five ports such as Port A, Port B, Port C,
Port D & Port E.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 17
Port A is a 16-bit port that can be used as input or output port based on the status
of the TRISA (Tradoc Intelligence Support Activity) register.
Port B is an 8- bit port that can be used as both input and output port.
Port C is an 8-bit and the input of output operation is decided by the status of the
TRISC register.
Port D is an 8-bit port acts as a slave port for connection to the microprocessor
BUS.
Port E is a 3-bit port which serves the additional function of the control signals to
the analog to digital converter.
A/D converters-The main intention of this analog to digital converter is to convert analog
voltage values to digital voltage values. A/D module of PIC microcontroller consists of 5
inputs for 28 pin devices and 8 inputs for 40 pin devices. The operation of the analog to
digital converter is controlled by ADCON0 and ADCON1 special registers. The upper
bits of the converter are stored in register ADRESH and lower bits of the converter are
stored in register ADRESL. For this operation, it requires 5V of an analog reference
voltage.
Timers/ Counters-PIC microcontroller has four timers/counters wherein the one 8-bit
timer and the remaining timers have the choice to select 8 or 16-bit mode. Timers are
used for generating accuracy actions, for example, creating specific time delays between
two operations.
Interrupts-PIC microcontroller consists of 20 internal interrupts and three external
interrupt sources which are associated with different peripherals like ADC, USART,
Timers, and so on.
Serial Communication-Serial communication is the method of transferring data one bit
at a time sequentially over acommunication channel. The different serial ports available
are:
USART: The name USART stands for Universal synchronous and
Asynchronous Receiver and Transmitter which is a serial communication
for two protocols. It is used for transmitting and receiving the data bit by
bit over a single wire with respect to clock pulses. The PIC microcontroller
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 18
has two pins TXD and RXD. These pins are used for transmitting and
receiving the data serially.
SPI Protocol: The term SPI stands for Serial Peripheral Interface. This
protocol is used to send data between PIC microcontroller and other
peripherals such as SD cards, sensors and shift registers. PI
microcontroller support three wire SPI communications between two
devices on a common clock source. The data rate of SPI protocol is more
than that of the USART.
I2C Protocol: The term I2C stands for Inter Integrated Circuit, and it is a
serial protocol which is used to connect low speed devices such as
EEPROMS, microcontrollers, A/D converters, etc.
PICmicrocontroller support two wires Interface or I2C communication
between two devices which can work as both Master and Slave device.
Oscillators-Oscillators are used for timing generation. PIC microcontroller consists of
external oscillators like RC oscillators or crystal oscillators, where the crystal oscillator is
connected between the two oscillator pins. The value of the capacitor is connected to
every pin that decides the mode of the operation of the oscillator. The modes are crystal
mode, high-speed mode and the low-power mode. In case of RC oscillators, the value of
the resistor & capacitor determines the clock frequency and the range of clock frequency
is 30 KHz to 4MHz.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 19
4.1.9 ADC
An analog-to-digital converter (ADC, A/D, A–D, or A-to-D) is a device that
converts a continuous physical quantity (usually voltage) to a digital number that
represents the quantity's amplitude.
In PIC 16F877A, the Analog to Digital(ADC) Converter module has five inputs
for the 28- pin devices and eight inputs for the 40/44 pin devices. The conversion of an
analog input signal results in a corresponding 10-bit digital number.
The A/D module has high and low-voltage reference input that is software
selectable to some combination of Vdd, Vss, RA2 or RA3.The A/D converter has a
unique feature of being able to operate while the device is in sleep mode. To operate in
sleep, the A/D clock must be derived from the A/D’s internal RC oscillator.
The A/D module has four registers. These registers are,
A/D Result High Register(ADRESH)
A/D Result Low Register (ADRESL)
A/D Control Register (ADCON0)
A/D Control Register (ADCON1)
The ADCON0 register controls the operation of the A/D module. The ADCON1
register configures the functions of the port pins. The port pins can be configured as
analog pins or as digital I/O.
4.1.9.1 DESCRIPTION OF ADCON0 REGISTER:
Fig. 4.4 ADCON0 Register courtesy: www.whitewolfslair.wordpress.com
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 20
Fig. 4.5 ADCON0 Bit description courtesy: www.wm-help.net
4.1.9.2 DESCRIPTION OF ADCON1 REGISTER:
Fig. 4.6 ADCON1 Register courtesy: www.whitewolfslair.wordpress.com
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 21
Fig. 4.7 ADCON1 Bit description courtesy: www.wm-help.net
4.1.9.3 ADRESH and ADRESL: The registers contain the 10-bit result of the A/D
conversion. When the A/D conversion is complete, the result is loaded into this A/D
result register pair, the GO/ DONE bit (ADCON0<2>) is cleared and the A/D interrupt
flag bit ADIF is set.
Fig. 4.8 A/D Result Justification courtesy: www.ermicro.com
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 22
4.1.10 UART
UART stands for Universal Asynchronous Receiver / Transmitter. It is a serial
communication interface which uses two lines for sending (TX) and receiving (RX) data.
As its name indicates it is an asynchronous communication interface, which means it
doesn’t need to send clock along with it as in synchronous communications. UART is the
communication standard of our old computer’s RS-232 serial port. Most of the
Microchip’s PIC Microcontrollers have built in USART Module. USART stands for
Universal Synchronous Asynchronous Receiver Transmitter. It can be configured in the
following Modes:
UART – Asynchronous (Full Duplex)
USRT Master – Synchronous (Half Duplex)
USRT Slave – Synchronous (Half Duplex)
4.1.10.1 UART/USART Registers – PIC 16F877A
4.1.10.1.1 TXSTA – Transmit Status and Control Register:
Fig. 4.9 TXSTA – Transmit Status and Control Register courtesy: www.wm-help.net
Bit 7 CSRC: Clock Source Select Bit, this bit has no application in the
Asynchronous mode operation of USART module. It is used to select master or
slave mode in Synchronous mode operation.
Bit 6 TX9: When this bit is set it enables the 9 bit transmission otherwise 8 bit
transmission is used. 9th bit in the 9 bit transmission mode is commonly used as
parity bit.
Bit 5 TXEN: Setting this bit enables the transmission. In the synchronous mode
operation CREN and SREN bits of RCSTA register overrides this bit.
Bit 4 SYNC: This is the USART Mode select bit. Setting this bit selects
Synchronous mode while clearing this bit selects Asynchronous mode.
Bit 3 Unimplemented: This bit is unimplemented and will read as 0.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 23
Bit 2 BRGH: This is the High Baud Rate Select bit for Asynchronous mode
operation and is unused in Synchronous mode. Setting this bit selects High Speed
and clearing this bit selects Low Speed baud rates. You can see the baud rate
calculation later in this article.
Bit 1 TRMT: This is the Transmit Shift Register (TSR) status bit. This can be
used to check whether the data written to transmit register is transmitted or not.
When the TRS is empty this bit is set and when the TSR is full this bit will be 0.
Bit 0 TX9D: This is the 9th bit of data in the 9 bit transmission mode. This is
commonly used as parity bit.
4.1.10.1.2 RCSTA – Receive Status and Control Register:
Fig. 4.10 RCSTA – Receive Status and Control Register courtesy: www.wm-help.net
Bit 7 SPEN: Serial Port Enable bit. Setting this bit enables serial port and
configures RC7, RC6 as serial port pins.
Bit 6 RX9: Setting this bit enables 9 bit reception otherwise it will be in 8 bit
reception mode.
Bit 5 SREN: Single Receive Enable bit. This bit has no effect on Asynchronous
mode and Synchronous Slave mode. Setting this bit will enables Single Receive.
This bit will cleared after the reception is complete.
Bit 4 CREN: Continuous Receive Enable bit. Setting this bit will enable
Continuous Receive. In the Synchronous Mode CREN overrides SREN.
Bit 3 ADDEN: Address Detect Enable bit. This bit is applicable only in
Asynchronous 9 bit mode. Setting this bit enables Address Detect.
Bit 2 FERR: Framing Error bit. 1 at this bit stands for Framing Error while 0
stands for No Framing Error.
Bit 1 OERR: Overrun Error bit. A high at this bit indicates that Overrun error has
occurred.
Bit 0 RX9D: This is the 9th bit of Received Data and is commonly used as Parity
Bit.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 24
4.2 MQ-6 SEMICONDUCTOR SENSOR FOR LPG/ MQ-4 FOR
NATURAL GAS:
Fig. 4.11 MQ-6/ MQ-4 Gas sensor module and Sensor description courtesy: www.sparkfun.com
Sensitive material of MQ-6/MQ-4 gas/smoke sensor is SnO2, which has lower
conductivity in clean air. When the target combustible gas exist, the sensor’s conductivity
is more-higher along with the gas concentration rising. Please use simple electro circuit,
Convert change of conductivity to correspond output signal of gas concentration.
MQ-6 gas sensor has high sensitivity to Propane, Butane and LPG, also response
to Natural gas. The sensor could be used to detect different combustible gas, especially
Methane; it is with low cost and suitable for different application.
4.2.1 Characteristics:
Good sensitivity to Combustible gas in wide range
High sensitivity to Propane, Butane and LPG
Long life and low cost
Simple drive circuit
4.2.2 Applications:
Domestic gas leakage detector
Industrial Combustible gas detector
Portable gas detector
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 25
4.2.3 Working
Fig. 4.12 Working of MQ-6 / MQ-4 courtesy: www.sparkfun.com
The sensing material SnO2 has relatively low conductivity in clean air. When the
LPG is leaked and sensed by the sensor, the conductivity increases according to the
amount of the gas leaked.
The 5V supply to the sensor, is coded in the levels 0-255 for this project. As the
conductivity increases, low resistivity offer a full voltage range of 5V across resisstor RL.
So the value increases as the conductivity is increased with the concentratin of the gas.
The output from the sensor is analog is given as input to op-amp LM358 which is
designed in a comparator mode which compares the signal received from the sensor to a
threshold voltage(reference voltage). Potentiometer of 10kΩ is connected which is set at
2V(reference voltage).The voltage 2V is equal to output voltage of gas sensor in normal
air condition i.e. in absence of gas. LM358 compares two input i.e. preset voltage i/p at
inverting end with gas sensor o/p voltage at non-inverting end. In absence of gas the
output voltage of gas sensor is 2V thus overall output voltage of op-amp will be 0V. In
presence combustible gases input voltage reduces and output voltage of gas sensor
increases thus creating difference between two input voltage of op-amp. This difference is
given to the microcontroller and the buzzer is raised.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 26
4.3 LM35 TEMPERATURE SENSOR:
Fig. 4.13 LM35 temperature sensor courtesy: www.instructtables.com
The LM35 series are precision integrated-circuit temperature sensors, whose output
voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus
has an advantage over linear temperature sensors calibrated in ˚ Kelvin, as the user is not
required to subtract a large constant voltage from its output to obtain convenient
Centigrade scaling. The LM35 does not require any external calibration or trimming to
provide typical accuracies of ±1⁄4˚C at room temperature and ±3⁄4˚C over a full −55 to
+150˚C temperature range.
Low cost is assured by trimming and calibration at the wafer level. The LM35’s low
output impedance, linear output, and precise inherent calibration make interfacing to
readout or control circuitry especially easy. It can be used with single power supplies, or
with plus and minus supplies. As it draws only 60 µA from its supply, it has very low
self-heating, less than 0.1˚C in still air. The LM35 is rated to operate over a −55˚ to
+150˚C temperature range, while the LM35C is rated for a −40˚ to +110˚C range (−10˚
with improved accuracy). The LM35 series is available packaged in hermetic TO-46
transistor packages, while the LM35C, LM35CA, and LM35D are also available in the
plastic TO-92 transistor package. The LM35D is also available in an 8-lead surface
mount small outline package and a plastic TO-220 package.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 27
4.3.1 Features:
Calibrated directly in ˚ Celsius (Centigrade)
Linear + 10.0 mV/˚C scale factor
0.5˚C accuracy guarantee-able (at +25˚C)
Rated for full −55˚ to +150˚C range
Suitable for remote applications
Low cost due to wafer-level trimming
Operates from 4 to 30 volts
Less than 60 µA current drain
Low self-heating, 0.08˚C in still air
Nonlinearity only ±1⁄4˚C typical
Low impedance output, 0.1 Ω for 1 mA load
4.3.2 Temperature to Voltage Conversion:
In LM35:
1°C change in sensor temperature corresponds to 10mV change in voltage.
FORMULA: E/Vref=D/2n-1
where, E= analog voltage
Vref= reference voltage (5V assumed)
D= ADC conversion value
n= 10 (10 bit resolution of ADC)
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 28
4.4 LIGHT DEPENDENT RESISTOR (LDR):
Fig. 4.14 Basic Structure of Light Dependent Resistor courtesy: blog.adafruit.com
The snake like track shown below is the Cadmium Sulphide (CdS) film which also
passes through the sides. On the top and bottom are metal films which are connected to
the terminal leads. It is designed in such a way as to provide maximum possible contact
area with the two metal films. The structure is housed in a clear plastic or resin case, to
provide free access to external light.
The main component for the construction of LDR is cadmium sulphide (CdS), which
is used as the photoconductor and contains no or very few electrons when not illuminated.
In the absence of light it is designed to have a high resistance in the range of mega ohms.
As soon as light falls on the sensor, the electrons are liberated and the conductivity of the
material increases. When the light intensity exceeds a certain threshold frequency, the
photons absorbed by the semiconductor give band electrons the energy required to jump
into the conduction band. This causes the free electrons or holes to conduct electricity and
thus dropping the resistance dramatically (< 1 Kilo ohm).
4.4.1 Advantages:
Cost effective and are available in many shapes and sizes.
Small power and voltage requirements for operation.
4.4.2 Disadvantages:
High inaccuracy with a response time of about 10 or 100 milliseconds.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 29
4.5 GSM MODULE:
GSM is a mobile communication modem; it is stands for global system for mobile
communication (GSM). The idea of GSM was developed at Bell Laboratories in 1970. It
is widely used mobile communication system in the world. GSM is an open and digital
cellular technology used for transmitting mobile voice and data services operates at the
850MHz, 900MHz, 1800MHz and 1900MHz frequency bands.
There are various cell sizes in a GSM system such as macro, micro, pico and
umbrella cells. Each cell varies as per the implementation domain. There are five
different cell sizes in a GSM network macro, micro, Pico and umbrella cells. The
coverage area of each cell varies according to the implementation environment.
4.5.1 GSM network
A Mobile Station: It is the mobile phone which consists of the transceiver, the display
and the processor and is controlled by a SIM card operating over the network.
Base Station Subsystem: It acts as an interface between the mobile station and the
network subsystem. It consists of the Base Transceiver Station which contains the radio
transceivers and handles the protocols for communication with mobiles. It also consists of
the Base Station Controller which controls the Base Transceiver station and acts as a
interface between the mobile station and mobile switching centre.
Network Subsystem: It provides the basic network connection to the mobile stations. The
basic part of the Network Subsystem is the Mobile Service Switching Centre which
provides access to different networks like ISDN, PSTN etc. It also consists of the Home
Location Register and the Visitor Location Register which provides the call routing and
roaming capabilities of GSM. It also contains the Equipment Identity Register which
maintains an account of all the mobile equipments wherein each mobile is identified by
its own IMEI number. IMEI stands for International Mobile Equipment Identity.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 30
4.5.2Features of GSM Module:
Improved spectrum efficiency
International roaming
Compatibility with integrated services digital network (ISDN)
SIM phonebook management
Fixed dialling number (FDN)
Real time clock with alarm management
High-quality speech
Uses encryption to make phone calls more secure
Short message service (SMS)
The security strategies standardized for the GSM system make it the most secure
telecommunications standard currently accessible. Although the confidentiality of a call
and secrecy of the GSM subscriber is just ensured on the radio channel, this is a major
step in achieving end-to- end security.
4.5.3 GSM MODULE M660A:
Fig. 4.15 Neoway M660A GSM Module
M660 is an open platform wireless industrial module, supporting GSM / GPRS
communications. It provides the user with reserved CPU resource and plenty of hardware
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 31
interfaces, widely used in various industrial and commercial applications. The module has
high quality voice, messaging, data connectivity, GPS location and other functions.
4.5.3.1 Block Diagram
Fig. 4.16 GSM module block diagram courtesy: www.neoway.com.cn
The module’s internal IO uses 2.8V power supply system, which sets the input
voltage for all IO pins must not exceed the maximum of 3.3V, otherwise it may damage
the module’s IO. Possible signal integrity problems in circuits using 3.3V power may lead
to overshooting and output voltages surpassing the 3.3V limit and rising as high as 3.5V
sometimes. Such situation will cause damage to the IO port if a 3.3V signal is directly
connected to the 2.8V module IO. Hence a level matching external circuit should be used
to properly interface with the IO ports.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 32
4.5.3.2 Parameters:
Tab. 4.4 Parameters of Neoway M660A GSM Module courtesy: www.neoway.com.cn
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 33
4.6 VOICE RECOGNITION MODULE:
Fig. 4.17 Easy VS Voice Recognition Module
This Voice Recognition Module is a compact and easy-control speaking recognition
board. This product is a speaker-dependent voice recognition module. It supports up to 14
voice commands in all. Any sound could be trained as command. Users need to train the
module first before let it recognizing any voice command. This board has 2 controlling
ways: Serial Port (full function), General Input Pins (part of function). General Output
Pins on the board could generate several kinds of waves while corresponding voice
command was recognized.
We know that Voice Recognition can control the light on and off using Voice
Commands. You make a Voice Command, the light turns on. Then after a Voice
Command it turns off. It will not cost too much. It can recognize as much as 14 voice
instruction, which issuitable for most cases involving voice control.
4.6.1 Key Features:
12VDC / 2Amp (Don’t Give AC Power Supply).
Analog Interface: 3.5mm mono-channel microphone connector.
TRAIN1 Switch for Record First Group.
TRAIN2 Switch for Record Second Group.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 34
Each Group Store 7 Voice Commands.
Load1 Switch For Load The First Group To Voice Recognizer.
Load2 Switch For Load The Second Group To Voice Recognizer.
PB2, PB3, PB4, PB5 Pins are 4bit Data Output.
4.6.2 Steps to train the module:
Press TRAIN1 record First 7 Voice Commands.
Press TRAIN2 record Second 7 Voice Commands.
When training two Led on the Voice Recognition Module can indicate your
training process, the System Led (Yellow) is Blinking fast which remind you to
get Ready, Speak your Voice Command as soon as.
The Status Led (Red) lights on. The Recording process ends once when the status
Led (Red) lights off.
Then the system led (Yellow) is blinking again, Get Ready for next recording
process same command want to tell, when the training process ends successful,
system Led and Status Led Blink together.
Now one Voice Command stored successfully, Like that you have to complete
first group voice command.
If the Training Process fails, System Led and Status Led blink together but
quickly, this procedure same for each Voice Command.
After that Press Load Switch. If you press LOAD1 switch First Group will Load
(System Led (Yellow) Blink Fast) Then you want to tell first Group Commands
corresponding 4bit Data (Pb2,Pb3,Pb4,Pb5) you will get.
If you Press LOAD2 Switch Second Group Will Load (System Led (Yellow)
Blink Fast), then you want to tell second group commands corresponding 4bit
Data(PB2,PB3,PB4,PB5) You will get.
4.6.3 Applications:
Command and control of appliances and equipment.
Telephone assistance systems and Data entry.
Speech controlled toys.
Speech and voice recognition security systems.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 35
4.7 PIEZO- ELECTRIC BUZZER
Fig. 4.18 Buzzer Internal Circuit Fig. 4.19 Buzzer Module courtesy: www.homemadecircuits.com
The simple buzzer circuit described here actually works in a quite unique way.
Instead of the normal working concept employed by other forms of oscillators which
require resistor and capacitor networks for generating the oscillations, this circuit use
inductive feedback for the required operations.
Referring to the above simple piezo buzzer circuit we find that the transistor T1
along with the inductor forms the heart of the circuit. Basically the coil which is
specifically called the buzzer coil is in fact positioned for amplifying the created
oscillations while the actual feedback is provided by the center tap of the three terminal
piezo element used for the present application.
When a voltage is introduced in the circuit, the transistor conducts, operating the
piezo element across the buzzer coil, however this also leads to the grounding of the base
of the transistor through the center tap of the piezo element, this instantly switches off the
transistor and in turn the piezo also switches off, releasing the base of the transistor.
The transistor reverts to its original state and the cycle repeats, generating
oscillations or the required “buzzing” frequency.
The center tap from the piezo transducer plays an important role in sustaining the
oscillations and therefore in this particular design we need a three terminal piezo rather
than a two terminal one.
The oscillations produced at the collector of the transistor are dumped into the coil,
saturating the coil with magnetic inductions. The coil kicks back the stored energy during
the oscillations, magnifying the generated AC across it.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 36
This stepped up AC is applied across the anode and the cathode of the piezo
element, which starts vibrating sharply according the pitch of the frequency, generating a
shrill, ear piercing sound in the air. However to make the sound audible at maximum
intensity, the piezo transducer needs to be stuck or installed in a special way inside its
housing.
4.8 DRIVER (ULN 2003A) AND RELAY:
Fig. 4.20 Driver and Relay Module
Drivers are used to amplify the current coming from the microcontroller and used to
run the DC motor via relays. The ULN2003A series are high voltage, high current
Darlington drivers compromised of seven NPN Darlington pairs. All units feature integral
clamp diode for switching inductive loads.
Fig. 4.21 ULN 2003 Pin diagram courtesy: www.rasberrypi.org
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 37
Fig. 4.22 Driver Module LOAD Conditions courtesy: www.slideshare.net
4.8.1 FEATURES
Output current (single output) 500ma MAX.
High sustaining voltage output 50v MIN.
Output clamp diodes.
Inputs compatible with various types of logic.
Package type-AP: DIP-16pin.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 38
4.8.2 DARLINGTON AMPLIFIER
Fig. 4.23 Darlington Amplifier courtesy: www.technologystudent.com
To provide improved performance and input/output characteristics, single transistors
may be combined to form compound devices. A commonly used compound device is
known as the Darlington configuration is shown. In this representation, two npn BJTs are
cascaded and are behaviourally equivalent to a single npn transistor. This single
compound device possesses desirable characteristics such as high input impedance, low
output impedance and high current gain; but does have the disadvantages of an almost
doubled VBE
(overall VBE
for the pair is 1.2V to 1.4V instead of the 0.6V to 0.7V for
single silicon BJTs) and the fact that any leakage current from the first transistor is
amplified by the second transistor. A Darlington pair may also be created using two pnp
devices, particularly in discrete circuit design, or through the use of an npn and a pnp.
The resulting compound device may be considered a single transistor and, in the
following discussion, will be used in either the CE or EF (CC) configuration.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 39
4.9 SOLENOID VALVE
Fig 4.24 Air Solenoid Valve
A solenoid valve is an electromechanically operated valve. The valve is controlled
by an electric current through a solenoid: in the case of a two-port valve the flow is
switched on or off; in the case of a three-port valve, the outflow is switched between the
two outlet ports. Multiple solenoid valves can be placed together on a manifold.
Solenoid valves are the most frequently used control elements in fluidics. Their tasks
are to shut off, release, dose, distribute or mix fluids. They are found in many application
areas. Solenoids offer fast and safe switching, high reliability, long service life, good
medium compatibility of the materials used, low control power and compact design.
Besides the plunger-type actuator which is used most frequently, pivoted-armature
actuators and rocker actuators are also used.
There are many valve design variations. Ordinary valves can have many ports and
fluid paths. A 2-way valve, for example, has 2 ports; if the valve is open, then the two
ports are connected and fluid may flow between the ports; if the valve is closed, then
ports are isolated. If the valve is open when the solenoid is not energized, then the valve
is termed normally open (N.O.). Similarly, if the valve is closed when the solenoid is not
energized, then the valve is termed normally closed. There is also 3-way and more
complicated designs. A 3-way valve has 3 ports; it connects one port to either of the two
other ports (typically a supply port and an exhaust port).
A solenoid valve has two main parts: the solenoid and the valve. The solenoid
converts electrical energy into mechanical energy which, in turn, opens or closes the
valve mechanically. A direct acting valve has only a small flow circuit, shown within
section E of this diagram (this section is mentioned below as a pilot valve). In this
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 40
example, a diaphragm piloted valve multiplies this small pilot flow, by using it to control
the flow through a much larger orifice.
Solenoid valves may use metal seals or rubber seals, and may also have electrical
interfaces to allow for easy control. A spring may be used to hold the valve opened
(normally open) or closed (normally closed) while the valve is not activated.
A- Input side
B- Diaphragm
C- Pressure chamber
D- Pressure relief passage
E- Electro Mechanical Solenoid
F- Output side
Fig. 4.25 Basic working of Solenoid Valve courtesy: en.wikipedia.org
The diagram to the right shows the design of a basic valve, controlling the flow of
water in this example. At the top figure is the valve in its closed state. The water under
pressure enters at A. B is an elastic diaphragm and above it is a weak spring pushing it
down. The diaphragm has a pinhole through its center which allows a very small amount
of water to flow through it. This water fills the cavity C on the other side of the
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 41
diaphragm so that pressure is equal on both sides of the diaphragm; however the
compressed spring supplies a net downward force. The spring is weak and is only able to
close the inlet because water pressure is equalized on both sides of the diaphragm.
Once the diaphragm closes the valve, the pressure on the outlet side of its bottom is
reduced, and the greater pressure above holds it even more firmly closed. Thus, the spring
is irrelevant to holding the valve closed.
The above all works because the small drain passage D was blocked by a pin which
is the armature of the solenoid E and which is pushed down by a spring. If current is
passed through the solenoid, the pin is withdrawn via magnetic force, and the water in
chamber C drains out the passage D faster than the pinhole can refill it. The pressure in
chamber C drops and the incoming pressure lift the diaphragm, thus opening the main
valve. Water now flows directly from A to F.
When the solenoid is again deactivated and the passage D is closed again, the spring
needs very little force to push the diaphragm down again and the main valve closes. In
practice there is often no separate spring; the elastomeric diaphragm is moulded so that it
functions as its own spring, preferring to be in the closed shape.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 42
4.10 TOGGLE SWITCH:
Fig. 4.26 Toggle Switch courtesy: www.bestronusa.com
A toggle switch is a class of electrical switches that are manually actuated by a
mechanical lever, handle, or rocking mechanism. Toggle switches are available in many
different styles and sizes, and are used in numerous applications. Many are designed to
provide the simultaneous actuation of multiple sets of electrical contacts, or the control of
large amounts of electric current or mains voltages.
The word "toggle" is a reference to a kind of mechanism or joint consisting of two
arms, which are almost in line with each other, connected with an elbow-like pivot.
However, the phrase "toggle switch" is applied to a switch with a short handle and a
positive snap-action, whether it actually contains a toggle mechanism or not. Similarly, a
switch where a definitive click is heard is called a "positive on-off switch" - - the most
common use of this type of switch is a typical light switch or electrical outlet switch.
Multiple toggle switches may be mechanically interlocked to prevent forbidden
combinations.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 43
4.11 LCD 16X2
Fig. 4.27 Front and Back of LCD Module
This component is specialized to be used with the microcontrollers, which means
that it cannot be activated by standard IC circuits. It is used for displaying different
messages on a miniature liquid crystal display. A model described here is for its low price
and great capabilities most frequently used in practice. It is based on the HD44780
microcontroller (Hitachi) and can display messages in two lines with 16 characters each.
It displays all letters of alphabet, Greek letters, punctuation marks, mathematical symbols
etc. In addition, it is possible to display symbols made up by the user. Other useful
features include automatic message shift (left and right), cursor appearance, LED
backlight etc.
Along one side of a small printed board there are pins used for connecting to the
microcontroller. There are in total of 14 pins marked with numbers (16 in case the
backlight is glowed). The table below shoes the description of each pin:
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 44
The table below shoes the description of each pin:
Tab 4.5 LCD Pin Details courtesy: www.usstudy.in
4.11.1 Interfacing of LCD
Depending on how many lines are used for connecting LCD to the microcontroller,
there are 8-bit and 4-bit LCD modes. The appropriate mode is selected at the beginning of
the operation in the process called initialization.
The main purpose of 4-bit LED mode is to save valuable I/O pins of the
microcontroller. Only 4 higher bits (D4-D7) are used for communication, while others
may be unconnected. Each data is sent to LCD in two steps- four higher bits are sent first
(normally through the lines D4-D7) and four lower bits are sent afterwards. Initialization
enables LCD to link and interpret received bits correctly.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 45
Fig. 4.28 LCD interfaced with Microcontroller courtesy: www.8051projects.net
4.12 SOFTWARE DETAILS:
4.12.1 MPLAB_IDE:
MPLAB IDE is a free, integrated toolset for the development of embedded applications
on Microchip's PIC and PIC microcontrollers. It is called an Integrated Development
Environment, or IDE, because it provides a single integrated environment to develop
code for embedded microcontrollers.
MPLAB IDE runs as a 32-bit application on MS Windows, is easy to use and includes a
host of free software components for fast application development and super-charged
debugging. MPLAB IDE also serves as a single, unified graphical user interface for
additional Microchip and third party software and hardware development tools. Moving
between tools is a snap, and upgrading from the free software simulator to hardware
debug and programming tools is done in a flash because MPLAB IDE has the same user
interface for all tools.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 46
4.12.2 Steps to Invoke MPLAB_IDE
1. Create a folder on the desktop with a relevant name concerning to the program.
2. Click on the MP Lab icon on the desktop to open the software.
3. Go to project and select new project. Write the project name and select the
directory. The directory should be our own created folder in the beginning. Save
the project in that folder.
4. Go to project and use the build options. Select “Include search path” from the
drop down menu.
5. Browse for the path in the devices folder in c:\ program files\ PIC C folder\
devices.
6. Go to project and use the build options. Select “Library search path” from the
drop down menu.
7. Browse for the path in the drivers folder in c:\ program files\ PIC C folder\
drivers.
8. From the view menu on the top, select project window and output window.
9. Take a new file and type the programming code in it. Save the program with “.c”
extension in our folder created on the desktop.
10. In the project window, right click on source file and add the saved program file
with .c extension as the source file.
11. Compile the program to check for errors.
12. Press F10 or go to build the program to see the output.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 47
4.12.3 FLOWCHART
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 48
RESULTS
5.1 TEMPERATURE SENSOR:
Fig. 5.1 Snapshot showing initial temperature and the fan is switched off
Fig. 5.2 Snapshot showing fan is switched on above threshold temperature
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 49
5.2 LDR:
Fig. 5.3 Snapshot showing bulb is off when sufficient sunlight is available
Fig. 5.4 Snapshot showing bulb is switched on when darkness is detected by LDR
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 50
5.3 GAS SENSOR:
Fig. 5.5 Snapshot showing the solenoid valve is on when no gas leakage is detected
Fig. 5.6 Snapshot showing the valve is switched off and a message sent from GSM
module to the registered mobile number in case of gas leakage
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 51
5.4 SMOKE SENSOR:
Fig. 5.7 Snapshot showing low smoke level
Fig. 5.8 Snapshot showing higher smoke levels and a message sent through the GSM module to the registered mobile number in case of smoke detection
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 52
ADVANTAGES, CONCLUSION AND FUTURE SCOPE
6.1 ADVANTAGES:
The prototype designed works without my internet connection, android
application or Bluetooth. The methodology used is user friendly, easy to operate
and doesn’t learning my new technology.
The components used have low voltage and power requirements and are cost
effective.
The GSM facility incorporated in the project ensures safety by informing a
member of the family about any probable internal threat.
The speech module can be easily trained to operate devices by recognising
different voices in case of person with physical disabilities.
6.2 CONCLUSION:
The project basically aimed at implementing a wireless sensor network, for detecting
any internal lapses in the house and is implemented using the Gas and Smoke sensor to
ensure safety to the elderly or disables population in case of fire or gas leakage.
The sensor network is also incorporated and successfully demonstrated for operating
devices in the house such as lights, fans, etc., by using the temperature sensor and LDR.
The control of the devices is also ensured by the user themselves by using the speech
processing module to control home appliances. This feature is extremely helpful in case
of a person with disability, who may not be physically independent to move freely from
place to another.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 53
6.3 FUTURE SCOPE:
A Braille module can be designed and implemented along with this project to
assist blind people also.
GPS feature can be incorporated to track the devices and the persons inside the
home in real time.
The speed of the fan can be controlled according to the significance in rise of
temperature.
The concept can be extended to a global level and the devices can be operated
from anywhere in the world with the help of GPRS, if the whole world is linked to
an internet connection with proper speed.
This concept of E- Assistance can be merged with IoT in India, if the country is
provided with proper Wi-Fi throughout.
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 54
REFERENCES
[1]. A. M. Cole and B.Q. Tran, “Home Automation to promote Independent living in
elderly population ”Proceedings of the Second Joint EMBSBMES Conference,
Houston, TX, USA October 23-26, 2002
[2]. J. A. Nazabal, I. R. Matías, C. Fernández-Valdivielso, F. Falcone, P. Branchi
“Home Automation based Sensor System for Monitoring Elderly People Safety”
Sixth International Conference on Sensing Technology (ICST) 2012
[3]. Vasco Santos, Paulo Bartolomeu, Jose Fonseca, Alexandre Mota “B-Live - A
Home Automation System for Disabled and Elderly People” IEEE Page No 333 -
336, 2007
[4]. Ahmed ElShafee, Karim Alaa Hamed “Design and Implementation of a Wi-Fi
Based Home Automation System” World Academy of Science, Engineering and
Technology Vol: 6 2012-08-28
[5]. Chao Zhang, Takakazu Ishimatsu and Jiangli Yu Lawn Murray,Lei Shi “Vision-
Based Displacement Sensor for People with Serious Spinal Cord Injury”
Proceedings of 2015 IEEE International Conference on Mechatronics and
Automation August 2-5. Beijing. China
[6]. Leroy Zi Wei Tang, Kian Sin Ang, Mohamad Amirul , Fachmin Folianto
“Augmented Reality Control Home (ARCH) for Disabled and Elderlies” 2015
IEEE Tenth International Conference on Intelligent Sensors, Sensor Networks and
Information Processing (ISSNIP) Demo and Video Singapore, 7-9 April 2015
[7]. Anido Rifon, L.E.; Rivas Costa, C.; Gomez Carballa, M.; Valladares Rodriguez,
S.;Femandez Iglesias, MJ. “Improving the quality of life of dependent and
disabled people through home automation and Tele-assistance” The 8th
International Conference on Computer Science & Education (ICCSE 2013) April
26-28, 2013. Colombo, Sri Lanka
[8]. Tim Wilmshurst, “Designing Embedded Systems with PIC Microcontrollers:
Principles and Applications”
E- ASSISTANCE FOR ELDERLY AND DISABLED 2015-2016
Department of ECE, DSCE Page 55
APPENDIX A
LIST OF ABBREVIATIONS:
1. ADC : Analog to Digital Converter
2. ARCH : Augmented Reality Control Home
3. BCI : Brain Computer Interface
4. BMI : Brain Machine Interface
5. BUI : Brain User Interface
6. CISC : Complex Instruction Set Computer
7. CPU : Central Processing Unit
8. EEPROM : Electrically Erasable Programmable Read Only Memory
9. GPRS : General Packet Radio Service
10. GSM : Global System for Mobile Communication
11. GUI : Graphical User Interface
12. HTPC : Home Theatre Personal Computer
13. I2C : Inter-integrated Circuit Protocol
14. LAN : Local Area Network
15. LCD : Liquid Crystal Display
16. LDR : Light Dependent Resistor
17. LPG : Liquefied Petroleum Gas
18. MMI : Mind Machine Interface
19. PIC : Peripheral Interface Controller
20. PWM : Pulse Width Modulation
21. RISC : Reduced Instruction Set Computing
22. SPI : Serial Peripheral Interface Protocol
23. UART : Universal Asynchronous Receiver/Transmitter