Patient Health Monitoring System using ESP8266 & Arduino
With many new health technology companies, IoT is rapidly revolutionizing the healthcare industry. In this project, we developed an IoT-based patient health monitoring system with ESP8266 and Arduino. The IoT platform used in this project is ThingSpeak. ThingSpeak is an open source Internet application (IoT application) and an API for storing and retrieving data using HTTP over the Internet or a local area network. This IoT device could read the pulse rate and measure the ambient temperature. It continuously monitors the pulse and the ambient temperature and updates them on an IoT platform.
The Arduino sketch that traverses the device implements the various project functions, such as reading sensor data, converting to strings, transmitting them on the IoT platform, and displaying the pulse and temperature measured on the IoT platform. the LCD screen.
This is a simple block diagram that explains the IoT-based Patient Health Monitoring System using ESP8266 and Arduino. The pulse sensor and LM35 temperature sensors measure BPM and ambient temperature respectively. The Arduino processes the code and displays the 16 * 2 LCD. The ESP8266 Wi-Fi module connects to Wi-Fi and sends the data to the IoT device server. The IoT server used here is Thingspeak. Finally, data can be monitored from any part of the world by connecting to the Thingspeak channel.
- Arduino UNO Board
- ESP8266 Wi-Fi Module
- Pulse Sensor
- LM35 Temperature Sensor
- 16*2 LCD Display
- Resistor 2K
- Resistor 1K
- Connecting Wires
The pulse sensor is a plug-and-play heart rate sensor for Arduino. It can be used by students, artists, athletes, game developers, and mobile device developers who want to easily integrate live heart rate data into their projects. It is an integrated optical amplification circuit and a sensor for noise suppression. Attach the heart sensor to your earlobe or finger and insert it into your Arduino. You can read the heart rate. There is also an Arduino demo code that makes it easier to use. The pulse sensor has three pins: VCC, GND and Analog Pin. In the middle of this sensor module is also an LED that detects the heartbeat. Under the LED is a noise canceling circuit to prevent noise from affecting readings.
LM35 Temperature Sensor
The LM35 series are precision built-in temperature circuit devices with an output voltage linearly proportional to temperature in degrees Celsius. The LM35 device has an advantage over linear temperature sensors calibrated in Kelvin because the user does not need to draw a high constant voltage from the output to achieve comfortable centigrade scaling. The LM35 does not require calibration or external adjustment to provide typical accuracies of ±¼°C at room temperature and ±¾°C over a temperature range of -55°C to 150°C
The ESP8266 is a very user friendly and inexpensive device to connect your projects to the Internet. The module can work both as an access point (can create an access point) and as a station (can connect to Wi-Fi). It can therefore easily retrieve data and download it over the Internet, making Internet objects as simple as possible. It can also extract data from the Internet using APIs, allowing your project to access all information available on the Internet, making it more intelligent. Another interesting feature of this module is that it can be programmed using the Arduino IDE, which makes it much more user-friendly.
The ESP8266 module works with 3.3V only, if we provide more than 3.7V would burn the module hence be cautions with your circuits. Here are its pins description.
Pin 1 : Ground : Connected to the ground of the circuit
Pin 2 : Tx/GPIO – 1 : Connected to Rx pin of programmer/uC to upload program
Pin 3 : GPIO – 2 : General purpose Input/output pin
Pin 4 : CH_EN : Chip Enable/Active high
Pin 5 : Flash/GPIO – 0 : General purpose Input/output pin
Pin 6 : Reset : Resets the module
Pin 7 : RX/GPIO – 3 : General purpose Input/output pin
Pin 8 : Vcc : Connect to +3.3V only
Circuit Diagram & Connections
To design an IoT based Patient Condition Monitoring System using ESP8266 and Arduino, assemble the circuit as shown in the figure below.
- Connect the output pin of the pulse sensor to A0 from Arduino and the other two pins to VCC and GND.
- Connect the output pin of the LM35 temperature sensor to Arduino’s A1 and the other two pins to VCC and GND.
- Connect the LED to Arduino Digital Pin 7 via a 220-ohm resistor.
- Connect pin 1,3,5,16 of the LCD screen to GND.
- Connect pin 2.15 of the LCD to VCC.
- Connect the 4,6,11,12,13,14 pin of the LCD display to the Arduino 12,11,5,4,3,2 digital pin.
- The ESP8266’s RX pin will operate at 3.3V and it will not communicate with the Arduino when we connect it directly to the Arduino. We will have to create a voltage divider that will convert the 5V to 3.3V. This can be done by connecting a 2.2K and 1K resistor. Thus, the RX pin of the ESP8266 is connected to pin 10 of Arduino via the resistors.
- Connect the TX pin of the ESP8266 to pin 9 of the Arduino.
Setting the ThingSpeak
ThingSpeak provides a very good tool for IoT projects. By using the ThingSpeak site, we can monitor our data and control our system over the Internet, using the channels and web pages provided by ThingSpeak. So, you must first sign up for ThingSpeak. Then visit https://thingspeak.com and create an account.
Then create a new channel and configure what you want. The tutorial in the video below. Follow the video for more clearifications.
Then create the API keys. This key is needed to schedule changes and define your data.
Then download the code on the Arduino UNO by assembling the circuit shown above. Open the serial monitor to automatically connect to Wi-Fi and configure everything.
Now click on the channels so that you can see the online data flow, ie the IoT-based Patient Status Monitoring System using ESP8266 & Arduino, as shown in the figure below. -Dessous.
The source code for the IoT Patient Health Monitoring System using ESP8266 & Arduino is given below. Just copy the code and paste it into your Arduino IDE, then compile it and download it to your Arduino UNO board.