Today, the healthcare for elder people is at stake. Nursing homes and retiring homes are not necessarily affordable for everyone and as the aged population grows, the lack of available rooms has become a major issue. Moreover, most elders would like to keep living independently at home. Our idea is to offer them the opportunity to choose between staying at home or leaving. To achieve that, we made a wireless wearable wristband measuring the essential physical conditions (temperature, acceleration) thanks to multiple sensors integrated on the ESP8266 board. The data is sent from the ESP8266 to the gateway through Wifi. The gateway transmits it to a web application displaying in real-time the measurements and the alerts. The main purpose is to monitor from distance patient's health condition in case of emergencies (high fevers, heavy falls). It also can be deployed for several people in a retirement home and used to alert nurses if needed. To demonstrate this, we will develop ESP prototype self-powered by a battery, including a temperature sensor and an accelerometer, a RaspberryPi as a gateway and a computer as a server. The relevant data will be accessible via a web application.
Detailed technical description of our solutionProject's architecture :
Wristband mounting :
- The accelorometer and the temperature sensors are integrated on a MPU-6050 chip with a 16 Bit AD Sensor Module Data Converter mounted on the GY-521 board. This board is linked with the ESP8266 board by a serial I²C bus.
- The ESP8266 board is powered by a Lipo battery, 3.7V-650mAh for a long life autonomy. The ESP8266 board is composed of analog and digital pins to read the values of the sensors. It also includes a Wi-Fi module that is connected to the Raspberry Gateway wirelessly.
- Use of Arduino C/C++ IDE to program the ESP8266 readings and Wi-Fi communication.
- Use of Linux environment to download the Middle Node CSE resources on the Raspberry Pi (gateway) and configure the settings to enable the communication. Use of Java to start the Middle Node CSE exe file. To make it easier for raspberry configuration, you also need an HDMI wire, a mouse, a keyboard and a power supply wire and plug all of them onto the raspberry.
- Use of Java to run the Infrastructure Node CSE on the server.
- Use of Node JS for the back-end development of the web server handling subscription/notifications processes with the IN-CSE.
- Use of Node JS/Webpack for the frontend web application.
Let's keep in mind we have 4 main parts :
1. The Infrastructure Node
2. The Middle Node
3. The Web application
4. The Sensors
We will go over those 4 parts to explain how it works.
----------------------------------------------INSTALLATION---------------------------------------------
Please make sure to install these four parts in the same way described below
1. The Infrastructure Node contains 2 main softwares :
- the IN-CSE platform (eclipse project OM2M) : Download the one we added in the attachments.
- a backend server : this Node JS backend server handles notifications and subcriptions processes as well as the login/logout part for the web application. To install it and run it, you need to follow the instructions of the README file of the repository (see link of the repository in attachments).
2. The Middle Node : Take your raspberry pi 3 and download the oneM2M eclipse mn-cse resources we added in the attachments because we already created the AE, CTs and ACPIs required for the whole project. To install it and run it, you need to follow the instructions of the README file of the repository (see link of the repository in attachments).
At this point the raspberry pi should be powered and connected to the Wi-Fi network, the mn-cse should be running on the raspberry pi and the in-cse should be running on another machine.
Note : To make it easier, we highly recommend to install the Infrastructure Node and the Web Application (the web application will be installed in section 3) on the same machine, but it is up to your decision to separate them.
3. The Web Application : It is a frontend program to display the health data of the patients. This application communicates with the Infrastructure Node to get all the patients' data. You will need to run this web application on the Google Chrome navigator before going further. To install it and run it, you need to follow the instructions of the README file of the repository (see link of the repository in attachments). The app should be very easy to use. Once you followed all the instructions of the README file, the first app page you should see is a login page, the login account is "admin" and the password is "admin". In fact we created a "admin" user and a "test" user. The admin has access to every data and patients' health conditions whereas the "test" user has only access to its dedicated patient. On this login page, once you click on "submit" button, you should see monitoring board that will display all the data for each patient, once you run the sensors part of course. In fact, this board will be first empty until you power on the sensors (see part 4 below)
The final step deals with the sensors communication. Before going any further you must have completed the previous steps to enable the reception of the data.
4. The Sensors : This is the MPU60_50 board with integrated sensors :
You must connect the VCC, GND, SCL, and SDA pins to the ESP8266. The SDA and SCL pins of the MPU6050 board should be connected to the digital pins of the ESP8266 :
Plug the ESP8266 to your computer with the USB cable. Download the Arduino IDE as well as the program in attachments and open it. Download the following libraries : <Adafruit_MPU6050.h> ; <Adafruit_Sensor.h> ; <ESP8266WiFi.h> ; <ESP8266HTTPClient.h>. Go to the "tools" bar and select the Node MCU board ESP8266. Go back to the "tools" bar, modify the "upload speed at 115200" which is the baudrate for the serial communication, and also select the port number "COM" :
Go to the very beginning of the code file and enter the IP address of the raspberry pi (MN Node) as well as the port number of the mn-cse running on the raspberry. Enter the same Wi-Fi network name and the password associated. Note that the ESP8266 and the Raspberry Pi 3 must be connected to the same Wi-Fi Network :
Run the program. (It might take some time before running). To make sure the program works, open the Arduino monitor, you should observe the connection of the ESP8266 to the Wi-Fi as well as the previous set up of the sensors :
Then you should see the HTTP POST request of the temperature and acceleration, with the code "201". If the code displayed is not "201" (404 for example), that means the program works but the reception of the data is not working. To repair it, you must check on your mn-cse or in-cse (make sure they are running) :
Once you have managed to display the data of the sensors both on the in-cse (OM2M platform) and the Web Application, you can now unplug the ESP8266 of your computer and connect the Lipo battery to the VCC and GND pins.
WARNING ! : BE CAREFUL NOT TO PLUG THE ESP8266 TO BOTH COMPUTER AND BATTERY AT THE SAME TIME. ALSO BE CAREFUL NOT TO INVERT THE BATTERY POLARIZATION : The + must be connected to the VCC and the - to the GND. Otherwise, both issues might cause several damages to the circuit. By the way, we decided to solder the battery directly to the ESP8266 on VCC and GND pins to make it handy. Now you have a self-powered, portable and wearable system :
CONCLUSION : Our project is just a simple prototype of the healthcare monitoring. We would like to implement more sensors to get a general overview of the elder health condition (skin humidity, blood pressure, heart pulses, covid-19 symptoms). We could also add on a database on the server to collect the daily motion and make a study out of it (steps, body gestures, localization). The doctors and the nurses could get reliable analysis to detect and prevent any danger. This could even lead to prediction and anticipation. Finally a top notch feature could be the modification of the network communication from local Wi-Fi to GSM modules in order to give complete freedom to the elders. They could walk anywhere, anytime and even travel as long as we have the supervision in real-time.
Comments