Sei sulla pagina 1di 66

A

PROJECT REPORT
ON
IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING
SYSTEM USING ARM -7

Submitted in Partial Fulfillment of the Requirements for the award of degree of

BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
SUBMITTED BY
N. MANASA 15D31A0450

R. RAJINI 15D31A0453

B. SAI CHARAN 15D31A0414

Under the esteemed guidance of


V. SRINU
Sr. Assistant professor

DEPARTMENT OF ELECTRONICS AND COMMUNICATION


ENGINEERING
INDUR INSTITUTE OF ENGINEERING &
TECHNOLOGY
PONNALA, SIDDIPET Dist.
TELANGANA – 502 277.
2018-2019.
Department of Electronics & Communication Engineering
CERTIFICATE
This is to certify that the project work entitled “IOT BASED

AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM


USING ARM -7” that is submitted by

N. MANASA 15D31A0450

R. RAJINI 15D31A0453

B. SAI CHARAN 15D31A0414

In partial fulfillment of the requirements for the award of the degree of


BACHELOR OF TECHNOLOGY IN ELECTRONICS &COMMUNICATION
ENGINEERING by the Jawaharlal Nehru Technological University, is a record of
Bonafide work carried out by them under my guidance and supervision. The results
embodied in this project report have not been submitted to any other University or
Institute for the award of any degree or diploma.

Project Supervisor Head of Department


V. SRINU Mrs. P. RENUKA
Sr. Asst. Professor Sr. Asst. Professor
ACKNOWLEDGEMENT
We wish to take this opportunity to express our deep gratitude to all the people
who have extended their co-operation in various ways during our project work. It is our
pleasure to acknowledge the help of all those individuals.

We extremely thankful to our project guide Mr. V. SRINU, Sr. Assistant


professor, for extending his co-operation, suggestions and keenness in the completion
of this project work.

We thankful to Mrs. P. RENUKA, Head of the department, Electronics and


communication Engineering, for her valuable support.

We grateful to our principal Dr. RATNAKAR PANDU for his moral support
and also for granting us permission to utilize the labs.

We would also like extend our thanks to the faculty of the department of
electronics and communication Engineering, the office staff and other technical and
non-technical for their support, help and encouragement.

We truthfully acknowledge the help and moral support rendered by our parents.
Last, but not the least, we thank all our friends for their moral support in making this
project lead to a successful completion.

N. MANASA 15D31A0450

R. RAJINI 15D31A0453

B. SAI CHARAN 15D31A0414

i
ABSTRACT
Information and communication technologies and transforming our social
interactions, lifestyle and work space one of the most promising application of
information technology is healthcare and wellness management. The current trend
places an emphasis on the monitoring of health conditions and management of wellness
a significant contributor to individual healthcare and wellbeing.

Health monitoring is the major problem in today’s world. Due to lack of proper
health monitoring, patient suffer from serious health issues. There are lots of IoT
devices now days to monitor the health of patient over internet. Health experts are also
taking advantage of these smart devices to keep an eye on their patients. With tons of
new healthcare technology start-ups, IoT is rapidly revolutionizing the healthcare
industry.

Here in this project, we will make an IoT based automatic critical Health
Monitoring System which records the patient heart beat rate and body temperature,
humidity, and motion of body also data will be updating in website/page continuously.
Pulse rate and body temperature readings are recorded. so that patient health can be
monitored from anywhere in the world over internet.

ii
INDEX

ACKNOWLEDGEMENT i

ABSTRACT ii

LIST OF FIGURES v

LIST OF TABELS v

CHAPTER 1 1

INTRODUCTION 1

1.2 Aim of the project 2

1.3 Methodology 2

1.4 Significance of this work 2

CHAPTER 2 3

LITERATURE REVIEW 3

2.1 Origin 3

2.2 EXISTING SYSTEM 5

2.3 PROPOSED SYSTEMS 5

CHAPTER 3 6

ARCHITECTURE 6

3.1 PROJECT OBJECTIVES 6

3.2 PROPOSED METHODOLOGY 6

3.3 FLOW CHART 7

3.4 REQUIREMENTS ANALYSIS 8

3.4.1 HARDWARE REQUIREMENTS 8

3.4.2 SOFTWARE REQUIREMENTS - 8

3.5 BLOCK DIAGRAM DESCRIPTION 8

3.6 SCHEMATIC DIAGRAM 9

iii
3.6 SCHEMATIC DIAGRAM DESCRIPTION 9

3.8 WORKING EXPLANTION 10

CHAPTER 4 12

HARDWARE DISCRIPTION 12

4.1.3 LPC2148 General description 14

4.1.5 Pin diagram of LPC2148 16

4.1.6 Features of LPC2148 17

4.1.7 THUMB Concept 18

4.1.8 THUMB’s Advantages 18

4.2 HEART BEAT SENSOR 19

4.2.2 Working of a Heartbeat Sensor 20

4.4 MOISTURE SENSOR 26

SPECIFICATIONS 26

4.5.2 Pin Description 29

4.7 BUZZER 35

4.9.1 BLOCK DIAGRAM OF POWER SUPPLY 40

CHAPTER 5 41

SOFTWARE DESCRIPTION 41

5.1 µVISION4 41

5.1.1. BUILDING AN APPLICATION IN µVISION4 41

RESULT 49

ADVANTAGES 52

APPLICATIONS 52

CONCLUSION 53

FUTURE SCOPE 54

iv
REFERENCES 55

APPENDIX 56

LIST OF FIGURES

FIGURE 3. 2 SCHEMATIC DIAGRAM 9


FIGURE 5. 2 WI-FI MODULE 31
FIGURE 5. 3 ESP8266 MODULE PIN DIAGRAM 32
FIGURE 5. 4 BUZZER 35
FIGURE 5. 5 SCHEMATIC DIAGRAM 36
FIGURE 5. 6 SOUND PRESSURE LEVEL (UNIT DB PA) 37
FIGURE 5. 7 CIRCUIT DIAGRAM OF MAX 232 39
FIGURE 5. 8 BLOCK DIAGRAM OF POWER SUPPLY 40

FIGURE 6. 1 OVER VIEW OF THE PROJEC 49

FIGURE 6. 2 WI-FI MODULE CHECKING 49

LIST OF TABELS
TABLE 4. 1 LCD DISCRIPTION 29
TABLE 4. 2 FUNCTIONS OF AT COMMAND 35
TABLE 4. 3 FUNCTION OF AT COMMANDS 38

v
IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

CHAPTER 1

INTRODUCTION

1.1INTRODUCTION

Previously it is impossible to monitor the patient by doctor in remote areas


during critical conditions. So, we introduced a method which continuously monitors
the patient condition and automatically sends the data to server, so the doctor can access
the data continuously and we can intimate caretaker when patient is in critical condition.
In pervious methods, monitoring of patient can be done only by using different
instruments for different parameters. so, we decided to monitor required conditions of
patient by assembling different instruments in a single module. Now a days IoT is the
widely used technology.

The growth of internet is tremendous and has been further extended to


connecting things through internet. All devices are connected to one another with
various smart technologies to create worldwide ubiquitous network the data into the
telenet application. we observed the data on many devices using Wi-Fi.

Internet of things is a technology of the future that has already started to touch

Our homes. We proposed an IoT based automatic critical Health Monitoring System

using ARM-7. In this model we are monitoring the patient condition about the health
i.e., heartbeat, temperature, humidity, moisture sensor when patient required. This
model is useful to patients to know about his/her health without going hospitals.

In this system we are using heartbeat sensor, temperature sensor, humidity


sensor, moisture sensor. Heartbeat sensor count the heart rate and temperature sensor
measure the body temperature and moisture sensor detect the level content of water and
humidity sensor detects the relative humidity of the immediate to environmental. Based
on this information LCD displays the details about the patient.

In the presence of the doctor microcontroller is connected to Wi-Fi module to


know the information about the patients.

INDUR INSTITUTE OF ENGG & TECH, ECE 1


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

1.2 Aim of the project


The aim of our project is to an IoT based automatic critical Health
Monitoring System which records the patient heart beat rate and body temperature,
humidity, and motion of body also data will be updating in website/page continuously.
Pulse rate and body temperature readings are recorded. so that patient health can be
monitored from anywhere in the world over internet.

1.3 Methodology
In this project we have temperature, humidity, moisture and heart beat readings
which are monitored using microcontroller. These sensors signals are send to
microcontroller Here patients body temperature, heart rate, humidity &moisture is
measured using respective sensors and it can be monitored in the screen of mobile using
micro controller as well as monitoring through anywhere in the world using internet
source.

The proposed method of patient monitoring system monitors patient’s health


parameters using micro controller. After connecting Wi-Fi module to the micro
controller, it acts as a server. Then the server automatically sends data to the client.
Using IP address anybody can monitor the patient’s health status anywhere in the world
using laptops, tablets and smart phones. If these parameters go abnormal it will
automatically buzzer will be blown.

1.4 Significance of this work

In this project is to monitor the health condition of the patient thorough the
sensing the data from different sensors to the micro controller. These working
procedures can be explained through

INDUR INSTITUTE OF ENGG & TECH, ECE 2


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

CHAPTER 2

LITERATURE REVIEW

2.1 Origin
The main goal of this project to the exponentially growing healthcare costs
coupled with the increasing of patients in receiving care in the consolation of their own
homes have prompted a serious need to revolutionize patient healthcare system. The
existing work lacks flexibility, scalability and energy efficiency. This study addresses
this challenge by augmenting healthcare system with inexpensive but flexible and
scalable pervasive technologies that long-term remote health monitor. The Pervasive
Patient Health Monitoring is based on integrated cloud computing and Internet of
Things technologies. To demonstrate the suitable of the proposed infrastructure, a case
study for real- time monitoring of a patient suffering from heart failure using ECG is
presented. The experimental evaluation of the proposed Patient Health Monitoring is a
flexible, scalable and energy efficiency remote patient health monitor system. The
increased use of mobile technologies and smart devices in the area of health caused
impact on universe. Health experts are increasingly taking the advantages of
technologies brings together generating a significant improvement in healthcare
monitoring system in clinical settings and out of them. The greater number of users are
being served from the advantages of mobile health application and healthcare support
to improve, help their health. The applications have a major for these users, so intuitive
environment. The Internet of Things is increasingly allowing devices connecting to the
Internet and provides information of patient health status. And provide information in
real time scenario to doctor assist. Diseases such as heart, pressure among others are
remarkable in the world problem. The aim of this article is to develop an architecture
based on ontology capable of monitoring the health and workout routine
recommendations to patients.

In this project a patient healthcare monitoring system with mobile phone and
web service capabilities. It provides end to end solutions. Specifically, physiologic
parameters are including respiration rate , heart rate are measured by sensors and
recorded by a mobile phone which presents the graphical interface for the user to
observe his/her health status more easily; it provides doctors and family members with

INDUR INSTITUTE OF ENGG & TECH, ECE 3


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

necessary data through a web interface and enables authorized personnel to monitor the
patient’s condition and to facilitate remote diagnosis; and it supports real-time alarming
and positioning services during an urgent situation, such as a tumble or a heart attack,
so that unexpected events can be handled in a timely manner. To meet the requirement
of emergency situations, a Wi-Fi based localization method was proposed for indoor
environment. Experimental results showed the stable performance of the proposed
Remote Health Monitoring system. The main limitation was the system was capable of
only real-time monitoring of the patient’s status, not professional analysis and
instruction.

The health care monitoring system is performed using ZigBee as a transmission


medium. The transmitter section was designed using Arduino and the receiver section
was designed using Raspberry-pi kit. It is mainly deployed to monitor a patient under
hospital environment only. The data transmission is the main role played in this case.
In ZigBee any problem occur compliant home appliances replacement cost will be high.
Like different wireless systems, ZigBee based mostly communication is liable to attack
from unauthorized folks. The coverage is restricted and thus cannot be used as outside
wireless communication system. It may be utilized in indoor wireless applications. The
coverage distance is very low in the case of ZigBee and also possess low data rate. This
doesn’t purpose that the factor should be physically connected to the web.

Patient healthcare monitor represent most attractive application areas for the
IoT. The IoT has the potential to offer rise to several medical applications like remote
health observance, chronic diseases, and older care. Compliance with treatment and
medication at home and by healthcare providers is another important potential
application. Therefore, varied medical devices, sensors and diagnostic and imaging
devices are often viewed as good devices or objects constituting a core a part of the
IoT. IoT based care service area unit expected to scale back prices, increase the standard
of life and enrich the user’s expertise. From the attitude of healthcare suppliers, the IoT
has the potential to scale back device time period through remote provision. IoT
provides for the efficient scheduling of limited resources by ensuring their best use and
service for patients. Ease of cost-effective interactions through seamless and secure
connectivity across individual patients, clinics, and healthcare organizations is an
important trend. Up-to-date healthcare networks driven by wireless technologies are
expected to support chronic diseases, early diagnosis, real-time monitoring, and

INDUR INSTITUTE OF ENGG & TECH, ECE 4


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

medical emergencies. Gateways, medical servers, and health databases play vital roles
in creating health records and delivering on-demand health services to authorize
stakeholders. The use of wearable device for observation physical health aspects of
dementedness patients can benefits formal home-based care, by providing formal
caregivers with further, vital important information concerning important, health-
related events that will have happened throughout the non-visit home care hours.
Wearable devices able to automatically recognize the user’s activity state without the
user pressing any button to mark the start or end time of the activity.

2.2 EXISTING SYSTEM


The systems which are existing on this patient health monitoring system are
used to monitor the patient health status in LCD display. There is no wireless
communication.

2.3 PROPOSED SYSTEMS


We propose an automatic system to monitor patient’s body temperature, heart
rate, body motion and humidity. Further we extend the existing system to predict if the
patient is suffering from any chronic disorder or diseases using various health parameter
and various other symptoms that are obtained by the system and also, so we are
implementing wireless communication IOT for emergency cases.

INDUR INSTITUTE OF ENGG & TECH, ECE 5


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

CHAPTER 3

ARCHITECTURE

3.1 PROJECT OBJECTIVES


The main objective of this project is to observe the body temperature, heart rate,
body moisture and humidity and update to the host client.

3.2 PROPOSED METHODOLOGY

FIGURE 3. 1 Block diagram

INDUR INSTITUTE OF ENGG & TECH, ECE 6


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

3.3 FLOW CHART

START

Initializing the system along with wifi

Read the analog port pins connected to sensors

Display the initial values of the sensors

Monitor the patient parameters

Heart beat Temperature Humidity moisture

Output displayed at LCD display

No

If

Abnormal ?

YesY

Buzzer alert

Stop

FIGURE 3. 2 FLOW CHAT

INDUR INSTITUTE OF ENGG & TECH, ECE 7


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

3.4 REQUIREMENTS ANALYSIS

3.4.1 HARDWARE REQUIREMENTS


1.Micro controller lpc2148

2.Temperature sensor

3.Humidity sensor

4.Heart rate sensor

5.Motion sensor

6.Wi-Fi module

7.LCD

8.Buzzer

9.Power supply

3.4.2 SOFTWARE REQUIREMENTS -

1. Keil u-vision
2. Proteus
3. Flash magic

3.5 BLOCK DIAGRAM DESCRIPTION


Health monitoring has 4 sensors. Frist one is a temperature sensor, second is
heartbeat sensor ,third is humidity sensor and fourth is moisture sensor. This project is
very useful since the doctor can monitor patient health parameters just by visiting
website or URL. And nowadays many IOT apps are also being developed . so now the
doctor or family members can monitor or track the patient health through the Android
apps.

To operate IOT based health monitoring system project, you need a Wi-Fi
connection. The microcontroller connects to the Wi-Fi network using a Wi-Fi module.
This project will not work without a working Wi-Fi network. You can create a Wi-Fi
zone using a Wi-Fi zone using Hotspot on your smartphone. The microcontroller board

INDUR INSTITUTE OF ENGG & TECH, ECE 8


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

continuously reads input from these 4 sensors, Then it sends this data to the cloud by
sending this data to a particular URL/IP address. Then this action of sending data to IP
is repeated after a interval of time. For example, in this project, we have sent data after
every 30 seconds

3.6 SCHEMATIC DIAGRAM

FIGURE 3. 3 SCHEMATIC DIAGRAM

3.6 SCHEMATIC DIAGRAM DESCRIPTION


The proposed Architecture contains microcontroller,16X2 alphanumeric LCD,
heart beat sensor, humidity sensor, temperature sensor, moisture sensor, Wi-Fi module,
buzzer.

Here LPC2148 micro controller belongs to ARM architecture it has a 32-bit


microcontroller and requires power supply of 3.3V. we use 7805 voltage regulator with
resistor to provide 3.3V to microcontroller.

INDUR INSTITUTE OF ENGG & TECH, ECE 9


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

The usage of LCD is an output device to know the status of the system. Here
LCD is interfaced to the port1 of the microcontroller in 8bit mode data pins
(D4,D5,D6,D7) are connected to P1.18,P1.19,P1.20,P1.21 respectively and remaining
data pins are connected to the ground. The register selective (RS)&enable (EN) pins
are connected to the contrast adjustment using a 1K variable resistor through power
supply.

As a prototype heartbeat sensor are used to counts the normal heartrate and it is
connected to the pin P0.5. If the heart rate is above the normal heart beat(75).Then the
microcontroller get logic1,hence the buzzer will be blown.

Temperature sensor is used to measure the body temperature and it is connected


to pin P1.28 of microcontroller. If the temperature is >50 then the microcontroller send
the value and also buzzer will be blown.

Humidity sensor is used to measure the body humidity and it is connected to pin
P0.3 of microcontroller. If the logic 0 humidity in ON and when the logic is 1 then the
humidity is OFF. If the logic 0 received from the humidity sensor then the buzzer will
be blown.

Moisture sensor is detecting the level content of water and it is connected to the
pin P0.4. If the logic 0 then MOS is wet and when the logic 1 then MOS is dry. If the
logic 0 is received from the moisture sensor then the buzzer will be blown.

The information about the sensors can be passed to the other user through Wi-
Fi module. The Wi-Fi module interfaced to the microcontroller using UART pin having
a intermediate max 232 along a switch the switching concept is used to make circuit
simpler.

Finally, here we using Wi-Fi module for monitoring purpose through this client
will get knowledge about health TX & RX pins of Wi-Fi module. Power supply pins of
Wi-Fi module pins connected into power supply and ground pin will be grounded.

3.8 WORKING EXPLANTION


When power supply is given, then all the components get activated and Wi-Fi.
module gets initialized. It will be displayed on LCD that “Wi-Fi initializing. To
initialize the Wi-Fi module initially we need to download telnet app and then enter the
server number for activating the Wi-Fi module. It will be displayed on LCD that

INDUR INSTITUTE OF ENGG & TECH, ECE 10


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

“WAITING FOR CONNECT”. After connecting the server, LCD displays that
“CONNECTED”. After getting connected it will be displayed on LCD as “IOT BASED
HEALTH”. After this initialization the LCD displays HB, T, H, M.

Where,

HB indicates the heartbeat sensor,

T indicates the temperature sensor,

H indicates humidity sensor,

M indicates moisture sensor.

When the person wants to check about his/her health status. when he requires
then the heartbeat sensor is connected to the person. Then it counts the heart rate .If it
is above the normal heartbeat(75) then the particular value will be displayed on LCD.
Buzzer will be blown and then it will be updated in the telnet app and displays that HB
is high.

Temperature sensor is used to measure the body temperature of a patient. If the


temperature value is above the normal, then the Buzzer will be blown and it will display
the value of T. It will get updated in the telent app and displays as T is high. Humidity
sensor is used to measure the body humidity of a patient. If the humidity is high, then
the buzzer will be blown and it will displays on the LCD as H is ON. It will be updated
in the telent app and displays as HUM is high.

Moisture sensor is used to detects the content of water level. If the moisture is
high, then the buzzer will be blown, and it will display on the LCD as M is wet. It will
be updated in the telent app and displays as MOS is wet.

INDUR INSTITUTE OF ENGG & TECH, ECE 11


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

CHAPTER 4

HARDWARE DISCRIPTION
4.1 INTRODUCTION TO ARM
ARM is the industry's leading provider of 32-bit embedded RISC
microprocessors. ARM processors are licensed by the majority of the world's leading
semiconductor manufacturers, who together have shipped in excess of 25 billion
processors since the company was formed in 1990. ARM offers a wide range of
processor IP based on a common architecture delivering high performance together
with low power consumption and system cost. This energy-efficient performance is
enhanced by ARM Physical IP, development tools and the largest ecosystem in the
industry. The ARM Connected Community is comprised of over 850 companies
including third party systems, design support, software and training providers which
combined provide a complete solution for products based on the ARM Architecture.

FIGURE4. 1 Arm Processor

4.1.1 ARM ARCHITECTURE

The ARM architecture processor is an advanced reduced instruction set


computing [RISC] machine and it’s a 32bit reduced instruction set computer (RISC)
microcontroller. ARM is a family of microcontroller developed by makers like ST
Microelectronics, Motorola, and so on. The ARM architecture comes with totally
different versions like ARMv1, ARMv2, etc., and, each one has its own advantage and
disadvantages.

INDUR INSTITUTE OF ENGG & TECH, ECE 12


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

• Arithmetic Logic Unit


• Booth multiplier
• Barrel shifter
• Control unit
• Register file
The ARM processor conjointly has other components like the Program status
register, which contains the processor flags (Z, S, V and C). The modes bits conjointly
exist within the program standing register, in addition to the interrupt and quick
interrupt disable bits; Some special registers Some registers are used like the
instruction, memory data read and write registers and memory address register.

Priority encoder The encoder is used in the multiple load and store instruction
to point which register within the register file to be loaded or kept.

Multiplexers Several multiplexers are accustomed to the management operation of


the processor buses. Because of the restricted project time, we tend to implement these
components in a very behavioral model. Each component is described with an entity.
Every entity has its own architecture, which can be optimized for certain necessities
depending on its application. This creates the design easier to construct and maintain.

4.1.2 Operating modes of ARM

ARM supports 7 modes of operation

1. User mode

2. Fast Interrupt mode

3. Interrupt mode

4. Supervisor mode

5. Abort mode

6. System mode

7.Undefined mode

INDUR INSTITUTE OF ENGG & TECH, ECE 13


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

• User(usr) Normal program execution state.


• FIQ(fiq) Data transfer state.

• IRQ(irq) Used for general interrupt services.

• Supervisor(svc) Protected mode for operating system support.

• Abort mode(abt) Selected when data or instruction fetch is aborted.

• System(sys) Operating system ‘previlege’ mode for user.

• Undefined(und) Selected when undefined instruction is fetched.

4.1.3 LPC2148 General description


The LPC2141/2/4/6/8 microcontrollers are based on a 32/16-bit ARM7TDMI-
S CPU with real-time emulation and embedded trace support, that combines the
microcontroller with embedded high-speed flash memory ranging from 32 kB to 512
kB. A 128-bit wide memory interface and a unique accelerator architecture enable 32-
bit code execution at the maximum clock rate. For critical code size applications, the
alternative 16-bit Thumb mode reduces code by more than 30 % with minimal
performance penalty.

Due to their tiny size and low power consumption, LPC2141/2/4/6/8 are ideal
for applications where miniaturization is a key requirement, such as access control and
point-of-sale. A blend of serial communications interfaces ranging from a USB 2.0 Full
Speed device, multiple UARTs, SPI, SSP to I2Cs, and on chip SRAM of 8 kB up to 40
kB, make these devices very well suited for communication gateways and protocol
converters, soft modems, voice recognition and low-end imaging, providing both large
buffer size and high processing power. Various 32-bit timers, single or dual 10-bit
ADC(s), 10-bit DAC, PWM channels and 45 fast GPIO lines with up to nine edge or
level sensitive external interrupt pins make these microcontrollers particularly suitable
for industrial control and medical systems.

INDUR INSTITUTE OF ENGG & TECH, ECE 14


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.1.4 Block diagram of LPC2148

FIGURE4. 2 Block diagram of LPC2148a

INDUR INSTITUTE OF ENGG & TECH, ECE 15


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.1.5 Pin diagram of LPC2148

figure4. 3 pin configuration

PINSEL 0 It contains GPIO pins 0.0 to 0.15

PINSEL 1 It contains GPIO pins 0.16 to 0.31

PINSEL 2 It is a special case, and is used to control whether pins 1.16 to 1.31 are used
as GPIO pins, or as a debug port in combination with a hardware JTAG debugger. These
pins will not be available to use as GPIO during testing and development.

Each associated ‘pin’ in PINSEL0 and PINSEL1 is assigned a 2-bit address.

INDUR INSTITUTE OF ENGG & TECH, ECE 16


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.1.6 Features of LPC2148

• 16-bit/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.


• 8 kB to 40 kB of on-chip static RAM and 32 kB to 512 kB of on-chip flash
memory.
• 128-bit wide interface/accelerator enables high-speed 60 MHz operation.
• In-System Programming/In-Application Programming (ISP/IAP) via on-chip
boot loader software. Single flash sector or full chip erase in 400 ms and
programming of 256 bytes in 1 ms.
• Embedded ICE RT and Embedded Trace interfaces offer real-time debugging
with the on-chip Real Monitor software and high-speed tracing of instruction
execution.
• USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM.
• In addition, the LPC2146/48 provides 8 kB of on-chip RAM accessible to USB
by DMA.
• One or two (LPC2141/42 vs. LPC2144/46/48) 10-bit ADCs provide a total of
6/14 analog inputs, with conversion times as low as 2.44 s per channel.
• Single 10-bit DAC provides variable analog output (LPC2142/44/46/48 only).
• Two 32-bit timers/external event counters (with four capture and four compare
channels each), PWM unit (six outputs) and watchdog.
• Low power Real-Time Clock (RTC) with independent power and 32 kHz clock
input.
• Multiple serial interfaces including two UARTs (16C550), two Fast I2Cbus
(400 kbit/s), SPI and SSP with buffering and variable data length capabilities.
• Vectored Interrupt Controller (VIC) with configurable priorities and vector
addresses.
• Up to 45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package.

INDUR INSTITUTE OF ENGG & TECH, ECE 17


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.1.7 THUMB Concept


The key idea behind THUMB is that of a super-reduced instruction set.

Essentially, the ARM7TDMI processor has two instruction sets The standard 32-bit
ARM set

A 16-bit THUMB set

The THUMB set’s 16-bit instruction length allows it to approach twice the
density of standard ARM code while retaining most of the ARM’s performance
advantage over a traditional 16-bit processor using 16-bit registers. This is possible
because THUMB code operates on the same 32-bit register set as ARM code.

THUMB code is able to provide up to 65% of the code size of ARM, and 160%
of the performance of an equivalent ARM processor connected to a 16-bit memory
system.

4.1.8 THUMB’s Advantages


THUMB instructions operate with the standard ARM register configuration,
allowing excellent interoperability between ARM and THUMB states. Each 16-bit
THUMB instruction has a corresponding 32-bit ARM instruction with the same effect
on the processor model.

The major advantage of a 32-bit (ARM) architecture over a 16-bit architecture


is its ability to manipulate 32-bit integers with single instructions, and to address a large
address space efficiently. When processing 32-bit data, a 16-bit architecture will take
at least two instructions to perform the same task as a single ARM instruction.

THUMB breaks this constraint by implementing a 16-bit instruction length on


a 32-bit architecture, making the processing of 32-bit data efficient with a compact
instruction coding. This provides far better performance than a 16-bit architecture, with
better code density than a 32-bit architecture.

THUMB also has a major advantage over other 32-bit architectures with 16- bit
instructions. This is the ability to switch back to full ARM code and execute at full
speed.

INDUR INSTITUTE OF ENGG & TECH, ECE 18


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.2 HEART BEAT SENSOR

4.2.1 Description

A person’s heartbeat is the sound of the valves in his/her’s heart contracting or


expanding as they force blood from one region to another. The number of times the
heart beats per minute (HBPM), is the heart beat rate and the beat of the heart that can
be felt in any artery that lies close to the skin is the pulse.

FIGURE4. 4 heartbeat sensor

• Manual Way Heart beat can be checked manually by checking one’s pulses at two
locations- wrist (the radial pulse) and the neck (carotid pulse). The procedure is to
place the two fingers (index and middle finger) on the wrist (or neck below the
windpipe) and count the number of pulses for 30 seconds and then multiplying that
number by 2 to get the heart beat rate. However pressure should be applied minimum
and also fingers should be moved up and down till the pulse is felt.
• Using a sensor Heart Beat can be measured based on optical power variation as
light is scattered or absorbed during its path through the blood as the heart beat
changes.

Principle of Heartbeat Sensor

The heartbeat sensor is based on the principle of photo phlethysmography. It


measures the change in volume of blood through any organ of the body which causes a
change in the light intensity through that organ (a vascular region). In case of
applications where heart pulse rate is to be monitored, the timing of the pulses is more
important. The flow of blood volume is decided by the rate of heart pulses and since
light is absorbed by blood, the signal pulses are equivalent to the heart beat pulses.

INDUR INSTITUTE OF ENGG & TECH, ECE 19


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

There are two types of photophlethysmography

Transmission Light emitted from the light emitting device is transmitted through
any vascular region of the body like earlobe and received by the detector.

Reflection Light emitted from the light emitting device is reflected by the regions.

4.2.2 Working of a Heartbeat Sensor

The basic heartbeat sensor consists of a light emitting diode and a detector like
a light detecting resistor or a photodiode. The heart beat pulses causes a variation in the
flow of blood to different regions of the body. When a tissue is illuminated with the
light source, i.e. light emitted by the led, it either reflects (a finger tissue) or transmits
the light (earlobe). Some of the light is absorbed by the blood and the transmitted or the
reflected light is received by the light detector. The amount of light absorbed depends
on the blood volume in that tissue. The detector output is in form of electrical signal
and is proportional to the heart beat rate.

This signal is actually a DC signal relating to the tissues and the blood volume
and the AC component synchronous with the heart beat and caused by pulsatile changes
in arterial blood volume is superimposed on the DC signal. Thus the major requirement
is to isolate that AC component as it is of prime importance.

Practical Heartbeat Sensor

Practical heartbeat Sensor examples are Heart Rate Sensor (Product No PC-
3147). It consists of an infrared led and an ldr embedded onto a clip like structure. The
clip is attached to the organ (earlobe or the finger) with the detector part on the flesh.

Another example is TCRT1000, having 4 pins-

Pin1 To give supply voltage to the LED

Pin2 and 3 are grounded. Pin 4 is the output. Pin 1 is also the enable pin and pulling it
high turns the LED on and the sensor starts working. It is embedded on a wearable
device which can be worn on the wrist and the output will be sent wirelessly (through
WI-FI MODULE) to the computer for processing.

As described above regarding the principle of heart beat sensor, when the finger tissue
or the earlobe tissue is illuminated using a light source, the light is transmitted after

INDUR INSTITUTE OF ENGG & TECH, ECE 20


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

getting modulated i.e. a part getting absorbed by the blood and the rest being
transmitted. This modulated light is received by the light detector.

Here a Light Dependent Resistor (LDR) is used as a light detector. It works on the
principle that when light falls on the resistor, its resistance changes. As the light
intensity increases, the resistance decreases. Thus, the voltage drop across the resistor
decreases.

Here a comparator is used which compares the output voltage from the LDR to
that of the threshold voltage. The threshold voltage is the voltage drop across the LDR
when the light with fixed intensity, from the light source falls directly on it. The
inverting terminal of the comparator LM358 is connected to the potential divider
arrangement which is set to the threshold voltage and the non-inverting terminal is
connected to the LDR.

When a human tissue is illuminated using the light source, the intensity of the
light reduces. As this reduced light intensity falls on the LDR, the resistance increases
and as a result the voltage drop increases. When the voltage drop across the LDR or the
non-inverting input exceeds that of the inverting input, a logic high signal is developed
at the output of the comparator and in case voltage drop being lesser a logic low output
is developed. Thus the output is a series of pulses. These pulses can be fed to the
Microcontroller which accordingly processes the information to get the heart beat rate
and this is displayed on the Display interfaced to the Microcontroller.

Features

• Microcontroller based SMD design


• Heat beat indication by LED
• Instant output digital signal for directly connecting to microcontroller
• Compact Size
• Working Voltage +5V DC

Applications

• Digital Heart Rate monitor


• Patient

INDUR INSTITUTE OF ENGG & TECH, ECE 21


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.3 HUMIDITY SENSOR

4.3.1 Description

Humidity Sensor is one of the most important devices that has been widely in
consumer, industrial, biomedical, and environmental etc. applications for measuring
and monitoring Humidity.

Humidity is defined as the amount of water present in the surrounding air. This
water content in the air is a key factor in the wellness of mankind. For example, we will
feel comfortable even if the temperature is 00C with less humidity i.e. the air is dry.

But if the temperature is 100C and the humidity is high i.e. the water content of
air is high, then we will feel quite uncomfortable. Humidity is also a major factor for
operating sensitive equipment like electronics, industrial equipment, electrostatic
sensitive devices and high voltage devices etc. Such sensitive equipment must be
operated in a humidity environment that is suitable for the device

Hence, sensing, measuring, monitoring and controlling humidity is a very


important task. Some of the important areas of application for sensing, measuring and
controlling Humidity are mentioned below.

Domestic-

Sensing and controlling humidity in our homes and offices is important as


higher humidity conditions will affect the blood flow. Other areas include cooking,
indoor plantation etc.

Industrial

In industries like refineries, chemical, metal, or other industries where furnaces


are used, high humidity will reduce the amount of oxygen in the air and hence reduces
the firing rate. Other industries like food processing, textile, paper etc. also need control
of humidity.

INDUR INSTITUTE OF ENGG & TECH, ECE 22


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

Agriculture

Irrigation techniques like drip irrigation need accurate moisture content for
plants. Also, the moisture in the soil plays an important role in the proper growth of the
plant. Other areas where humidity control is required is indoor vegetation.

Electronics and Semiconductor

Almost all electronic devices are rated with a range of humidity values in which
they work as expected. Generally, this value will be something like 10% – 50%
Humidity. Semiconductor Fabs (Fabrication Plants) should maintain very precise
temperature and humidity values as even minute difference can show a huge impact in
the production.

Medical

Medical equipment like ventilators, incubators, sterilizers etc. Need humidity


control. It is also used in pharmaceutical plants and biological processes.

All the above mentioned and many other applications need sensing of Humidity
and is done using Humidity Sensors. Before discussing about Humidity Sensors, its
types and working principle, we will first see some important terms and definitions
related to Humidity.

Important Terms Related to Humidity

Moisture

Generally, the term Moisture means water content of any material or substance.
But practically, the term Moisture refers to the water content in solids and liquids. The
term Humidity refers to the water content in gases (air).

Absolute Humidity Absolute Humidity (AH) is the ratio of mass of the water
vapour to the volume of the air. If m is the mass of the water vapour and V is the total
volume i.e. volume of air and water vapour mixture, then Absolute Humidity AH is
given by

AH = m/V

INDUR INSTITUTE OF ENGG & TECH, ECE 23


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

Absolute Humidity doesn’t take temperature in to account but it changes with


temperature and pressure. Relative Humidity Whenever we talk about measuring
Humidity, it usually Relative Humidity that we are talking about (unless otherwise
specified).

Relative Humidity or RH is the ratio of the actual water vapour pressure present
in the air at a temperature to the maximum water vapour pressure present in the air at
the same temperature.

In weather reports and forecasts, the probability of precipitation or dew or fog


is indicated using Relative Humidity and hence, it is considered an important metric.

Relative Humidity takes both temperature and pressure in to consideration.


Hence, the Humidity Sensors which measure Relative Humidity, measure both the
moisture content as well as the air temperature.

NOTE

For temperatures above 1000C, measuring Relative Humidity (RH) is of no use


as it would deliver misleading values.

Specific Humidity Specific Humidity (SH) is the ratio of mass of the water
vapour to the total mass of the air. Mixing Ratio or Humidity Ratio Mixing Ratio is the
ratio of mass of the water vapour to mass of the dry air.

Dew Point Temperature Dew Point Temperature is the temperature at with the
water vapour content is saturated in the air. At Dew Point temperature, the Relative
Humidity RH is 100%. In other words, for the air to hold maximum amount of water
vapor (or moisture), it has to reach Dew Point Temperature.

Resistive Humidity Sensors (Electrical Conductivity Sensors)

Resistive Humidity Sensors are another important type of Humidity Sensors that
measure the resistance (impedance) or electrical conductivity. The principle behind
resistive humidity sensors is the fact that the conductivity in non – metallic conductors
is dependent on their water content.

INDUR INSTITUTE OF ENGG & TECH, ECE 24


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.3.2 Working of Resistive Humidity Sensors

The Resistive Humidity Sensor is usually made up of materials with relatively


low resistivity and this resistivity changes significantly with changes in humidity. The
relationship between resistance and humidity is inverse exponential. The low resistivity
material is deposited on top of two electrodes.

The electrodes are placed in inter digitized pattern to increase the contact area.
The resistivity between the electrodes changes when the top layer absorbs water and
this change can be measured with the help of a simple electric circuit.

Some of the commonly used materials are salt, specially treated substrates, solid
polyelectrolytes and conductive polymers. Modern Resistive Humidity Sensors are
coated with ceramic substance to provide extra protection. The electrodes in the sensor
are usually made of noble metals like gold, silver or platinum.

Advantages of Resistive Humidity Sensors

• Low cost
• Small Size
• The distance between the sensor and signal circuit can be large (suitable for
remote operations).
• Highly interchangeable as there are no calibration standards.

Applications of Resistive Humidity Sensors

Resistive or Electrically Conductive Humidity sensors are low cost sensors with
relatively small size. They are often used in several industrial, domestic or residential
and commercial applications

Important Considerations when Selecting a Humidity Sensor

The following are some of the factor that must be taken into consideration when
selecting a Humidity Sensor.

• Accuracy of the sensor.


• Calibration – requirements and methods
• Size of the sensor
• Cost of the sensor and cost of replacement

INDUR INSTITUTE OF ENGG & TECH, ECE 25


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

• Output repeatability
• Circuit complexity
• Resistance to contamination
• Reliability of the sensor

4.4 MOISTURE SENSOR

4.4.1 Description

The Moisture sensor is used to measure the wet condition of the baby’s bed also
for old peoples. It is fixed in the bed of the baby or old people and measure the values.
The probe can be powered with an DC supply or batteries in the range of 3.5 to 20 volts.
The output is a voltage in the range of 0 to 3v, so any multimeter can be used to measure
the moisture level.

FIGURE4. 5 Moisture sensor

SPECIFICATIONS
• Working Voltage5V
• Working Current<20mA
• Interface type Analog
• Working Temperature10°C~30°C

This sensor can be connected in two modes; Analog mode and digital mode. First,
we will connect it in Analog mode and then we will use it in Digital mode.

The soil Moisture sensor FC-28 has four pins

INDUR INSTITUTE OF ENGG & TECH, ECE 26


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

VCC For power

A0 Analog output

D0 Digital output

GND Ground

The Module also contains a potentiometer which will set the threshold value
and then this threshold value will be compared by the LM393 comparator. The output
LED will light up and down according to this threshold value.

The moisture sensor module should be connected to the as follows.

• Vcc to 5V.
• GND to GND.
• A0 to Analog 0 of microcontroller.

INDUR INSTITUTE OF ENGG & TECH, ECE 27


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.5 LCD (LIQUID CRYSTAL DISPLAY)


4.5.1 Introduction
A liquid crystal display (LCD) is a thin, flat display device made up of any
number of colour or monochrome pixels arrayed in front of a light source or reflector.
Each pixel consists of a column of liquid crystal molecules suspended between two
transparent electrodes, and two polarizing filters, the axes of polarity of which are
perpendicular to each other. Without the liquid crystals between them, light passing
through one would be blocked by the other. The liquid crystal twists the polarization of
light entering one filter to allow it to pass through the other.

A program must interact with the outside world using input and output devices
that communicate directly with a human being. One of the MOSt common devices
attached to an controller is an LCD display. Some of the MOSt common LCDs
connected to the controllers are 16X1, 16x2 and 20x2 displays. This means 16
characters per line by 1 line 16 characters per line by 2 lines and 20 characters per line
by 2 lines, respectively.

Many microcontroller devices use 'smart LCD' displays to output visual


information. LCD displays designed around LCD NTC1611 module, are inexpensive,
easy to use, and it is even possible to produce a readout using the 5X7 dots plus cursor
of the display. They have a standard ASCII set of characters and mathematical symbols.
For an 8-bit data bus, the display requires a +5V supply plus 10 I/O lines (RS RW D7
D6 D5 D4 D3 D2 D1 D0). For a 4bit data bus it only requires the supply lines plus 6
extra lines (RS RW D7 D6 D5 D4). When the LCD display is not enabled, data lines
are tri-state and they do not interfere with the operation of the microcontroller.

Even limited to character-based modules, there is still a wide variety of shapes


and sizes available. Line lengths of 8,16,20,24,32 and 40 characters are all standard, in
one, two and four-line versions. Several different LC technologies exists. “supertwist”
types, for example, offer Improved contrast and viewing angle over the older “twisted
nematicon” types. Some modules are available with back lighting, so so that they can
be viewed in dimly-lit conditions. The back lighting may be either “electro-
luminescent”, requiring a high voltage inverter circuit, or simple LED illumination.

INDUR INSTITUTE OF ENGG & TECH, ECE 28


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.5.2 Pin Description

Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16
Pins (two pins are extra in both for back-light LED connections).

FIGURE 5. 1 16x2 LCD

TABLE 4. 1 LCD DISCRIPTION

4.5.3 CONTROL LINES

EN Line is called "Enable." This control line is used to tell the LCD that you are
sending it data. To send data to the LCD, your program should make sure this line is
low (0) and then set the other two control lines and/or put data on the data bus. When

INDUR INSTITUTE OF ENGG & TECH, ECE 29


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

the other lines are completely ready, bring EN high (1) and wait for the minimum
amount of time required by the LCD datasheet (this varies from LCD to LCD), and end
by bringing it low (0) again.

RS Line is the "Register Select" line. When RS is low (0), the data is to be treated as a
command or special instruction (such as clear screen, position cursor, etc.). When RS
is high (1), the data being sent is text data which should be displayed on the screen. For
example, to display the letter "T" on the screen you would set RS high.

RW Line is the "Read/Write" control line. When RW is low (0), the information on the
data bus is being written to the LCD. When RW is high (1), the program is effectively
querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read
command. All others are write commands, so RW will alMOSt always be low. Finally,
the data bus consists of 4 or 8 lines (depending on the mode of operation selected by
the user). In the case of an 8bit data bus, the lines are referred to as DB0, DB1, DB2,
DB3, DB4, DB5, DB6, and DB7.

Writing data to the LCD

1) Set R/W bit to low


2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
Read data from data lines (if it is reading) on LCD
1) Set R/W bit to high
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low

INDUR INSTITUTE OF ENGG & TECH, ECE 30


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.6 Wi-Fi MODULE


4.6.1 Introduction
ESP8266 is Wi-Fi enabled system on chip (SoC) module developed by
Espressif system. It is mostly used for development of IoT (Internet of Things)
embedded applications.

FIGURE 5. 2 Wi-Fi Module

ESP8266 comes with capabilities of,


• 2.4 GHz Wi-Fi (802.11 b/g/n, supporting WPA/WPA2),
• General-purpose input/output (16 GPIO),
• Inter-Integrated Circuit (I²C) serial communication protocol,
• Analog-to-Digital Conversion (10-bit ADC)
• Serial Peripheral Interface (SPI) serial communication protocol,
• I²S (Inter-IC Sound) interfaces with DMA(Direct Memory
Access)
(sharing pins with GPIO),

• UART (on dedicated pins, plus a transmit-only UART can be


enabled on GPIO2), and

• Pulse-width modulation (PWM).

It employs a 32-bit RISC CPU based on the Tensilica Xtensa L106 running at
80 MHz (or overclocked to 160 MHz). It has a 64 KB boot ROM, 64 KB instruction
RAM and 96 KB data RAM. External flash memory can be accessed through SPI. It is
with the range of 100 to 1000 feets. ESP8266 module is low cost standalone wireless
transceiver that can be used for end-point IoT developments. To communicate with the

INDUR INSTITUTE OF ENGG & TECH, ECE 31


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

ESP8266 module, microcontroller needs to use set of AT commands. Microcontroller


communicates with ESP8266-01 module using UART having specified Baud rate, the
default baud rate is 115200.

There are many third-party manufacturers that produce different modules based
on this chip. So, the module comes with different pin availability options like,

• ESP-01 comes with 8 pins (2 GPIO pins) – PCB trace antenna. (shown in above
figure)
• ESP-02 comes with 8 pins, (3 GPIO pins) – U-FL antenna connector.
• ESP-03 comes with 14 pins, (7 GPIO pins) – Ceramic antenna.
• ESP-04 comes with 14 pins, (7 GPIO pins) – No ant.

4.6.2 ESP8266-01 Module Pin Description

FIGURE 5. 3 ESP8266 module Pin diagram

GND - Ground Pin.

3V3 - 3.3 V Power Pin.

RST - Active Low Reset Pin.

EN - Active High Enable Pin.

TX - Serial Transmit Pin of UART.

RX - Serial Receive Pin of UART.

INDUR INSTITUTE OF ENGG & TECH, ECE 32


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

GPIO0 & GPIO2 - General Purpose I/O Pins. These pins decide what mode (boot or
normal) the module starts up in. It also decides whether the TX/RX pins are used for
Programming the module or for serial I/O purpose.

To program the module using UART, Connect GPIO0 to ground and GPIO2 to
VCC or leave it open. To use UART for normal Serial I/O leave both the pins open
(neither VCC nor Ground).

4.6.3 ESP8266 AT Command Set

Function AT Commands Response

Working AT OK

Restart AT+RST OK

.......

Ready

Configuration OK
of software AT+CWSAP
mode ERROR

Query AT+CIPMUX? +CIPMUX<mode>


TCP/UDP
Connection

Set AT+CIPMUX=<mode> OK
TCP/UDP
Mode -
Connection
0 = Single Connection

1 = Multiple Connection

Function AT Commands Response

INDUR INSTITUTE OF ENGG & TECH, ECE 33


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

TCP/IP AT+CIPSTATUS STATUS<status>


Connection
status Possible statuses are

2 Got IP

3 Connected

4 Disconnected

Send Data (CIPMUX=0) AT+CIPSEND=<data length> OK

(CIPMUX=1) AT+CIPSEND=<id>,<data >


length>
(Note write your data after > and
enter it to send it will return
status like.)

Recv <data length> bytes

SEND OK

(after we receive response from


server if any for default auto
receive mode)

(CIPMUX=0) + IPD, <length>


<data>

(CIPMUX=1) + IPD, <id>,


<length> <data>

Configure as AT+CIPSERVER OK (Server can create only


TCP server when AT+CIPMUX=1)
Modes

0 Delete server

1 Create server

Function AT Commands Response

INDUR INSTITUTE OF ENGG & TECH, ECE 34


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

Close AT+CIPCLOSE CLOSED


TCP/UDP
OK
Connection

TABLE 4. 2 FUNCTIONS OF AT COMMAND

4.7 BUZZER
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm
devices, timers and confirmation of user input such as a mouse click or keystroke.

FIGURE 5. 4 Buzzer

Buzzer is an integrated structure of electronic transducers, DC power supply,


widely used in computers, printers, copiers, alarms, electronic toys, automotive
electronic equipment, telephones, timers and other electronic products for sound
devices. Active buzzer 5V Rated power can be directly connected to a continuous
sound, this section dedicated sensor expansion module and the board in combination,
can complete a simple circuit design, to "plug and play."

Specifications
• On-board passive buzzer
• On-board 8550 triode drive

• Can control with single-chip microcontroller IO directly

• Working voltage 5V

• Board size 22 (mm) x12 (mm)

INDUR INSTITUTE OF ENGG & TECH, ECE 35


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

Pin Configuration

1. VCC
2. Input
3. Groud

FIGURE 5. 5 Schematic Diagram

Frequency Response

How efficiently a buzzer produces sound at a given frequency.

Sound Pressure Level (Unit dB Pa)

Sound pressure level, SPL, is the deviation from atmospheric pressure caused
by the soundwave expressed in decibel Pascals. It is generally proportional to input
voltage and decays by 6 dB's when doubling the distance from the buzzer.

Resonant Frequency (Unit F0 Hz)

All things have a specific frequency at which they tend to vibrate. This
frequency is called the resonant frequency. For buzzers, the resonant frequency is the
frequency at which they will be the loudest.

Impedance (Unit ohm)

Electrical impedance is the ratio of applied voltage to current. The electrical


impedance varies with frequency Buzzers are typically used for identification and alarm
purposes across many major industries. The major application categories that utilize

INDUR INSTITUTE OF ENGG & TECH, ECE 36


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

buzzers for indication or alert purposes include home appliances, automotive


electronics, medical, safety and security, industrial, and office automation

4.8 MAX 232


4.8.1 Introduction
The MAX232 is an integrated circuit that converts signals from an RS-232 serial
port to signals suitable for use in TTL compatible digital logic circuits. The MAX232
is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals.

The drivers provide RS-232 voltage level outputs (approx. ± 7.5 V) from a
single + 5 V supply via on-chip charge pumps and external capacitors. This makes it
useful for implementing RS-232 in devices that otherwise do not need any voltages
outside the 0 V to + 5 V range, as power supply design does not need to be made more
complicated just for driving the RS-232 in this case.

The receivers reduce RS-232 inputs (which may be as high as ± 25 V), to


standard 5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a typical
hysteresis of 0.5 V. The later MAX232A is backwards compatible with the original
MAX232 but may operate at higher baud rates and can use smaller external capacitors
– 0.1μF in place of the 1.0μF capacitors used with the original device. The newer
MAX3232 is also backwards compatible, but operates at a broader voltage range, from
3 to 5.5V.

4.8.2 Pin diagram of MAX232

FIGURE 5. 6 Sound Pressure Level (Unit dB Pa)

INDUR INSTITUTE OF ENGG & TECH, ECE 37


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

Pin description

S. NO. Name Function

1 C1+ External capacitance of positive voltage multiplier unit

2 V+ Output of positive voltage of multiplier unit

3 C1- External capacitance of positive voltage multiplier unit

4 C2+ External capacitance of negative voltage multiplier unit

5 C2- External capacitance of negative voltage multiplier unit

6 V- Output of negative voltage of multiplier unit

7 T2OUT Output of transmitter data (levels RS – 232)

8 R2IN Input of receiver data (levels RS – 232)

9 R2OUT Output of receiver data (levels TTL/CMOS)

10 T2IN Input of transmitter data (levels TTL/CMOS)

11 T1IN Input of transmitter data (levels TTL/CMOS)

12 R1OUT Output of receiver data (levels TTL/CMOS)

13 R1IN Input of receiver data (levels RS – 232)

14 T1OUT Output of transmitter data (levels RS – 232)

15 GND Ground

16 VCC Supply voltage

TABLE 4. 3 Function of AT commands

INDUR INSTITUTE OF ENGG & TECH, ECE 38


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.8.3 Features of MAX232


• Input voltage levels are compatible with standard СMOS levels
• Output voltage levels are compatible with EIA/TIA-232-E levels
• Single Supply voltage 5V
• Low input current 0.1μA at ТA= 25 °С
• Output current 24mA
• Latching current not less than 450mA at ТA= 25°С
• The transmitter outputs and receiver inputs are protected to
15kV Air ESD

4.8.4 Internal circuit diagram of MAX232

FIGURE 5. 7 Circuit Diagram of Max 232

4.9 POWER SUPPLY


The input to the circuit is applied from the regulated power supply. The
a.c. input i.e., 230V from the mains supply is step down by the transformer to
12V and is fed to a rectifier. The output obtained from the rectifier is a pulsating
d.c voltage. So in order to get a pure d.c voltage, the output voltage from the
rectifier is fed to a filter to remove any a.c components present even after
rectification. Now, this voltage is given to a voltage regulator to obtain a pure
constant dc voltage.

INDUR INSTITUTE OF ENGG & TECH, ECE 39


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

4.9.1 BLOCK DIAGRAM OF POWER SUPPLY

FIGURE 5. 8 Block diagram of power supply

INDUR INSTITUTE OF ENGG & TECH, ECE 40


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

CHAPTER 5

SOFTWARE DESCRIPTION

5.1 µVISION4
µ Vision is an IDE (Integrated Development Environment) that helps you
write, compile and debug embedded programs. It encapsulates the following
components

1. A project manager.
2. A make facility.
3. Tool configuration.
4. Editor.
5. A powerful debugger.
To help you get started, several example programs (located in the
\C51\Examples, \C251\Examples, \C166\Examples, and

\ARM\...\Examples) are provided.

1. HELLO is a simple program that prints the string "Hello World" using the
Serial Interface.

5.1.1. BUILDING AN APPLICATION IN µVISION4


To build (compile, assemble, and link) an application in µVision2, you must

1.Select Project - (for example, 166\EXAMPLES\HELLO\HELLO.UV4).

2.Select Project - Rebuild all target files or Build target.

µVision4 compiles, assembles, and links the files in your project.

INDUR INSTITUTE OF ENGG & TECH, ECE 41


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

5.1.2. CREATING YOUR OWN APPLICATION IN µVISION4

To create a new project in µVision4, you must

• Select Project - New Project.


• Select a directory and enter the name of the project file.
• Select Project - Select Device and select an 8051, 251, or C16x/ST10 device
from the Device Database™.
• Create source files to add to the project.
• Select Project - Targets, Groups, Files, Add/Files, select Source Group1, and
add the source files to the project.
• Select Project - Options and set the tool options. Note when you select the target
from the Device Database all special options are set automatically. You
typically only need to configure the memory map of your target hardware.
Default memory model settings are optimal for MOSt applications.
• Select Project - Rebuild all target files or Build target.

5.1.3. DEBUGGING AN APPLICATION IN µVISION4

To debug an application created using µVision4, you must

• Select Debug - Start/Stop Debug Session.


• Use the Step toolbar buttons to single-step through your program. You may
enter G, main in the Output Window to execute to the main C function.
• Open the Serial Window using the Serial #1 button on the toolbar.
• Debug your program using standard options like Step, Go, Break, and so on

5.1.4 CREATING A PROJECT IN KEIL FOR LPC2148

1.Click on the Keil µVision Icon on Desktop.

2.The following fig will appear

INDUR INSTITUTE OF ENGG & TECH, ECE 42


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

3.Click on the Project menu from the title bar

4.Then Click on New Project

5.Save the Project by typing suitable project name with no extension in u r own folder
sited in either C\ or D\

INDUR INSTITUTE OF ENGG & TECH, ECE 43


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

6.Then Click on save button above.

7.Select LPC2148 as shown below

8.Then Click on “OK”

9.The Following fig will appear

10.Then Click either YES or NO………MOStly “NO”

11.Now your project is ready to USE

12.Now double click on the Target1, you would get another option “Source
group 1” as shown in next page.

INDUR INSTITUTE OF ENGG & TECH, ECE 44


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

13.Click on the file option from menu bar and select “new”

14.The next screen will be as shown in next page, and just maximize it by double
clicking on its blue boarder.

INDUR INSTITUTE OF ENGG & TECH, ECE 45


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

15.Now start writing program in either in “C” or “ASM”

16.For a program written in Assembly, then save it with extension “. asm” and
for “C” based

17.program save it with extension “ .C”

18.Now right click on Source group 1 and click on “Add files to Group Source”

19.Now you will get another window, on which by default “C” files will appear.

INDUR INSTITUTE OF ENGG & TECH, ECE 46


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

20.Now select as per your file extension given while saving the file

21.Click only one time on option “ADD”

22.Now Press function key F7 to compile. Any error will appear if so happen.

23.If the file contains no error, then press Control+F5 simultaneously.

24.The new window is as follows

25.Then click on “OK”

26.Now Click on the Peripherals from menu bar, and check your required port
as shown in fig below

INDUR INSTITUTE OF ENGG & TECH, ECE 47


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

27.Drag the port a side and click in the program file.

28.Now keep Pressing function key “F11” slowly and observe.

29.You are running your program.

INDUR INSTITUTE OF ENGG & TECH, ECE 48


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

RESULT

FIGURE 6. 1 OVER VIEW OF THE PROJECT

Above FIGURE 6.1 is the over view of our project which consists of
microcontroller, sensors, communication parts. If power is applied to the system ,then
it’s initialize the sensors ,LCD and communication devices

At start initializing the Wi-Fi get initialized as shown in FIGURE 6.2,then the
used get connected to the Wi-Fi using android application called TELNET.

FIGURE 6. 2 WI-FI MODULE CHECKING

After connecting the Wi-Fi with android mobile, then the LCD displays
CONNECTED, By using this we can know the system status whether system is
connected or not.

INDUR INSTITUTE OF ENGG & TECH, ECE 49


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

After completing initializing part of communication part of the system. Then


the system start collecting the data through sensors and transfer to the android
application through the Wi-Fi.

As shown below FIGURES 6.3 the sensor sense the data and transfer to the
microcontroller, then the micro controller displays the data through LCD.

FIGURE 6. 3 OUT PUT RESULTS

As shown in FIGURE 6.3, All sensors values are displayed in the LCD.

T indicates TEMPERATURE

HB indicates HEART BEAT

H indicates HUMIDITY

INDUR INSTITUTE OF ENGG & TECH, ECE 50


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

M indicates MOISTURE

Above FIGURES shows of data in android mobile which passed through


microcontroller.

INDUR INSTITUTE OF ENGG & TECH, ECE 51


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

ADVANTAGES
• Continuous monitoring It can be used in hospitals on operated patients for
monitoring their vital parameters.
• Record Keeping This system contains GUI which maintains the history of
patients.
• Increased Efficiency The number of nurses required for keeping a check on
patients can be reduced to large extent.
• More accurate Chance of human error in checking health parameters are also
reduced.

APPLICATIONS
• The staying of specialist is eliminated.
• It is multipurpose so that overall conditions are easily measured.
• Easy to operate.
• Compare with compact sensors it gives better performance.
• Easy and reliable for doctors.
• Increases efficiency.

INDUR INSTITUTE OF ENGG & TECH, ECE 52


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

CONCLUSION

In this project, we are developed and designed health monitoring system using
ARM7 for the critical as well as normal patients. For monitoring the continually
physical data of the patients, the device cans regular monitoring the condition of the
patients. This device is easy to handle every one. Its connectivity through the server by
using Wi-Fi module and ARM-7 can stored as well as display the data into digital form.
The data can be transmits and receives form long distance using IOT, and gives the
solution for villager area hospitals and patients for easy to communicate with the
superior options. Its use less power consumption and fast to communicate to the other
devices because using ARM-7 possessor, that’s why analyse the correlation between
collected data to calculate more reliable conclusions for the device technology.

INDUR INSTITUTE OF ENGG & TECH, ECE 53


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

FUTURE SCOPE

According to the availability of sensors or development in biomedical trend


more parameter can be sensed and monitored which will drastically improve the
efficiency of the wireless monitoring system in biomedical field. A graphical LCD can
be used to display a graph of rate of change of health parameters over time. The whole
health monitoring system which we have framed can be integrated into a small compact
unit as small as a cell phone or a wrist watch. This will help the patients to easily carry
this device with them wherever they go. In addition, with medical application we can
use our system in industrial and agricultural application by using sensors like fertility
check sensors, etc

We can add a GPS module in IOT patient monitoring using Arduino Uno and
Wi-Fi module project. This GPS module will find out the position or the location of the
patient using the longitude and latitude received. Then it will send this location to the
cloud that is the IOT using the Wi-Fi module. Then doctors can find out the position of
the patient in case they have to take some preventive action

INDUR INSTITUTE OF ENGG & TECH, ECE 54


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

REFERENCES
1. Mrudula Borkar, Neha Kenkre and Harshada Patke, “An Innovative approach for
Infant Monitoring System using Pulse Rate and Oxygen level”, International Journal of
Computer Applications (0975 – 8887) Volume 160 – No 5, February 2017.

2. Mohit Kumar and Mrs.Suryakala,“Temperature control and monitoring of incubators


using IoT”, International Journal of EmergingTechnology in Computer Science
&Electronics (IJETCSE) ISSN: 0976-1353 Volume 22 Issue 1 – MAY 2016.

3. Suruthi and S. Suma, “Microcontroller based baby incubator using sensors”,


International Journal of Innovative Research in Science ,Engineering and Technology
(An ISO 3297: 2007 Certified Organization), Vol. 4, Issue 12,

December 2015.

4. Shijo Joseph Mathew, S.Mathankumar and S.Vaishnodevi, “Portable neonatal


Intensive care unit”,InternationalJournal of Innovative Research in Science,

Engineering and Technology”,(An ISO 3297: 2007 CertifiedOrganization), Vol. 4,


Issue 5, May 2015.

5. N.A.A Hadi, M.H.C. Hasan, N.M.Z.Hashim, N.R.Mohamad, A.S. Rahimi

and K.A.M. Annuar, “Temperature Monitoring System for Infant Incubator Using

Arduino”, International journal for advance research, Volume 3, Issue VI,

June 2015 ISSN 2320-6802.

6. Prof. Kranti Dive and Prof. Gitanjali Kulkarani, “Design of Embedded Devicefor

Incubator for the Monitoring of Infants”, International Journal ofAdvanced Research in


Computer Science and Software Engineering, Volume 3,Issue 11, November 2013.

7. Faruk AKTAS, Emre KAVUS and Yunus KAVUS, “A Real-Time Infant Health

Monitoring System for Hard of Hearing Parents by using Android-based Mobil

Devices”, Faruk AKTAS et al. / IU-JEEE Vol. 17(1), (2017), 3107-3112.

INDUR INSTITUTE OF ENGG & TECH, ECE 55


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

APPENDIX
#include <lpc214x.h>

#include <stdio.h>
#include <string.h>
#include "lcd.h"
#include "serial.h"
//#include "gsm.h"
#include "gpio.h"
#define ON '1'//0x31
#define OFF '0' //0x30
#define heart P0_5
#define MOS P0_4
#define hum P0_3
#define buzzer P0_16
void Wi-Fiinit()
{
stringlcd(0x80,"Wi-Fi Initilizing");
string_0("AT\r\n"); delay(1500);
//okc();
string_0("ATE0\r\n");
okc();
string_0("AT+CWMODE=3\r\n");
delay(1500);
// string_0("AT+CWSAP=\"org_6547\",\"connectnow\",5,0\r\n");
delay(1500);
string_0("AT+CIPMUX=1\r\n");
delay(1500);
string_0("AT+CIPSERVER=1,23\r\n");
delay(1500);
stringlcd(0x80,"WAITING FOR CONNCT");
}

unsigned char count=0,gps_location[26];


void gps()

INDUR INSTITUTE OF ENGG & TECH, ECE 56


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

{
while(receive_1()!='C');
for(count=0;count<14;count++)
{
receive_1();
}
for(count=0;count<24;count++)
{
gps_location[count]=receive_1();
}
}
void lcdbasic()
{
clcd(1);
stringlcd(0x80,"HB");//0x83,4,5
stringlcd(0x88,"T"); //0x8A,9,a
stringlcd(0xc0,"M"); //0xc2,3,4
stringlcd(0xc6,"L"); //0xc8,9,a
stringlcd(0xcb,"H"); //0xcd,e,f
}
void beep()
{
IOSET0=buzzer;delay(2000);IOCLR0=buzzer;
}
void main() //gsm modem is connected to serial0 and system is connected to serial1
{
unsigned char rec='X',rec1='x',p;
unsigned long int cnt=0,hc=0,ht=0;
unsigned int temp=0,hb;
for(p=0;p<14;p++){rfid_t[p]=0;}
pin();
IOCLR0=buzzer;
ser_init_0(0x61,0x00);
ser_init_1(0x61,0x00); //serial initilization
initlcd();

INDUR INSTITUTE OF ENGG & TECH, ECE 57


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

stringlcd(0x80,"IOT Based Health"); //initial message


stringlcd(0xc0,"Monitoring System");
clcd(1);
Wi-Fiinit();
while(receive_0()!='C');
delay(400);
stringlcd(0x80,"CONNECTED");
delay(2500);
// delay(1000); gprs();
// InitSerial0Int((unsigned int)serial0_RxISR);
// lcdbasic();
clcd(1);
stringlcd(0x80,"T"); //0x82
stringlcd(0x88,"HB");//0x8b
stringlcd(0xc0,"H"); //0xc2
stringlcd(0xc8,"M"); //0xca
while(1)
{
temp = as1();
temp = (temp/3);
delay(300);
clcd(0x82);conv(temp);
if(temp > 50)
{ beep();
string_0("AT+CIPSEND=0,16\r\n");delay(1500);
string_0("High Temp");conv_serial_0(temp);string_0("\r\n");delay(2000);
}
for(ht=0;ht<10;ht++)
{
while(inp0(heart) == 1)
{
cnt++;
}
delay(5);
}

INDUR INSTITUTE OF ENGG & TECH, ECE 58


IOT BASED AUTOMATIC CRITICAL HEALTH MONITORING SYSTEM USING ARM -7

hb=66+cnt%10;
clcd(0x8b);conv(hb);
if(hb >= 76)
{ beep();
string_0("AT+CIPSEND=0,15\r\n");delay(1500);
string_0("High H.B");conv_serial_0(temp);string_0("\r\n");delay(2000);
}
if(inp0(hum) == 0)
{
stringlcd(0xc2,"ON ");
beep();
string_0("AT+CIPSEND=0,10\r\n");delay(1500);
string_0("High Hum\r\n");delay(2000);
}
if(inp0(hum) == 1)
{
stringlcd(0xc2,"OFF");
}
if(inp0(MOS) == 0)
{
stringlcd(0xca,"Wet");
beep();
string_0("AT+CIPSEND=0,9\r\n");delay(1500);
string_0("MOS Wet\r\n");delay(2000);
}
if(inp0(MOS) == 1)
{
stringlcd(0xca,"Dry");
}
}//end of while
}

INDUR INSTITUTE OF ENGG & TECH, ECE 59

Potrebbero piacerti anche