Medical Emergency Alert and Monitoring System using Glucose
and Temperature Sensor
Abstract.
The Medical Emergency Alert and
Monitoring System is a device that is devised by software to provide assistance
to patients and reduce and limit the dependency on doctors at all times of
emergency. Accuracy and precision of the overall system at the prelim stage is
high but will be evolved with further development.
1 Introduction
Medical
Emergency Alert and Monitoring System is a designed system to assist and
monitor clinical data of the patient and take a proactive control over the kind
of emergency that has been generated. With the involvement of various sensors,
different vital parameters can be monitored. The purpose of this project was to
focus on taking control actions by controlling the blood glucose level of the
body along with monitoring real time temperature.
1.1 Background
[1]Considering the
statistical database in the US alone for the number of senior citizens
(diabetes) requiring timely care in emergency situation, the number would be
around 28.5 %( 2007-2010). The mortality rate of individuals living alone and
65 years and above is around 1,904,640 as per the year 2007-2010. With this
objective the Medical Emergency Alert System is designed to control severe
conditions and save the patient life thus reducing the dependency rate in older
individuals. Monitoring the blood glucose level is essential since the main
sugar intake from the diet of an individual the body makes is glucose which is
carried in the bloodstream & this glucose is difficult to be used by the
cell without the help of insulin. In older individuals the breakdown of this
protein is difficult and hence the number of patients suffering from diabetes
has vastly increased. The amount of blood glucose level in an individual can be
either in the low or the high state (Diabetes/Hyperglycemia or Hypoglycemia).
Diabetes is a condition where the body requires the intake of insulin in a
timely manner since the body is unable to produce large amounts.
1.2 Project Aim
The project involved the development and achieving four
different goals to produce a working prototype model of this system.
Aim 1: To obtain accurate and correct readings from the sensors
to be read on the system, to achieve this aim the sensor was calibrated in the
Arduino sketch to normal set values and obtained in real time
Aim 2: Diagnostic Action on the readings observed, which was
achieved with the help of the GUI and its push buttons to simulate the
prototype model and e-mail alerts are generated when conditions for emergency
is fulfilled.
Fig I.
MATLAB GUI for the simulation of the entire alert system.
Aim 3: Interfacing the software and hardware: The MATLAB and
Arduino sketch displayed the functioning of the system on a digital
system(Computer) and the serial communication between the two was achieved and
thus the graphs on the GUI was plot with respect to the sensor readings
obtained in real time.
Aim 4: Designing of syringe pump: The syringe pump was an
auto-motor controlled device based on the alert action generated to push the
syringe to provide 1 ml/10 sec of fluid.
2 Design and Working
Model
The
system is an integration of multiple sensors and hardware along with software.
The system has the following components:
àBody Temperature Sensor
àBody glucose meter
àArduino UNO board
àCooking Hacks e-Health board
àFirgelli Linear Actuator
Body
Temperature Sensor.
The
temperature sensor is a continuous sensor which measures the sensor through the
metallic part and displays it on the Arduino serial monitor. To display the
continuous readings the baud rate of the system is 115200 for serial
communication from Arduino to MATLAB. Refer Fig 1.
Body glucose sensor.
The
glucometer used in the experiment is an invasive sensor which samples the blood
to measure the glucose level in mmol/L or mg/dL. The given sensor is compatible
with Cooking hacks e-health shield using 3.5 mm jack connection. Refer Fig 2
and II.
Fig II Flow chart of reading
from sensor to display on serial monitor
|
Time (hrs)
|
Reference
(mg/dL)
|
Actual (mg/dL)
|
|
0
|
145
|
146
|
|
3
|
122
|
136
|
|
5
|
110
|
115
|
|
8
|
100
|
93
|
|
|
|
|
Table 1. Refernce and Actual glucose readings with respect to the
time.
Arduino UNO board.
[2]The Arduino Uno is a
microcontroller board based on the ATmega328. It has 14 digital input/output pins (of which
6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a
power jack, an ICSP header, and a reset button. It contains everything needed
to support the microcontroller; simply connect it to a computer with a USB
cable or power it with an AC-to-DC adapter or battery to get started. Refer Fig
3
e-Health shield.
[2]
e-Health shield provided by cooking hacks is a compatible shield placed over
the Arduino board to perform and read information from the sensor to the sketch
or to other modules. It has two jacks provided which can be used as an insert
point for the sensor. This shield is typically used to obtain biological
signals from the body. Refer Fig.4
Linear
Actuator.
[3]Linear Actuator model L12 can be
used in various controller options. The controller option that is used in this
project to actuate the motor in the linear direction to drive the syringe pump
and push out the insulin and thereby reducing the glucose insulin level. The
L12 model used in the project was designed to work in a servo mode, and it is
configured in MATLAB to drive the motor in forward and reverse direction. L12
model is directly connected to the e-Health/Arduino board and the +5V is the
power to drive the motor. Refer Fig.5
Fig 1. Temperature Sensor connected to
the Fig 2. Blood glucose invasive sensor
Jack of the e-Health shield giving
readings from the sample.
Fig 3. Arduino UNO board to
interface
Fig. 6. (a)Graph is a plot of Conc. of glucose
in mg/dl vs time in hours after having meal, the values are being compared with
reference values of blood glucose level. (b)
Graph is a plot of body temperature in oC v/s time in seconds, the
threshold value of temperature is set at 37oC.
The project uses these two MATLAB codes as the heart of the working
model of the system.
function
Temperature_Callback(hObject, eventdata, handles)
% hObject handle to Temperature (see GCBO)
% eventdata reserved - to be defined in a future version
of MATLAB
% handles structure with handles and user data (see
GUIDATA)
global A;
global Temp;
global Reading;
Reading=[]; % OPEN A MATRIX WITH UNDEFINED SIZE
for i=1:1:4000 % LOOP TO KEEP READING THE TEMPERATURE VALUES
Temp=fscanf(A); % SCACN THE SERIAL PORT FOR
CURRENT VALUE
Temp=str2num(Temp); % CONVERT THE STRING TO NUMBER
Reading=[Reading Temp] % APPEND THE LAST READING TO THE OLD READINGS
plot(Reading) % PLOT THE READINGS TO THE AXIS
pause(0.8) % PAUSE TIME FOR THE READING TO
BE UPDATED ON THE BUS
if Temp>40 % DEFINE THE TEMPERATURE LIMIT THAT YOU NEED TO SEND EMAIL IF IT REACHED
HIS LIMIT
matlabmail('afifi.mechatronic@gmail.com','The current body temperature is 40 and above,
Please Help!','Emergency Alert', 'afifi.mechatronic@gmail.com','0165056732');
%CALLING THE EMIAL FUNCTION WITH THE FOLLOWING
ORDER
%MATLABMAIL( recipient, message, subject, sender,
passwd )
break
end
end
function
AfterMeal_Callback(hObject, eventdata, handles)
% hObject handle to AfterMeal (see GCBO)
% eventdata reserved - to be defined in a future version
of MATLAB
% handles structure with handles and user data (see
GUIDATA)
global G;
global A;
global GRead;
global GTemp;
global Slope
GRead=[];
fprintf(A,'G'); % PRINT 'G' FOR GLUCOSE, IT
MATCHED WITH THE ARDUINO CODE AS WELL
G=get(handles.Reading,'string')
GTemp=str2num(G) % CONVERT STRING TO NUMBER
GRead=[GRead GTemp] % ADD NEW READING TO PREVIOUS IN AN ARRAY
GRead(1)=145; % HARDCODING THE FIRST REFERENCE READING WITH THIS VALUE
for i=1:1:1000
pause(0.5)
G=get(handles.Reading,'string')
set(handles.Reading,'String','');
pause(5)
GTemp=str2num(G)
GRead=[GRead GTemp]
Slope=GRead(i+1)-GRead(i)
ref=[145 122 110 100 99]; % THE REFERNCE OPTIMAL READING
THAT WE USE TO COMPARE THE CURRENT MEASURMENT TO IT.
time=[0 3 5 8 12]; % TIME OF READINGS
xlabel('time in hours');
ylabel('glucose concentration in mg/dL');
plot(time,ref,'o-b');
hold on;
plot(GRead,'o-r');
legend('Reference','Actual Readings');
if GRead<145
fprintf(A,'%s','G')
fprintf(A,'%s','S') % 'S' STANTS FOR STOP THE MOTOR
else if
GTemp>145&>emp<175&&Slope>5
fprintf(A,'%s','G')
fprintf(A,'%s','H')% 'H' STANDS FOR HIGH GLUCOSE
LEVEL AND TELLS THE MOTOR TO MOVE
else if GTemp>175&&Slope>10
fprintf(A,'%s','G')
fprintf(A,'%s','V') % 'V' STADS FOR VERY HIGH GLUCOSE LEVEL
matlabmail('afifi.mechatronic@gmail.com','My Glucose level is very high,
please Help! ','Urgent Emergency','afifi.mechatronic@gmail.com','0165056732');
break
else if (GTemp==0)
fprintf(A,'%s','G')
fprintf(A,'%s','R') % R FOR REVERSE DIRECTION OF MOTOR MOVEMENT "FOR FUTUERE
EXTENSTION"
break
end
end
end
end
end
2.3 Overall system
model
Fig 7. Block diagram flow of the working
system
The
project was simulated for the above working system that explains the
integration of all the components to provide the desired output.
2.4 Challenges and
Solutions
This
project had a few challenges during the testing phase and an alternative
solutions were achieved of which few of them were:
àContinuous data transfer from Arduino to MATLAB
through Serial communication: It was overcome by transferring single data at a
time and store it in an array in MATLAB
àInvasive glucose meter: The readings were taken and
stored and used them as a simulation with reference readings
àLinear actuator not programmed for servo motor: In
MATLAB loop condition is generated with specified number of steps to move the
motor for ‘x’ amount of fluid.
2.5 Citations
[1]
http://www.cdc.gov/nchs/fastats/older-american-health.html
[2]http://www.arduino.cc/en/Main/ArduinoBoardUno
[3]http://www.firgelli.com/pdf/L12_datasheet.pdf






0 comments:
Post a Comment