You are on page 1of 17

A MINI PROJECT ON

SMART CHAIR
Roll No Name

17121a1226 G Vanitha
17121a1227 G Jaswanth Tej
17121a1228 G Haritha
17121a1229 G Sreekanth
17121a1230 G Chandrakanth
17121a1231 G T Prasanna
17121a1250 K Samthrusha
17121a1252 K Hasitha

Department of Information Technology

SREE VIDYANIKETHAN ENGINEERING COLLEGE

(Autonomous)

(Affiliated to JNTUA Ananthapuramu, Approved by AICTE Accredited by NBA & NAAC with ‘A’ grade)

Sree Sainath Nagar, A.Rangampet, Near Tirupati - 517 102, A.P.

2019-2020
CONTENTS

S.No Topic Page No.

Abstract

1 Introduction 4

2 Modules 5-7

3 Implementation 8-12

5 Results 13-16

6 Conclusion 16

References

Smart Chair Page 2


Abstract
In everyday life chair is essential for every individual. In the places like house, office and
hospitals, chair is used for long duration. The proposed system is a IoT technology enabled
chair, that can be used in home, office and hospitals by implanting/attaching the health
sensors like Pulse sensor to the node MCU micro-controller together with the thing speak
cloud platform.

Using this we can know the pulse rate of a person from anywhere, so that it helps us in
predicting the tough situations in which humans can even lose their lives. We can even add
other sensors in monitoring different aspects of the human health.

When we place the pulse sensor on the wrist, it reads the data and sends to ThingSpeak cloud
from which we can access the data using this web page. The system shows the variation in
pulse rate along with time. In this way we can find the pulse rate from anywhere using this
system.

Smart Chair Page 3


1. Introduction
As indicated by the ongoing measurements, almost two million individuals experience the ill
effects of heart assault each year and one individual kicks the bucket like clockwork in India.
World Health Organization (WHO) reports that Coronary illness rate may increment to
23.3% worldwide constantly 2030. The treatment of such ceaseless illness requires constant
and long haul observing to have legitimate control on it. IoT moves from manual pulse
checking frameworks to remote pulse observing frameworks A specialist may not be
available all an opportunity to give medicine or treatment to the patients or a gatekeeper may
not be available all an opportunity to take the patient to the clinic. So this project is the
correct answer for this issue.

The pulse sensor held along the chair monitors the heart rate of the person and with this web
page we can view the pulse rate of the person easily.

Early models consisted of a monitoring box with a set of electrode leads that attached to the
chest. The heart rate of a healthy adult at rest is around 72 beats per minute (bpm) & Babies
at around 120 bpm, while older children have heart rates at around 90 bpm. The heart rate
rises gradually during exercises and returns slowly to the rest value after exercise . The rate
when the pulse returns to normal is an indication of the fitness of the person. Lower than
normal heart rates are usually an indication of a condition known as bradycardia, while
higher is known as tachycardia. Heart rate is simply measured by placing the thumb over the
subject’s arterial pulsation, and feeling, timing and counting the pulses usually in a 30 second
period. Heart rate (bpm) of the subject is then found by multiplying the obtained number by
2. This method although simple, is not accurate and can give errors when the rate is high.

Fig 1.1 : Methods of finding PULSE rate manually

Smart Chair Page 4


2. Modules
2.1 HOME PAGE

2.2 USER VALIDATION


2.2.1 Registration
2.2.2 Login
2.2.3 Update Profile
2.2.4 Forgot Password
2.2.5 Change Password
2.3 PERSON MODULE
2.3.1 Dashboard
2.3.2 Patient’s Condition
2.3.3 Result
2.3.4 Tips
2.1 HOME PAGE

This displays the main page of the website with the options LOGIN, REGISTRATION, TIPS
.Based on user’s selection it navigates to the desired page.

2.2 USER VALIDATION

2.2.1 Registration

This page consists of a form in which the user enters his/her details. These details are stored
into a database and this is the first step to be followed by every new user. After a successful
registration it navigates to LOGIN page.

2.2.2 Login

This shows the user to enter Email ID and password and checks the entered details with the
details stored in the database. If the data entered matches to the data stored in the database
then it navigates to the dashboard. If either of the fields doesn’t match to the data stored in

Smart Chair Page 5


database then it again navigates to the login page. Here, you can select Forget password
option if you forget your password.

2.2.3 Update Profile

This page helps to edit the details entered during the process of registration and saves the
newly entered data.

2.2.4 Forget Password

It provides a method to login when user forgets his/her password. In this page users can set
their password again.. It asks the user to enter their Name and Email ID checks whether
he/she is a valid user and then navigates to reset_password.php page, where the user can set
their new password.

2.2.5 Change Password

Forget password is used when the user forgets their password whereas change password is
used to change the existing password of the user after his/her login.

2.3 PATIENT MODULE

2.3.1 Dashboard

Here we can see the options to either UPDATE profile or to view Person’s condition.

2.3.2 Patient’s Condition

On successful login, user can select this option to view the pulse rate of the person who is
using the sensor. This can be viewed in the form of a graph where the variation in pulse rate
is drawn along the variation of time and a widget which points to the pulse rate

2.3.3 RESULT

On clicking the check pulse user can view the Pulse of the patient in the page.

2.3.4 Tips

Some tips regarding the maintenance of healthy heart are provided here.

Smart Chair Page 6


Connections

Node MCU_______ Pulse Sensor

3.3V____________ +

GND____________-

A0 _____________S

After connecting the pulse sensor to Node MCU ,the following Arduino code is uploaded to
it. And then it is connected to THINGSPEAK cloud from which we take the data to be
displayed in the webpage .From Thingspeak cloud we obtain the link to the data read by the
sensor. Later the pulse is placed on wrist as shown in the Fig 3.1.

Fig 2.1 Placement of Pulse Sensor

Smart Chair Page 7


3. IMPLEMENTATION
3.1 Arduino Code
#define pulsePin A0
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
HTTPClient http;
String thingSpeakAddress= "http://api.thingspeak.com/update?";
const char* ssid = "Lenovo K8 Note";
const char* password = "vanitha22";
String request_string;
WiFiClient client;
const int channelID =884249;
const int postingInterval = 10 * 1000;

int rate[10];
unsigned long sampleCounter = 0;
unsigned long lastBeatTime = 0;
unsigned long lastTime = 0, N;
int BPM = 0;
int IBI = 0;
int P = 512;
int T = 512;
int thresh = 512;
int amp = 100;
int Signal;
boolean Pulse = false;
boolean firstBeat = true;
boolean secondBeat = true;
boolean QS = false;

Smart Chair Page 8


void setup() {
Serial.begin(9600);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}}
void loop() {
if (QS == true) {
Serial.println("BPM: "+ String(BPM));
QS = false;
} else if (millis() >= (lastTime + 2)) {
readPulse();
lastTime = millis();
}
}
void readPulse() {
Signal = analogRead(pulsePin);
sampleCounter += 2;
int N = sampleCounter - lastBeatTime;
detectSetHighLow();
if (N > 250) {
if ( (Signal > thresh) && (Pulse == false) && (N > (IBI / 5) * 3) )
pulseDetected();
}
if (Signal < thresh && Pulse == true) {
Pulse = false;
amp = P - T;
thresh = amp / 2 + T;
P = thresh;

Smart Chair Page 9


T = thresh;
}
if (N > 2500) {
thresh = 512;
P = 512;
T = 512;
lastBeatTime = sampleCounter;
firstBeat = true;
secondBeat = true;
}
}
void detectSetHighLow() {
if (Signal < thresh && N > (IBI / 5) * 3) {
if (Signal < T) {
T = Signal;
}
}if (Signal > thresh && Signal > P) {
P = Signal;
} }
void pulseDetected() {
Pulse = true;
IBI = sampleCounter - lastBeatTime;
lastBeatTime = sampleCounter;
if (firstBeat) {
firstBeat = false;
return;
}
if (secondBeat) {
secondBeat = false;

Smart Chair Page 10


for (int i = 0; i <= 9; i++) {
rate[i] = IBI;
}}
word runningTotal = 0;
for (int i = 0; i <= 8; i++) {
rate[i] = rate[i + 1];
runningTotal += rate[i];
}
rate[9] = IBI;
runningTotal += rate[9];
runningTotal /= 10;
BPM = 60000 / runningTotal;
QS = true;
if (client.connect("api.thingspeak.com",80)) {
request_string = thingSpeakAddress;
request_string += "key=";
request_string += "OWP9RSHBAUZ2QD7Z";
request_string += "&";
request_string += "field1";
request_string += "=";
request_string += BPM;
http.begin(request_string);
http.GET();
http.end();
} client.stop();
delay(postingInterval);
}

Smart Chair Page 11


3.2 USER MODULE
3.2.1 REGISTRATION FORM
CSS, HTML, PHP, Bootstrap, JavaScript are used in developing this page.

3.2.2 LOGIN FORM


The concepts used in development of this module are HTML, CSS, PHP .

3.2.3 UPDATE PROFILE


HTML, CSS, PHP, JavaScript are used in the development of this web page.

3.2.4 CHANGE PASSWORD


HTML, CSS, JavaScript, PHP are the concepts used in the development of this page

3.3 PATIENT MODULES


3.3.1 DASHBOARD
HTML, CSS, PHP are used in developing this page.

3.3.2 PATIENT CONDITION


.This page is developed with the help of HTML, PHP,CSS.

3.3.3 RESULT

HTML, CSS are used in the development of this page.

3.3.4 TIPS
HTML, CSS are used in the development of this page.

Smart Chair Page 12


4.Results
This figure represents the HOME page of the system .

Fig 4.1 Home page

Fig 4.2 shows the fields in the registration page.After successful registration we get the
login page as in Fig 4.3

Smart Chair Page 13


Fig 4.3 USER LOGIN

On unsuccessfull attemp it shows an error message as shown in Fig 4.4

After successful login we can see the page shown in the Fig 4.5

Fig 4.4 LOGIN ERROR

Smart Chair Page 14


Fig 4.5 FORGOT PASSWORD

Fig 4.6 DASHBOARD

Smart Chair Page 15


Fig 4.7 TIPS

Fig 4.8 PULSE RATE

6. Conclusion
It is a very efficient system and very easy to handle .This smart chair helps us to be alerted of
some unexpected situations and this can be further improved by adding some other sensors
and providing SMS alert etc..,

Smart Chair Page 16


References
1. Kogent Learning Solutions Inc, HTML 5 Black Book: Covers CSS3, JavaScript,
XML, XHTML, AJAX, PHP and JQuery, Dreamtech Press, Second Edition, 2016.
2. W. Jason Gilmore, Beginning PHP and MySQL, APress, Fourth Edition, 2011.
3. Snig Bahumik, Bootstrap Essentials, PACKT Publishing, 2015 (e-book).
4. Thomas A. Powell, The Complete Reference: HTML and CSS, Tata McGraw Hill,
Fifth Edition, 2010. 3. Andrea Tarr, PHP and MySQL, Willy India, 2012.
5. “Wearable Heart Beat ESP8266+PulseSensor”
https://www.instructables.com/id/Wearable-heart-beat-sensor-ESP8266Pulse-sensor/
drafted on 29.09.19
6. “Online Heart Rate Monitor Using NodeMCU and Cayenne”
https://www.instructables.com/id/Online-Heart-Rate-Monitor-Using-NodeMCU-and-
Cayenn/ drafted on 2.10.19
7. “ESP8266 Node MCU Handling HTML web forms data”
https://circuits4you.com/2019/03/20/esp8266-receive-post-get-request-data-from-
website/ drafted on 14.09.19

Smart Chair Page 17

You might also like