Professional Documents
Culture Documents
Working Methodology
4.1-Introduction:
There will be few sensors like temperature sensor, pulse sensor to detect
patient’s temperature and heart rate and electrocardiogram (ECG) Sensor. For
this we will need sensors, Adriano Mega and a power source. After taking the
reading from the patient, the data will be sent to the database through GSM
module. All data along with patient’s other information such as name, age etc.
would be stored in the database. Doctor can see the reading from a distant area
only by logging into his/her account. Both the patient and doctor mobile
application will show the patient’s, data.. Internet connection is mandatory to
use this system. GSM modem is used to make the device wearable. The patient
can move from one place to another with the device and this will not cause the
doctor any problem to monitor.
Our system model proposes a system where the vital signs from a patient are collected
using temperature sensor and pulse sensor and Spo2 sensor and ECO sensor. The
arduino receives the data from both the sensors. The GSM modem is turned on and
the network connectivity is established by activating the internet connection. The
wireless transmission of data is then in then in the database.
In this step, all the necessary sensors to monitor the patient's vital signs are attached to
their body, including a temperature sensor, ECG sensor, heart rate sensor, and oxygen
sensor (SpO2).
In this step, a connection is established between the Arduino unit, which contains a
GSM chip, and all the sensors attached to the patient's body.
3. Measure temperature
The Arduino unit reads the temperature value from the temperature sensor.
The temperature value is checked for validity to ensure it is within the normal range,
which is between 18 and 39 degrees Celsius.
If the temperature value is outside the normal range, an emergency SMS is sent
containing the patient's ID number and the temperature value.
6. Measure ECG
The Arduino unit reads ECG values from the ECG sensor.
ECG values are checked for validity to ensure they are normal.
8. Send emergency SMS if ECG is abnormal
If the ECG values are abnormal, an emergency SMS is sent containing the patient's ID
number and the ECG values.
The Arduino unit reads the heart rate value from the heart rate sensor.
The heart rate value is checked for validity to ensure it is within the normal range,
which is between 20 and 120 beats per minute.
If the heart rate value is outside the normal range, an emergency SMS is sent
containing the patient's ID number and the heart rate value.
The Arduino unit reads the blood oxygen saturation value from the oxygen sensor
(SpO2).
The blood oxygen saturation value is checked for validity to ensure it is within the
normal range, which is 95% or higher.
If the blood oxygen saturation value is less than 95%, an emergency SMS is sent
containing the patient's ID number and the blood oxygen saturation value (SpO2).
Notes
More sensors can be added to the system to monitor other vital signs, such as blood
pressure, blood sugar level, and respiratory rate.
The patient monitoring system can be used in hospitals, homes, and other care
settings.
The patient monitoring system can be connected to an alarm system to notify medical
staff in case of any emergency.
4.4 -Operation ,Results and Discussions
In this part, we will talk about the method of connecting each part of the project,
where a group of sensors were used and connected to the Arduino Mage device, and
each sensor has a special guest that performs it in order to monitor the patient’s health
condition.
It can be used to control a variety of devices, such as lights, music, and video.
It can also be used to control a variety of sensors, such as an ECG sensor, MAX6675
sensor, and SIM800L GSM sensor.
ATmega2650P Microcontroller
5V Operating Voltage
7-12V Input Voltage (recommended)
6-20V Input Voltage (limit)
14 (of which 6 provide PWM output) Digital I/O Pins
6 PWM Digital I/O Pins
6 Analog Input Pins
20 mA DC Current per I/O Pin
50 Ma DC Current for 3.3V Pin
32 KB (ATmega328P)
Flash Memory
of which 0.5 KB used by boot loader
2 KB (ATmega328P) SRAM
1 KB (ATmega328P) EEPROM
16 MHz Clock Speed
68.6 mm Length
53.4 mm Width
25 g Weight
Data from the MAX6675 sensor can be used to control a thermostat or other devices.
The following table shows how to connect the temperature sensor to the Arduino
Mage .
Arduino Max6675
5V VCC
GND GND
Data from the ECG sensor can be used to diagnose a variety of heart conditions.
The following table shows how to connect the Electrocardiogram (ECG) Sensor to the
Arduino Mage.
Arduino AD8232ECG Sensor
GND GND
3.3V VDD
Analog#1 Output
Digital#9 LO+
Digital#8 LO-
4.4.4 Heart
rate and Spo2
Table 3.3 - sensor:
Wired Max6675 Electrocardiogram (ECG) Sensor with Arduino Mage
Using MAX30100 with Arduino Mega 2560 for Heart Rate and SpO2 Monitoring
The MAX30100 sensor paired with an Arduino Mega 2560 can be a powerful tool for
building a basic heart rate and SpO2 monitoring system.
The following table shows how to connect the Heart rate and Spo2 sensor to the
Arduino Mage
SV VIN
GND GND
Analog#5 SCL
Analog#4 SDA
Table 3.4 - Wired Max 30100 (Heart rate and Spo2 sensor) with Arduino Mage
Now we have connected these three sensors to the Arduino, as we can see in the tables
above, where each sensor has its own method of connection. Now we will learn about
the rest of the sensors and the connection method for each sensor, as shown in the
figure4.3
4.4.5 GSM With Arduino:Figure4.3- Linking metho
It is a GSM module that allows the Arduino board to communicate with cellular
networks.
The SIM800L GSM can be used to send text messages, make calls, or connect to the
internet.
The following table shows how to connect the GSM to the Arduino Mage.
Arduino SIM800L
5V VCC
GND GND
Digital#2 TXD
Digital#3 RXD
GND GND
The following table shows how to connect the LCD to the Arduino Mage
Arduino LCD12864B
GND GND
5V VCC
Digital#10 RS
Digital#11 R/W
Digital#13 E
GND PSB
3.3V BLA
GND BLK
The amplified ECG sensor signal is sent to the Arduino Mega 2560 board.
The Arduino Mega 2560 board analyzes the ECG sensor signal and determines if there
is any abnormal heart condition.
If an abnormal heart condition is detected, the Arduino Mega 2560 board can send a
text message or make a phone call to notify the user.
The amplified MAX6675 sensor signal is sent to the Arduino Mega 2560 board.
The Arduino Mega 2560 board analyzes the MAX6675 sensor signal and determines
the temperature.
The Arduino Mega 2560 board can be used to control a thermostat or other devices
based on the temperature.
The Arduino Mega 2560 board can also connect to the internet and send temperature
data to a web server.
The SIM800L GSM can be used to send text messages, make calls, or connect to the
internet.
4.5 -Source Code:
4.5.1 Code Arduino
Calling the libraries :
#include "Arduino.h"
#include "U8g2lib.h"
#include "max6675.h"
#include <SoftwareSerial.h>
SoftwareSerial SIM800(10,11);
// SoftSerial( RX , TX );
// 10 pin connect to TX of GSM SIM 900 Module
// 11 pin connect to RX of GSM SIM 900 Module
int PulseSensorPurplePin = 7;
// Pulse Sensor PURPLE WIRE connected to ANALOG PIN 0
int Signal;
// holds the incoming raw data. Signal value can range from 0-1024 Heart
Rate Sensor
Serial.println("leads off!");
timer = millis();
else {
value = analogRead(A0);
value = map(value, 250, 400, 0, 100); //to flatten the ecg values a
bit
count++;
Serial.println("in");
flag = 1;
instance1 = micros();
flag = 0;
hr = count*6;
timer = millis();
count = 0;
do
{
draw("Temp: "+String(thermocouple.readCelsius())+ " C", "Heart
Rate :" +String (Signal), "HRV :" + String (hrv));
if ((thermocouple.readCelsius() > 38) || (thermocouple.readCelsius()
< 18)) {
Serial.println("Emergency");
tone(buzzer, 1000); // Send 1KHz sound signal...
delay(1000); // ...for 1 sec
noTone(buzzer); // Stop sound...
delay(1000); // ...for 1sec
SendMessage("Emergency Alarm , "+
String(thermocouple.readCelsius())+ " C");
delay(5000);
}
else if (Signal < 20 || Signal >200){
Serial.println("Emergency");
tone(buzzer, 1000); // Send 1KHz sound signal...
delay(1000); // ...for 1 sec
noTone(buzzer); // Stop sound...
delay(1000); // ...for 1sec
SendMessage("Emergency Alarm HR= , "+ String(Signal));
delay(5000);
}
else if (hrv < 20){
Serial.println("Emergency");
tone(buzzer, 1000); // Send 1KHz sound signal...
delay(1000); // ...for 1 sec
noTone(buzzer); // Stop sound...
delay(1000); // ...for 1sec
SendMessage("Emergency Alarm HRV= , "+ String(hrv));
delay(5000);
}
} while (u8g2.nextPage());
delay(1000);
}