Friday, April 3, 2020

Health Care Monitoring System Using NodeMCU based on IoT

Introduction

IoT is rapidly revolutionizing the healthcare industry. Due to the busy schedule and work of our daily life, it is a difficult task to monitor the health status of our patient at home. Particularly aging patients should be monitored periodically. Therefore we propose an innovative system that easily automates this task. Our device advances a smart patient health tracking system using a web server to monitor patient health parameters such as blood oxygen levels along with heart temperature and body temperature.

Components Required

Following are the components required for making this project. All the components can be purchased
from Amazon. The components purchased link is given below.
1. NodeMCU : Buy Online from Amazon
2. MAX30100/MAX30102 Pulse Oximeter: Buy Online from Amazon
3. DS18B20 Temperature Sensor: Buy Online from Amazon
4. DHT11 Sensor: Buy Online from Amazon
5. 4.7K Resistor: Buy Online from Amazon

1. NodeMCU

Node MCU is an open source platform and has a chip of esp8266 wifi module, 128KB RAM and 4 MB flash memory to store the program and data. Its operating system range is 3v to 3.6 and it consists of 17 GPIO pins. It has communication speed 4.5 Mbps.

NodeMCU is a development board based on ESP8266. It is operating system range is 3v to 3.6. Interface a GPS module with NodeMCU. In this project we will use NodeMCU to create a simple local web server and the location details and update in that server web page.

NodeMCU  Specification:

Type :  Single-board microcontroller CPU : ESP8266Memory : 128kBytesStorage : 4MBytesPower By : USBPower Voltage : 3v ,5v (used with 3.3v Regulator which inbuilt on Board using Pin VIN)IDE Used : Arduino IDEGPIO : 10 pins

2. MAX30100/MAX30102 Pulse Oximeter

The MAX30100 is an integrated pulse oximetry and heartrate monitor sensor solution. It combines two LEDs, a photodetector, optimized optics, and low-noise analog signal processing to detect pulse oximetry and heart-rate signals. The MAX30100 breakout operates from 1.8V and 5.5V.
Features:
Working voltage: 1.8-5.5V I2C INTERFACE Complete Pulse Oximeter and Heart-Rate Sensor Solution Simplifies Design Integrated LEDs, Photo Sensor, and High-Performance Analog Front -End Ultra-Low-Power Operation Increases Battery Life for Wearable Devices Programmable Sample Rate and LED Current for Power Savings Ultra-Low Shutdown Current (0.7µA, typ)
The device has two LEDs, one emitting a red light, another emitting infrared light. For pulse rate, only the infrared light is needed. Both the red light and infrared light is used to measure oxygen levels in the blood.

3. DS18B20 Temperature Sensor:

DS18B20 is 1-Wire digital temperature sensor from Maxim IC. Reports degrees in Celsius with 9 to 12-bit precision, from -55 to 125 (+/-0.5). Each sensor has a unique 64-Bit Serial number etched into it - allows for a huge number of sensors to be used on one data bus.
Features:
  • Unique 1-Wire® interface requires only one port pin for communication
  • Each device has a unique 64-bit serial code stored in an onboard ROM
  • Power supply range is 3.0V to 5.5V
  • Measures temperatures from –55°C to +125°C (–67°F to +257°F)±0.5°C accuracy from –10°C to +85°C
  • Thermometer resolution is user-selectable from 9 to 12 bits
  • Converts temperature to 12-bit digital word in 750ms (max.)
  • Alarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)
  • Applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitive system

4. DHT11 Sensor

The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analog input pins needed). Its fairly simple to use, but requires careful timing to grab data. The only real downside of this sensor is you can only get new data from it once every 2 seconds, so when using our library, sensor readings can be up to 2 seconds old.

Features:

  • Low cost
  • 3 to 5V power and I/O
  • 2.5mA max current use during conversion (while requesting data)
  • Good for 20-80% humidity readings with 5% accuracy
  • Good for 0-50°C temperature readings ±2°C accuracy
  • No more than 1 Hz sampling rate (once every second)
  • Body size 15.5mm x 12mm x 5.5mm
  • 4 pins with 0.1" spacing
Working:
Now let us begin with the designing of IoT Based Patient Health Monitoring Using NodeMCU. So the circuit digram for interfacing MAX30100, DHT11 & DS18B20 with NodeMCU is given below.
Iot Based Patient Health Monitoring System ESP32
All the sensor can work at 3.3V VCC. So connect their VCC to 3.3V Power Supply. Connect the GND to GND. MAX30100 is an I2C Sensor, so connect its SDA & SCL pin to GPIO21 & GPIO22. Connect its INT pin to GPIO19 of NodeMCU. The output pin of DHT11 is connected to GPIO18 of NodeMCU. Similarly, the output pin of DS18B20 is connected to GPIO5 of NodeMCU. A 4.7K pull-up resistor is connected between output pin & VCC pin of DS18B20.

Source Code/Program

The Program/Source Code for IoT Based Patient Health Monitoring on ESP32 Web Server is given below. You need to install a few libraries for source code compilation. The library link is given below as well. Download all the libraries and add to the Arduino IDE.
Make changes in the Wifi SSID & Password
 Click to below for Source Code⇓⇓⇓⇓⇓⇓⇓⇓⇓

Results & Working of the Project

Once the code is uploaded, you can open the serial monitor. The ESP32 will try to connect to a network. Once connected, it will display the IP Address.
Copy the IP Address and paste it on any of the Web Browser and hit enter. You will see the room temperature, room humidity, Heart Rate, Blood Oxygen Level, Body Temperature, etc.
IoT Based Patient Health Monitoring
Similarly you can also view the Patient Health Status on Mobile Phone. Simple copy the IP Address and paste on the browser of Mobile Phone.

Thursday, March 26, 2020

Light control with smart phone using Arduino UNO

Abstract 

Technology is a process that can never end. Being able to design a product using current technology that will be beneficial to the lives of others is a major contribution to the community. This paper presents the design and implementation of a low cost yet flexible and secure cell phone based home automation system. The design is based on a stand alone Arduino UNO and BT board and home.
The devices are connected to the input / output ports of this board via a relay.  The  communication  between  the  cell  phone and the Arduino UNO board and bluetooth is wireless. The system is low cost and scalable allowing various types of devices to be controlled with minimal changes to its core.
Password protection is being used only to allow authorized users to use the devices at home.

Introduction

Wireless technology is becoming popular worldwide and consumers appreciate this wireless
The lift is well known as "cable their chaos". Which gives them the confidenceNow to develop with built-in Bluetooth technology, digital devices form a network in which devices and devices can communicate with each other. Today, home automation is one of the major applications of Bluetooth technology.
Operating at a globally available frequency, without license
2.4GHz, it can depend on speeds of digital devices in the range of 10M to 100m, up to 3Mbps.
Bluetooth device class. With this Bluetooth capability; We propose a home automation system based on Bluetooth technology.

There are some problems involved when designing a home automation system. The system must be scalable so that
New devices can be easily integrated into it. It should provide a user-friendly interface on the host side, so that devices can be easily setup, monitored and controlled.
This interface should also provide some diagnostic services so that if there is a problem with the system, it can be tracked down. Also the overall system must be fast enough to realize the true power of wireless
Technology. In the end the system needs to be effective to justify its application in home automation.
We introduced the architecture for home automation and where the system was based on a dedicated network.
This system only shows how to solve the problems of home automation




Hardware (components) used
1. Bluetooth module HC-05 
2.  Relay module 
3.  Jumper wire 
4. Arduino uno board 
5.  Led bulb 
6. 9v battery 
7.  Smart Phone

Bluetooth module HC-05


  • It is used for many applications like wireless headset, game controllers, wireless mouse, wireless keyboard and many more consumer applications.
  • It has range up to <100m which depends upon transmitter and receiver, atmosphere, geographic & urban conditions. 
  • It is IEEE 802.15.1 standardized protocol, through which one can build wireless Personal Area Network (PAN). It uses frequency-hopping spread spectrum (FHSS) radio technology to send data over air.
  • It uses serial communication to communicate with devices. It communicates with microcontroller using serial port (USART).

HC-05 Bluetooth Module

  • HC-05 is a Bluetooth module which is designed for wireless comunication. This module can be used in a master or slave configuration.
HC-05 Bluetooth Module

Pin Description

Bluetooth serial modules allow all serial enabled devices to communicate with each other using Bluetooth.
It has 6 pins,
1.  Key/EN: It is used to bring Bluetooth module in AT commands mode. If Key/EN pin is set to high, then this module will work in command mode. Otherwise by default it is in data mode. The default baud rate of HC-05 in command mode is 38400bps and 9600 in data mode.
HC-05 module has two modes,
          1.  Data mode: Exchange of data between devices.
          2.  Command mode: It uses AT commands which are used to change setting of HC-05. To send these commands to module serial (USART) port is used.
2.  VCC: Connect 5 V or 3.3 V to this Pin.
3.  GND: Ground Pin of module.
4.  TXD: Transmit Serial data (wirelessly received data by Bluetooth module transmitted out serially on TXD pin)
5.  RXD: Receive data serially (received data will be transmitted wirelessly by Bluetooth module).
6.  State: It tells whether module is connected or not


Relay Module

The Arduino relay module has total of six pins: three on one side and three on other side.On the bottom side, there are three pins which are signal, 5V and ground. We will connect these pins with the Arduino. While on the other side, there are NC (Normally close), C (Common) and the NO (normally open) which are the output pins of the 5V relay. There, we will connect the output device.

Arduino Uno 

The Arduino Uno R3 is a microcontroller board based on a removable, dual-inline-package (DIP) ATmega328 AVR microcontroller. It has 20 digital input/output pins (of which 6 can be used as PWM outputs and 6 can be used as analog inputs). Programs can be loaded on to it from the easy-to-use Arduino computer program. The Arduino has an extensive support community, which makes it a very easy way to get started working with embedded electronics. The R3 is the third, and latest, revision of the Arduino Uno.

Adavantage 

  • Easy to use light customization
  • Increase Security