0% found this document useful (0 votes)
59 views15 pages

IoT Based Health Monitoring System

The document outlines an IoT-based health monitoring system utilizing Arduino and ESP8266 to collect and transmit patient health data, including heart rate and body temperature. It details the hardware components, software applications, and the functionality of the system, which allows for remote monitoring and alerts for abnormal health conditions. The integration with ThingSpeak enables data visualization and analysis, enhancing the overall management of individual health.

Uploaded by

Sakthi Vel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views15 pages

IoT Based Health Monitoring System

The document outlines an IoT-based health monitoring system utilizing Arduino and ESP8266 to collect and transmit patient health data, including heart rate and body temperature. It details the hardware components, software applications, and the functionality of the system, which allows for remote monitoring and alerts for abnormal health conditions. The integration with ThingSpeak enables data visualization and analysis, enhancing the overall management of individual health.

Uploaded by

Sakthi Vel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

IoT based health

monitoring system |
Arduino Project
IoTbased patient health monitoring system using Arduino and generic ESP8266. The
proposed project can collect and send patient’s health data

Things used in this project


Hardware components

Ardino UNO × 1

ESP8266 × 1

Heart rate Sensor

Lm35 Temperature Sensor × 1

Rotary Potentiometer, 10 kohm × 1

RGB LCD Shield Kit, 16x2 Character Display × 1

Solderless Breadboard Half Size × 1

Jumper wires (generic) × 1

9V battery (generic) × 1

Software apps and online services


Thingsspeak apk

Ardino IDE

Story
Hardware components:-
1. Arduino Uno:-

Fig: Arduino uno


The Arduino Uno R3 is an ATmega328P microcontroller-based development
board. This is widely popular in Embedded electronics because of the
available resources and easy to use by everybody features. With 14 digital
input/output pins where 6 can be configured and used as PWM outputs, 6 as
analog inputs is a great addition for I/O related operations. Powered with a 16
MHz ceramic resonator, an USB connection, a power jack, an ICSP header,
and a reset button.

It includes a LED that can be useful in multiple applications or to test the


board functionality. A voltage regulator, better to say an LDO, is available
inside this development board to make this Arduino compatible for a wide
range of input voltages. The application is very easy, just upload the code,
and run.

Features:

 Model Type: UNO Rev R3


 Microcontroller Chip: ATmega328P

 Operating Voltage (VDC): 5

 Input Voltage (Recommended): 7-12V

 Input Voltage (limit): 6-20V

 Analog I/O Pins: 6

 Digital I/O Pins: 14 (of which 6 provide PWM output)

 PWM Digital I/O Pins: 6

 DC Current per I/O Pin (mA): 40

 DC Current for 3.3V Pin (mA): 50

 Clock Speed: 16 MHz

 SRAM (KB): 2

 EEPROM: 1 KB (ATmega328)
 Flash Memory: 32 KB

 On Board LEDs: On/Off, L (PIN 13), TX, RX

 Dimensions in mm (LxWxH): 75 x 54 x 12

2. Pulse sensor:-

fig: Pulse sensor

It is easy to use a Pulse sensor that can be used to detect the Heart Rate of a
Person. Heart rate is essential to determine your health and also to monitor
while working out or running. This works on a principle called
photoplethysmography, which means the changes in the volume of blood in
an organ is measured by the changes in the intensity of the light passing
through that organ hence the emitted light from the LED will be received by
photosensor only when there is blood in the vein hence measuring the pulse.
The output signal is further conditioned and filtered to give the final output.
This Heartbeat sensor module can be easily used with Arduino to monitor
anxiety levels, remote patient monitoring or exercise routines.

Specifications

 Operating Voltage: +5V or +3.3V


 Plug and Play type sensor

 Maximum Current Consumption: 4mA

 Inbuilt Amplification and Noise cancellation circuit.

 Small Size makes it suitable for battery-powered devices.

 Diameter: 0.625”

 Thickness: 0.125” Thick

3. Temperature sensor:-

This LM35D Analog Temperature Sensor Module is based on the


semiconductor LM35 temperature sensor. The LM35 Linear Temperature
Sensor module is useful in detecting ambient air temperature. Sensitivity is
10mV per degree Celsius. The output voltage is proportional to the
temperature.
It also possesses the low self-heating and does not cause more than 0.1 °C
temperature rise in still air. The operating temperature range is from -55°C to
150°C. The output voltage varies by 10mV in response to every °C rise/fall in
ambient temperature., its scale factor is 0.01V/°C. It is commonly used as a
temperature measurement sensors. It includes thermocouples, platinum
resistance, thermal resistance and temperature semiconductor chips, which
commonly used in high-temperature measurement thermocouples. The
LM35D linear temperature sensor and sensor-specific expansion of Arduino
Board, in combination, can be very easy to achieve.

SOFTWARE:-
1. Arduino IDE:-

The Arduino Integrated Development Environment (IDE) is a software


platform used for programming and developing applications for Arduino
microcontroller boards. It provides a user-friendly interface for writing,
compiling, and uploading code to Arduino boards. Here's a breakdown of its
main features and components:

1. Code Editor: The Arduino IDE includes a simple but powerful code editor
where users can write their Arduino sketches (programs). The editor provides
syntax highlighting, auto-indentation, and other features to make coding
easier.

2. Sketches: In Arduino terminology, programs are called "sketches."


Sketches are written in the C or C++ programming languages and typically
consist of two main functions: `setup()` and `loop()`. The `setup()` function is
executed once when the Arduino board is powered on or reset, while the
`loop()` function runs continuously in a loop until the board is powered off or
reset.

3. Library Manager: The Arduino IDE comes with a library manager that
allows users to easily install and manage libraries. Libraries are collections of
pre-written code that extend the functionality of the Arduino platform. They
can include drivers for sensors, communication protocols, display modules,
and more.
4. Serial Monitor: The Serial Monitor is a built-in tool in the Arduino IDE that
allows users to communicate with their Arduino board via the serial port. It's
commonly used for debugging purposes, displaying sensor readings, or
sending commands to the Arduino board.

5. Board Manager: The Board Manager is used to install board definitions for
different Arduino-compatible microcontroller boards. It supports a wide range
of Arduino boards, including the popular Arduino Uno, Arduino Mega, and
Arduino Nano, as well as boards from other manufacturers.

6. Upload: The Arduino IDE simplifies the process of uploading code to


Arduino boards. Users can select the appropriate board and serial port from
the IDE's menu, then click the "Upload" button to compile the code and
transfer it to the board.

7. Tools and Preferences: The Arduino IDE provides various tools and
preferences that allow users to customize their development environment.
This includes options for setting the board type, specifying the programmer,
adjusting compilation settings, and more.

2. ThingSpeak:-

ThingSpeak is a robust Internet of Things (IoT) platform designed for efficient


data management and analysis. With ThingSpeak, users can seamlessly
collect and store data from a variety of IoT devices and sensors. The platform
organizes data into channels, each comprising multiple fields that can
accommodate diverse types of information. For instance, fields may be
designated for temperature, humidity, pressure, or any other relevant data.

One of ThingSpeak's strengths lies in its visualization capabilities, allowing


users to create charts, graphs, and maps to interpret and understand data
trends effectively. The platform also supports reactions, enabling users to set
up automated responses based on specific data conditions. This can include
triggering notifications, tweets, or other actions, enhancing the platform's utility
in real-time monitoring and control applications.
ThingSpeak fosters easy integration with popular IoT devices such as
Arduino, Raspberry Pi, and ESP8266 through its accessible APIs, enabling
seamless data transmission to ThingSpeak channels. Additionally, the
platform's open-source nature, based on MATLAB, provides flexibility for
customization according to user requirements.

With an active community and extensive documentation, ThingSpeak caters


to a diverse user base. It offers both free and paid plans, with the former
providing fundamental features and the latter unlocking advanced
functionalities and higher data storage capacities. Whether for hobbyist
projects or industrial applications, ThingSpeak stands as a comprehensive
and accessible solution for IoT data management and analysis.

To create a channel on ThingSpeak, follow


these steps: -
 Sign Up or Log In: If you don't have a ThingSpeak account, go to the
ThingSpeak website (https://thingspeak.com/) and sign up for a new
account. If you already have an account, log in using your credentials.
 Navigate to Channels: After signing in, click on the "Channels" tab in the
top navigation bar.

 Create a New Channel: On the Channels page, click the "New Channel"
button

 Fill in Channel Information: Fill in the required information for your new
channel: Name: Give your channel a descriptive name. Description:
Provide a brief description of your channel. Field 1, Field 2, etc.: These
fields represent the data fields for your channel. You can use them to
store different types of data.

 Advanced Settings (Optional): You can configure advanced settings for


your channel, such as the type of data, privacy settings, and more.
Adjust these settings according to your requirements.

 Save Channel: Click the "Save Channel" button to create your channel.
 Get API Key: After creating the channel, go to the "API Keys" tab to
obtain your Write API Key. This key is needed to update data on your
channel.

IoT based patient health monitoring system is a generic term given to


any medical equipment that has internet capability and can measure one
or more health data of a patient who is connected to the device such as
heartbeat, body temperature, blood pressure, ECG, steps etc. The
equipment can record, transmit and alert if there is any abrupt change in
the patient’s health.

By this definition, it includes devices such as smart-watches, fitness trackers,


smart-phones to expensive hospital equipment which can connect to internet.

IoT based health monitoring system is used where the patient and heath
expert(s) are at different locations. For example, a patient can stay at home
and continue his/her routine life and a doctor can monitor patient’s heath.
Based on the received data the heath expert can prescribe a best treatment or
take an immediate action in case of an emergency.

An IoT based health monitoring system using ThingSpeak is a project that


involves integrating various sensors and devices to gather and analyze health
data of an individual. ThingSpeak is an open-source IoT platform that provides
an easy-to-use interface to collect, analyze, and visualize data from IoT
devices.

The system can be designed to monitor various health parameters such as


heart rate, blood pressure, body temperature, oxygen level, and many others.
The data collected from the sensors can be transmitted to a ThingSpeak
channel using a Wi-Fi module such as ESP8266 or ESP32. The data can be
then analyzed using MATLAB or other programming languages supported by
ThingSpeak.

The system can be designed to send alerts or notifications to the individual or


caregiver in case of abnormal readings or health issues. For instance, if the
blood pressure reading goes beyond a certain threshold level, the system can
send a notification to the individual and also to the healthcare provider for
immediate attention.

Moreover, the system can also be integrated with wearable devices such as
smartwatches or fitness trackers to monitor the physical activity of an
individual. This can help in analyzing the overall health of an individual and
provide personalized recommendations for improvement.

The ThingSpeak platform also provides visualization tools to create charts,


graphs, and other visual representations of the health data. This can help in
tracking the progress of an individual and providing insights into their health
patterns.

Overall, an IoT based health monitoring system using ThingSpeak can


provide a comprehensive approach to monitor and manage an individual's
health. It can enable early detection of health issues and provide timely
intervention, thus improving the overall quality of life.
1/2

Working:-

The IoT-based health monitoring system utilizes an Arduino Uno


microcontroller interfaced with a pulse sensor and an LM35 temperature
sensor. The Arduino continuously collects data from these sensors. The pulse
sensor measures heart rate, while the LM35 sensor monitors body
temperature. This data is then processed and transmitted to the ThingSpeak
cloud platform through the internet using ThingSpeak's API.

ThingSpeak allows users to create channels to store and visualize data in


real-time. With the received data, users can monitor health parameters
remotely through a web interface. Additionally, ThingSpeak offers analytical
tools to detect trends and anomalies in the data. Users can set up alerts
based on predefined thresholds, enabling timely notifications for abnormal
health conditions.

Schematics
IoT based health monitoring system | Arduino
Project

Code
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#define USE_ARDUINO_INTERRUPTS true
#include <PulseSensorPlayground.h>
SoftwareSerial esp(10, 11);
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
#define ONE_WIRE_BUS 9
#define TEMPERATURE_PRECISION 12
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
DeviceAddress tempDeviceAddress;
int numberOfDevices, temp, buzzer = 8;
const int PulseWire = A0;
int myBPM, Threshold = 550;
PulseSensorPlayground pulseSensor;
unsigned long previousMillis = 0;
const long interval = 5000;
void setup()
{
lcd.begin(16, 2);
Serial.begin(9600);
esp.begin(115200);
sensors.begin();
numberOfDevices = sensors.getDeviceCount();
pulseSensor.analogInput(PulseWire);
pulseSensor.setThreshold(Threshold);
pulseSensor.begin();
pinMode(buzzer, OUTPUT);
digitalWrite(buzzer, HIGH);
lcd.setCursor(0, 0);
lcd.print(" IoT Patient");
lcd.setCursor(0, 1);
lcd.print(" Monitor System");
delay(1500);
digitalWrite(buzzer, LOW);
lcd.clear();
}

void loop()
{
myBPM = pulseSensor.getBeatsPerMinute();
if (pulseSensor.sawStartOfBeat())
{
beep();
lcd.setCursor(0, 1);
lcd.print("HEART:");
lcd.print(myBPM);
lcd.setCursor(9, 1);
lcd.print(" BPM");
delay(20);
}
sensors.requestTemperatures();
for (int i = 0; i < numberOfDevices; i++)
{
if (sensors.getAddress(tempDeviceAddress, i))
{
temp = printTemperature(tempDeviceAddress);
lcd.setCursor(0, 0);
lcd.print("BODY:");
lcd.print(temp);
lcd.print(" *C");
}
}
upload();
}

int printTemperature(DeviceAddress deviceAddress)


{
int tempC = sensors.getTempC(deviceAddress);
return tempC;
}

void beep()
{
digitalWrite(buzzer, HIGH);
delay(150);
digitalWrite(buzzer, LOW);
}

void upload()
{
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval)
{
previousMillis = currentMillis;
esp.print('*');
esp.print(myBPM);
esp.print(temp);
esp.println('#');
}
}

You might also like