0% found this document useful (0 votes)
15 views58 pages

Batch 1 Project Document 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views58 pages

Batch 1 Project Document 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

CHAPTER-1

1.INTRODUCTION
1.1 Hand gesture based on Home automation And Patient Monitoring with IOT:
The Hand Gesture-based system for home automation and patient monitoring, leveraging
the natural and intuitive use of hand gestures as a means of interaction. This innovative
approach aims to streamline the way individuals control their home environments and how
patients' health parameters are monitored, making these processes more accessible, efficient,
and hygienic. By recognizing and interpreting specific hand gestures, the system allows users
to manipulate various devices and access important health information without physical
contact, addressing the limitations of existing systems and enhancing user experience for a
wide range of individuals, including those with disabilities. This hand gesture-based system
represents a significant advancement towards integrating user-friendly and adaptive
technologies into everyday life and healthcare settings.

1.2 Objectives:

The primary objectives of a hand gesture-based system for home automation and patient
monitoring include:

• To enhance accessibility for individuals with mobility or communication challenges.


• To provide a more intuitive and natural way of interacting with technology.
• To improve the efficiency and responsiveness of home automation and patient
monitoring systems.
• To ensure a higher level of safety and hygiene by minimizing physical contact with
devices.
• To allow for customization and flexibility in controlling various devices and monitoring
health parameters.

1.3 Existing system:

The existing systems for home automation and patient monitoring predominantly rely on
manual controls, voice commands, or mobile applications for operation. These systems have
been instrumental in advancing the smart home concept and in monitoring patient health more
efficiently. However, they come with certain limitations.
1.3.1 Disadvantages of existing system:

• Limited Accessibility: Individuals with speech impairments or physical disabilities


may find it challenging to use voice-controlled or manual input devices.
• Dependence on Physical Devices: The necessity to interact with physical devices or
smartphones can be inconvenient and sometimes unhygienic in healthcare settings.
• Complexity: Some users may find the technology intimidating or difficult to use,
especially the elderly or those not tech-savvy.
• Lack of Intuitiveness: Traditional systems may not always provide the most natural or
intuitive means of interaction, potentially leading to user frustration.

1.4 Proposing System:

The proposed system integrates hand gesture recognition technology to control home
automation and patient monitoring devices. This innovative approach aims to overcome the
limitations of existing systems by offering a more accessible, intuitive, and hygienic method
of interaction.

Gesture Recognition with IoT Devices

• Integration with IoT Ecosystems: Utilizing IoT devices equipped with sensors and
cameras to detect and interpret hand gestures. This allows for a unified smart home
ecosystem where gestures can control a wide array of devices, from lighting and
thermostats to security systems and multimedia devices.
• Cloud-Based Gesture Processing: Leveraging cloud computing for advanced gesture
recognition algorithms. IoT devices can send sensor data to cloud servers where
gestures are analyzed and interpreted. This method offers the advantage of continuously
improving recognition capabilities and scalability without the need for
hardware upgrades.

1.4.1 Advantages of Proposing System:

• Enhanced Accessibility: By using hand gestures, the system becomes more accessible
to people with a wide range of disabilities, offering them greater independence.
• Increased Hygiene: In patient monitoring contexts, reducing physical contact with
devices significantly lowers the risk of cross-contamination and infection.
• Intuitive Interaction: Gestures are a natural form of human expression, making the
system more intuitive and user-friendly, even for those who are not comfortable with
technology.
• Customizability: The system can be tailored to recognize specific gestures,
accommodating the preferences and needs of individual users or specific applications.
• Versatility and Integration: The proposed system can be integrated with a wide array
of devices and technologies, making it a versatile solution for both home automation
and patient monitoring.

1.5 Embedded System:

Embedded systems are like tiny brains inside everyday gadgets, such as your washing
machine or car. These little brains help these gadgets do specific tasks, like heating up your
food in the microwave or controlling the temperature in your car. They have their own memory,
like a mini brain, and they can sense things around them using sensors. They also have ways
to communicate with other devices, like sending signals to your phone. These systems need to
work quickly and efficiently, just like our brains do, and they're designed to use as little energy
as possible. Programmers write special instructions for them to follow, like recipes for cooking.
People who make these systems use special tools to test and fix them, like doctors for gadgets.
And just like how we need to keep our brains safe, designers make sure these systems are
protected from bad stuff like hackers. So, in simple terms, embedded systems are like tiny
smart helpers that make our gadgets work better
Personal digital assistants (PDAs) or handheld computers are usually seen as embedded
devices because of how they're built, even though they can do a lot of different things with
software. But when something like the OQO Model 2 came out with features like the Windows
XP operating system and a USB port, which are common in regular computers, it blurred the
lines a bit. So, even though PDAs are like special helpers with limited functions, when they
start having features similar to regular computers, they become more like them too.
Embedded systems can be small, like your watch or music player, or big, like the machines
controlling traffic lights or factories.

Fig 1.5.1: Embedded system


Avionics, such as inertial guidance systems, flight control hardware/software and other
integrated systems in aircraft and missiles.
• Cellular telephones and telephone switches.
• Engine controllers and antilock brake controllers for automobiles
• Home automation products, such as thermostats, air conditioners, sprinklers, and
security monitoring systems
• Handheld calculators
• Handheld computers
• Household appliances, including microwave ovens, washing machines, television
sets, DVD players and recorders
• Medical equipment
• Personal digital assistant
• Videogame consoles
• Computer peripherals such as routers and printers.
• Industrial controllers for remote machine operation.

1.5.1 CHARACTERISTICS OF EMBEDDED SYSTEM:

An embedded system is any computer system hidden inside a product other than a computer.
They will encounter a number of difficulties when writing embedded system software in
addition to those we encounter when we write applications
Throughput– Our system may need to handle a lot of data in a short period of time.
Response–Our system may need to react to events quickly
Testability–Setting up equipment to test embedded software can be difficult
Debugability–Without a screen or a keyboard, finding out what the software is doing wrong
(other than not working) is a troublesome problem
Reliability – embedded systems must be able to handle any situation without human
intervention
Memory space – Memory is limited on embedded systems, and you must make the software
and the data fit into whatever memory exists
1.5.2 OVERVIEW OF EMBEDDED SYSTEM ARCHITECTURE
Every embedded system consists of custom-built hardware built around a Central
Processing Unit (CPU). This hardware also contains memory chips onto which software is
loaded. The software residing on the memory chip is also called the ‘firmware’.
The embedded system architecture can be represented as a layered architecture as
shown in Fig 1.2
The operating system runs above the hardware, and the application software runs above
the operating system. The same architecture is applicable to any computer including a desktop
computer. However, there are significant differences. It is not compulsory to have an operating
system in every embedded system. For small appliances such as remote control units, air
conditioners, toys etc., there is no need for an operating system and you can write only the
software specific to that application. Once the software is transferred to the memory chip, the
software will continue to run for a long time you don’t need to reload new software.
The details of the various building blocks of the hardware of an embedded system. As
shown in Fig.1.2 the building blocks are;
• Central Processing Unit (CPU)
• Memory (Read-only Memory and (Random Access Memory)
• Input Devices
• Output devices
• Communication interfaces
• Application – specific circuitary

Fig1.5.2.1: Building blocks of hardware of an embedded system

Read only Random


memory access
memory

Central processing Output devices


Input devices (CPU)

Communication
Application- interfaces
specific
circuitry
1.5.3 APPLICATIONS
• Military and aerospace embedded software applications
• Communication Applications
• Industrial automation and process control software
• Mastering the complexity of applications.
• Reduction of product design time.
• Real time processing of ever increasing amounts of data.
• Intelligent, autonomous sensors.
CHAPTER-2
2.SYSTEM REQUIREMENTS:
2.1 Software Requirement:
• Arduino IDE
• Blynk App
• PROGRAMMING LANGUAGES :
• Embedded c (Micro controller)

Arduino IDE:
Download Arduino IDE Software:
You can get different versions of Arduino IDE from the Download page on the
Arduino Official website. You must select your software, which is compatible with
your operating system (Windows, IOS, or Linux). After your file download is complete,
unzip the file.

Fig 2.1.1: Arduino setup

Step 1- Power up your board:

The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power from
either, the USB connection to the computer or an external power supply. If you are using an
Arduino Diecimila, you must make sure that the board is configured to draw power from the
USB connection. The power source is selected with a jumper, a small piece of plastic that fits
onto two of the three pins between the USB and power jacks. Check that it is on the two pins
closest to the USB port.

Connect the Arduino board to your computer using the USB cable.The green power LED
(labelled PWR) should glow.

Step 2 − Launch Arduino IDE.

After your Arduino IDE software is downloaded, you need to unzip the folder. Inside the folder,
you can find the application icon with an infinity label (application.exe). Double-click the icon
to start the IDE.

Fig 2.1.2: launching Arduino IDE Step

Step 3 − Open your first project:

Once the software starts, you have two options –

• Create a new project.

• Open an existing project example.

To create a new project, select File → New.

Fig 2.1.3 New File in IDE


• To open an existing project example, select File → Example → Basics→ Blink.

Fig 2.1.4: opening first project in IDE


Here, we are selecting just one of the examples with the name Blink. It turns the LED on and
off with some time delay. You can select any other example from the list.

Step 4 − Select your Arduino board.

To avoid any error while uploading your program to the board, you must select the correct
Arduino board name, which matches with the board connected to your computer.

• Go to Tools → Board and select your board.

Fig 2.1.5: selecting Board In IDE

Here, we have selected Arduino Uno board according to our tutorial, but you must select the
name matching the board that you are using.
Step 5 − Select your serial port.

• Select the serial device of the Arduino board. Go to Tools → Serial Port menu.

This is likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware
serial ports). To find out, you can disconnect your Arduino board and re-open the menu, the
entry that disappears should be of the Arduino board. Reconnect the board and select that serial
port.

Fig 2.1.6: selecting port in IDE

Step 6− Upload the program to your board.

Before explaining how we can upload our program to the board, we must demonstrate the function of
each symbol appearing in the Arduino IDE toolbar

Fig 2.1.7: uploading code to board

A − Used to check if there is any compilation error.

B − Used to upload a program to the Arduino board.

C − Shortcut used to create a new sketch.

D − Used to directly open one of the example sketch.

E − Used to save your sketch.


F − Serial monitor used to receive serial data from the board and send the serial data to the
board.

Now, simply click the "Upload" button in the environment. Wait a few seconds; you will
see the RX and TX LEDs on the board, flashing. If the upload is successful, the message "Done
uploading" will appear in the status bar.

Note − If you have an Arduino Mini, NG, or other board, you need to press the reset button
physically on the board, immediately before clicking the upload button on the Arduino
Software.

BLYNK APP:

Install the Blynk App: First, download and install the Blynk app on your smartphone. The
app is available for both iOS and Android devices, and you can find it in the Apple App Store
or Google Play Store by searching for "Blynk".

Fig 2.1.8 Blynk app

Sign Up: Open the app once it's installed. You'll be presented with a login screen. Since you're
creating a new account, select "Create New Account". You'll need to enter a valid email address
and create a password for your account. If you're a user of Blynk 1.0, note that you will need
to create a new account to use the new Blynk platform.

Fig 2.1.9 Blynk sign Up


Server Selection: After entering your email and password, you may be prompted to select a
server. You'll typically choose the public Blynk server unless you have a specific need to use a
custom private server. This step might not appear in the latest versions of the app, but it's good
to be aware of it if it does.

Fig 2.1.10 Account Creation

Account Verification: After signing up, check your email for a verification message from
Blynk. This step is crucial for verifying your account and ensuring its security.

Fig 2.1.11 Password Creation


Set Up Your First Project: Once your account is set up and verified, you can start creating
projects in the Blynk app. This might involve defining device templates, creating data streams,
and using vario us widgets to control or monitor your IoT devices.

Fig 2.1.12 Template

Explore Blynk Features: Blynk provides a wide range of features to help you control your
devices, such as digital pins, widgets for different controls and displays, and even developer
tools for more advanced projects.

Fig 2.1.13 ON/OFF Buttons


2.2 Hardware Requirements:
Boards : Esp8266 Node-MCU(Wi-Fi module), Arduino uno
Sensors: Gesture controls,RF Transmitter & Receiver,Spo2 Sensor,Relay
Fan,Bulb
Processor : Dual Core 1.6 GHz
RAM : 8 GB HDD : 500 GB

IOT:
The Internet of Things (IoT) technology represents a paradigm shift in how we interact with
the world around us. By connecting everyday objects and devices to the internet, IoT enables
the seamless exchange of data and communication between physical and digital systems.
Through the integration of sensors, actuators, and network connectivity, IoT devices can
collect, analyze, and respond to real-time data, enabling a wide range of applications across
various industries. From smart homes and cities to industrial automation and healthcare, IoT
technology is revolutionizing how we live, work, and interact with our environments. By
harnessing the power of IoT, organizations can unlock new insights, optimize processes, and
enhance efficiency, ultimately driving innovation and shaping the future of interconnected
systems.

CLOUD:

Cloud technology has revolutionized the way businesses and individuals store, access, and
manage data and applications. Rather than relying on local servers or personal devices, cloud
computing utilizes remote servers hosted on the internet to store and process information. This
allows users to access their data and applications from any internet-connected device, enabling
greater flexibility, scalability, and accessibility. Cloud services are typically offered through a
pay-as-you-go model, allowing organizations to scale their resources based on demand and
avoid the upfront costs associated with traditional IT infrastructure. Additionally, cloud
technology provides built-in redundancy and disaster recovery capabilities, ensuring data
resilience and business continuity in the event of hardware failures or natural disasters.
Furthermore, cloud computing facilitates collaboration and innovation by enabling real-time
collaboration and data sharing among users located across different geographic locations.
Through cloud-based productivity tools, such as document sharing platforms and project
management software, teams can collaborate seamlessly, regardless of their physical location.
Moreover, cloud technology democratizes access to advanced computing resources, such as
artificial intelligence (AI) and machine learning (ML), by providing ondemand access to
powerful processing capabilities and data analytics tools. This empowers organizations of all
sizes to leverage cutting-edge technologies and drive innovation without the need for
significant upfront investment in hardware or specialized expertise. Overall, cloud technology
continues to redefine the way we store, process, and leverage data, offering unparalleled
flexibility, scalability, and efficiency in the digital age.

3.HARDWARE CONFIGURATION

3.1 ARDUINO UNO

The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has
14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz crystal oscillator, 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 a AC-to-DC adapter or battery to get started. The Uno differs
from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it
features the Atmega8U2 programmed as a USB-to-serial converter. "Uno" means one in Italian
and is named to mark the upcoming release of Arduino 1.0. The Uno and version 1.0 will be
the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB
Arduino boards, and the reference model for the Arduino platform; for a comparison with
previous versions, see the index of Arduino boards

The ATmega328 is one kind of single-chip microcontroller formed with Atmel within the
megaAVR family. The architecture of this Arduino Uno is a customized Harvard architecture
with 8 bit RISC processor core. Uno include Arduino Pro Mini, Arduino Nano, Arduino Due,
Arduino Mega, and Arduino Leonardo.

The features of Arduino Uno ATmega328 includes the following.

• The operating voltage is 5V


• The recommended input voltage will range from 7v to 12V
• The input voltage ranges from 6v to 20V
• Digital input/output pins are 14
• Analog i/p pins are 6
• DC Current for each input/output pin is 40 mA
• DC Current for 3.3V Pin is 50 mA
• Flash Memory is 32 KB
• SRAM is 2 KB
• EEPROM is 1 KB
• CLK Speed is 16 MHz

Arduino Uno Pin Diagram


The Arduino Uno board can be built with power pins, analog pins, ATmegs328, ICSP header,
Reset button, power LED, digital pins, test led 13, TX/RX pins, USB interface, an external
power supply. The Arduino UNO board description is discussed below.

Fig 3.1.1 Arduino

POWER SUPPLY: The Arduino Uno power supply can be done with the help of a USB
cable or an external power supply. The external power supplies mainly include AC to DC
adapter otherwise a battery. The adapter can be connected to the Arduino Uno by plugging into
the power jack of the Arduino board. Similarly, the battery leads can be connected to the Vin
pin and the GND pin of the POWER connector. The suggested voltage range will be 7 volts to
12 volts.

Input & Output: The 14 digital pins on the Arduino Uno can be used as input & output with
the help of the functions like pinMode(), digitalWrite(), & Digital Read().

Pin1 (TX) & Pin0 (RX) (Serial): This pin is used to transmit & receive TTL serial data, and
these are connected to the ATmega8U2 USB to TTL Serial chip equivalent pins.
Pin 2 & Pin 3 (External Interrupts): External pins can be connected to activate an interrupt
over a low value, change in value.

Pins 3, 5, 6, 9, 10, & 11 (PWM): This pin gives 8-bit PWM o/p by the function of
analogWrite().SPI Pins (Pin-10 (SS), Pin-11 (MOSI), Pin-12 (MISO), Pin-13 (SCK): These
pins maintain SPI-communication, even though offered by the fundamental hardware, is not
presently included within the Arduino language.

Pin-13(LED): The inbuilt LED can be connected to pin-13 (digital pin). As the HIGH-value
pin, the light emitting diode is activated, whenever the pin is LOW.

Pin-4 (SDA) & Pin-5 (SCL) (I2C): It supports TWI-communication with the help of the Wire
library.

AREF(Reference Voltage): The reference voltage is for the analog i/ps with
analogReference().

Reset Pin: This pin is used for reset (RST) the microcontroller.

Memory: The memory of this Atmega328 Arduino microcontroller includes flash memory-32
KB for storing code, SRAM-2 KB EEPROM-1 KB.

Communication:The Arduino Uno ATmega328 offers UART TTL-serial communication,


and it is accessible on digital pins like TX (1) and RX (0). The software of an Arduino has a
serial monitor that permits easy data. There are two LEDs on the board like RX & TX which
will blink whenever data is being broadcasted through the USB.

A SoftwareSerial library permits for serial communication on Arduino Uno digital pins and the
ATmega328P supports TWI (I2C) as well as SPI-communication. The Arduino software
contains a wired library for simplifying the utilization of the I2C bus.
3.2 NODE MCU

Fig 3.2.1 Node MCU

The NodeMCU (Node MicroController Unit) is an open-source software and hardware


development environment built around an inexpensive System-on-a-Chip (SoC) called the
ESP8266. The ESP8266, designed and manufactured by Espressif Systems, contains the crucial
elements of a computer: CPU, RAM, networking (WiFi), and even a modern operating system
and SDK. That makes it an excellent choice for Internet of Things (IoT) projects of all kinds.

However, as a chip, the ESP8266 is also hard to access and use. You must solder wires, with
the appropriate analog voltage, to its pins for the simplest tasks such as powering it on or
sending a keystroke to the “computer” on the chip. You also have to program it in low-level
machine instructions that can be interpreted by the chip hardware. This level of integration is
not a problem using the ESP8266 as an embedded controller chip in mass-produced electronics.
It is a huge burden for hobbyists, hackers, or students who want to experiment with it in their
own IoT projects.

But, what about Arduino? The Arduino project created an open-source hardware design and
software SDK for their versatile IoT controller. Similar to NodeMCU, the Arduino hardware
is a microcontroller board with a USB connector, LED lights, and standard data pins. It also
defines standard interfaces to interact with sensors or other boards. But unlike NodeMCU, the
Arduino board can have different types of CPU chips (typically an ARM or Intel x86 chip)
with memory chips, and a variety of programming environments. There is an Arduino reference
design for the ESP8266 chip as well. However, the flexibility of Arduino also means significant
variations across different vendors. For example, most Arduino boards do not have WiFi
capabilities, and some even have a serial data port instead of a USB port.

NodeMCU Specifications:
The NodeMCU is available in various package styles. Common to all the designs is the base
ESP8266 core. Designs based on the architecture have maintained the standard 30-pin layout.
Some designs use the more common narrow (0.9″) footprint, while others use a wide (1.1″)
footprint – an important consideration to be aware of.

The most common models of the NodeMCU are the Amica (based on the standard narrow pin-
spacing) and the LoLin which has the wider pin spacing and larger board. The open-source
design of the base ESP8266 enables the market to design new variants of the NodeMCU
continually.

Power Pins: There are four power pins. VIN pin and three 3.3V pins.

• VIN can be used to directly supply the NodeMCU/ESP8266 and its peripherals. Power
delivered on VIN is regulated through the onboard regulator on the NodeMCU module – you
can also supply 5V regulated to the VIN pin
• 3.3V pins are the output of the onboard voltage regulator and can be used to supply
power to external components.

GND: are the ground pins of NodeMCU/ESP8266.

I2C PINS: Are used to connect I2C sensors and peripherals. Both I2C Master and I2C Slave
are supported. I2C interface functionality can be realized programmatically, and the clock
frequency is 100 kHz at a maximum. It should be noted that I2C clock frequency should be
higher than the slowest clock frequency of the slave device.

GPO PINS: It has 17 GPIO pins which can be assigned to functions such as I2C, I2S, UART,
PWM, IR Remote Control,LED Light and Button programmatically.Each digital enabled GPIO
can be configured to internal pull-up or pull-down, or set to high impedance. When configured
as an input, it can also be set to edge-trigger or level-trigger to generate CPU triggers.
FEATURES NODEMCU

Microcontroller ESP-8266 32-bit

NodeMCU Model Amica

NodeMCU Size 49mm x 26mm

Carrier Board Size n/a

Pin Spacing 0.9" (22.86mm)

Clock Speed 80 MHz

USB to Serial CP2102

USB Connector Micro USB

Operating Voltage 3.3V

Input Voltage 4.5V-10V

Flash Memory/SRAM 4 MB / 64 KB

Digital I/O Pins 11

Analog In Pins 1

ADC Rang 0-3.3V


ADC Channel:The NodeMCU is embedded with a 10-bit precision SAR ADC. The two
functions can be implemented using ADC. Testing power supply voltage of VDD3P3 pin and
testing input voltage of TOUT pin. However, they cannot be implemented at the same time.

UART PINS:NodeMCU/ESP8266 has 2 UART interfaces (UART0 and UART1) which


provide asynchronous communication (RS232 and RS485), and can communicate at up to 4.5
Mbps. UART0 (TXD0, RXD0, RST0 & CTS0 pins) can be used for communication. However,
UART1 (TXD1 pin) features only data transmit signal so, it is usually used for printing log.

SPI PINS:NodeMCU/ESP8266 features two SPIs (SPI and HSPI) in slave and master modes. These
SPIs also support the following general-purpose SPI features:

• 4 timing modes of the SPI format transfer


• Up to 80 MHz and the divided clocks of 80 MHz
• Up to 64-Byte FIFO

SDIO PINS:NodeMCU/ESP8266 features Secure Digital Input/Output Interface (SDIO)


which is used to directly interface SD cards. 4-bit 25 MHz SDIO v1.1 and 4-bit 50 MHz SDIO
v2.0 are supported.

PWM PINS:The board has 4 channels of Pulse Width Modulation (PWM). The PWM output
can be implemented programmatically and used for driving digital motors and LEDs. PWM
frequency range is adjustable from 1000 μs to 10000 μs (100 Hz and 1 kHz).

CONTROL PINS: Are used to control the NodeMCU/ESP8266. These pins include Chip
Enable pin (EN), Reset pin (RST) and WAKE pin.

• EN: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled LOW
the chip works at minimum power.
• RST: RST pin is used to reset the ESP8266 chip.

WAKE: Wake pin is used to wake the chip from deep-sleep.

Control Pins are used to control the NodeMCU/ESP8266. These pins include Chip Enable
pin (EN), Reset pin (RST) and WAKE pin.
• EN: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled LOW
the chip works at minimum power.
• RST: RST pin is used to reset the ESP8266 chip.

USB to Serial Converter – CP2102 or CH340G


Incorporated into each NodeMCU is a USB to Serial Converter. The official design is based
on the CP2102 chipset and offers the best compatibility. Genuine boards use the CP2102
chipset including the officially licensed Amica NodeMCU modules. The other common USB
to Serial Converter used is the CH340G which is common on the lower-priced modules
including the LoLin units. Other designs may use drivers including the FTDI chipset, but those
designs are rare.

Depending on the Operating System you are using with the NodeMCU, the appropriate driver
must be installed. Generally, Windows 10 immediately recognizes the CP2102 chipset while
the CH340G may require separate installation.

Drivers for the CP2102 are available for download from the Silicon Labs
support site. Drivers constantly evolve and ensuring and installing the most
recent version in your development environment minimum issues. Drivers are
available for Windows, Mac, Linux, and Android. We also have a local copy of the CP2102
drivers (v10.1.8) available locally for download. You are always best to visit the original
manufacturer to ensure you are receiving the most recent versions of the driver.

WCH maintain and update the drivers for the CH340G on a regular basis.
Versions of the driver are also available for Windows, Mac, Linux, and Android.
Visit their Driver Download page. We also have a local copy of the CH340G
drivers (version 3.5) available locally for download. You are always best to visit the original
manufacturer to ensure you are receiving the most recent versions of the driver.

3.3 Gesture controls:

Gesture control is the ability to recognize and interpret movements of the human body in order
to interact with and control a computer system without direct physical contact.Gesture
recognition enables humans to communicate with the machine (HMI) and interact more
naturally in a language which in more appropriate to the humans without any intermediate
devices like monitoring.Gesture recognition can be used in a variety of applications. It can be
used in entertainment settings such as video games and virtual reality mouse, keyboards or
buttons,Patient Monitoring and Home Automation.

I/P ‘s

GND

Fig 3.3.1 Gesture Control

• When GND and 2st finger touches it indicates LIGHT ON,

• When GND and 3nd Finger Touches it indicates LIGHT OFF,

• When GND and 4nd Finger Touches it indicates FAN ON,

• When GND and 5nd Finger Touches it indicates FAN OFF.

3.4 RF Transmitter & Receiver

This hybrid RF Transceiver Module provides a complete RF transmitter and receiver module
solution which can be used to transmit data at up to 3KHz from any standard CMOS/TTL
source.

The transmitter module is very simple to operate and offers low current consumption (typical.
11mA). Data can be supplied directly from a microprocessor or encoding device, thus keeping
the component count down and ensuring a low hardware cost.

The RX – ASK is an ASK Hybrid receiver module. The RF Transmitter Receiver Module is an
effective low-cost solution for using 433 MHz. The TX-ASK is an ASK hybrid transmitter
module. TX-ASK is designed by the saw resonator, with an effective low cost, small size and
simple to use for designing.

Fig 3.4.1 RF Transmitter and Receiver

An RF module (short for radio-frequency module) is a (usually) small electronic device used
to transmit and/or receive radio signals between two devices. In an embedded system it is often
desirable to communicate with another device wirelessly. This wireless communication may
be accomplished through optical communication or through radio-frequency (RF)
communication. For many applications, the medium of choice is RF since it does not require
line of sight. RF communications incorporate a transmitter and a receiver. They are of various
types and ranges. Some can transmit up to 500 feet. RF modules are
typically fabricated using RF CMOS technology.

RF modules are widely used in electronic design owing to the difficulty of designing radio
circuitry. Good electronic radio design is notoriously complex because of the sensitivity of
radio circuits and the accuracy of components and layouts required to achieve operation on a
specific frequency. In addition, reliable RF communication circuit requires careful monitoring
of the manufacturing process to ensure that the RF performance is not adversely affected.
Finally, radio circuits are usually subject to limits on radiated emissions, and
require Conformance testing and certification by a standardization organization such
as ETSI or the U.S. Federal Communications Commission (FCC). For these reasons, design
engineers will often design a circuit for an application which requires radio communication
and then "drop in" a pre-made radio module rather than attempt a discrete design, saving time
and money on development.

RF modules are most often used in medium and low volume products for consumer
applications such as garage door openers, wireless alarm or monitoring systems, industrial
remote controls, smart sensor applications, and wireless home automation systems. They are
sometimes used to replace older infrared communication designs as they have the advantage
of not requiring line-of-sight operation.

Several carrier frequencies are commonly used in commercially available RF modules,


including those in the industrial, scientific and medical (ISM) radio bands such as 433.92 MHz,
915 MHz, and 2400 MHz. These frequencies are used because of national and international
regulations governing the used of radio for communication. Short Range Devices may also use
frequencies available for unlicensed such as 315 MHz and 868 MHz.

RF modules may comply with a defined protocol for RF communications such


as Zigbee, Bluetooth Low Energy, or Wi-Fi, or they may implement a proprietary protocol.

Transmitter modules

An RF transmitter module is a small PCB sub-assembly capable of transmitting a radio wave


and modulating that wave to carry data. Transmitter modules are usually implemented
alongside a microcontroller which will provide data to the module which can be transmitted.
RF transmitters are usually subject to regulatory requirements which dictate the maximum
allowable transmitter power output, harmonics, and band edge requirements.

Receiver modules

An RF receiver module receives the modulated RF signal, and demodulates it. There are two
types of RF receiver modules: superheterodyne receivers and superregenerative receivers.
Super regenerative modules are usually low cost and low power designs using a series of
amplifiers to extract modulated data from a carrier wave. Superregenerative modules are
generally imprecise as their frequency of operation varies considerably with temperature and
power supply voltage.[citation needed] Superheterodyne receivers have a performance advantage
over superregenerative; they offer increased accuracy and stability over a large voltage and
temperature range. This stability comes from a fixed crystal design which in the past tended to
mean a comparatively more expensive product. However, advances in receiver chip design
now mean that currently there is little price difference between superheterodyne and
superregenerative receiver modules.
This RF module is a combination of RF Transmitter and RF Receiver.The transmitter/receiver
(Tx/Rx) pair operates at a frequency of 433 MHz.

The RF transmitter receives serial data and transmits it wirelessly through through its RF
antenna. The transmission occurs at the rate of 1 Kbps – 10 Kbps. RF receiver receives the
transmitted data and it is operating at the same frequency as that of the transmitter.

Features of RF Module:

• The Receiver frequency 433MHz


• Receiver typical frequency 105 Dbm
• Receiver supply current 3.5 mA
• Low power consumption
• operating voltage of receiver is 5V
• The transmitter frequency range 433.92MHz
• Supply voltage of transmitter is between 3V to 6V
• Output power of transmitter is between 4Dbm to 12Dbm

MHz RF Transmitter and Receiver:


In many projects, we use RF modules to transmitting and receiving the data because it has a
high volume of applications than IR. RF transceiver module will always work in a pair that is
it needs a Transmitter and Receiver to send and receive the data. A transmitter can only send
information and a Receiver and can only receive it, so data can send from one end to another
and not the other way around.
The Transmitter module consists of three pins namely Vcc, Din and ground as shown above.
The Vcc pin has a wide range input voltage from 3V to 12V. The transmitter consumes a
minimum current of 9mA and can go as high as 40mA during transmission. The center pin is the
data pin to transmit the signal. This signal modulated using the ASK and then sent on air at a
frequency of 433MHz.

RF receiver module has four pins namely Vcc, Dout, Linear out and Ground as shown above.
The Vcc pin should be powered with a regulated 5V supply. The operating current of this module
is less than 5.5mA. The pins Dout and Linear out is shorted together to receive the 433Mhz signal
from air. This signal is then demodulated to get the data and sent out through the data pin.

RF Transmitter Circuit Diagram:

Fig 3.4.2 RF Transmitter Circuit Diagram


HT12E is an encoder IC that converts the 4-bit parallel data from the 4 data pins into serial data
in order to transmit over RF link using transmitter.

RF Receiver Circuit Diagram:

HT12D is a decoder IC that converts the serial data received by the RF Receiver into 4-bit parallel
data and drives the output accordingly.

Fig 3.4.3 RF Receiver Circuit Diagram

3.5 SpO2 Sensor

Peripheral capillary oxygen saturation (SpO2) measured by pulse oximeter, is a simple and
reliable objective measurement in routine medical practice that approximates the level of
oxygen in arterial blood

Fig 3.5.1 SpO2 Sensor


• VCC: Power supply pin. This should be connected to the 3.3V output from the Arduino,
as these sensors usually operate at 3.3V.

• GND (Ground): This pin should be connected to one of the Arduino's GND pins.

• SCL (Serial Clock Line): This is the clock line for I2C communication, which should
be connected to the SCL pin on the Arduino. For Arduino Uno, this is A5.

• SDA (Serial Data Line): This is the data line for I2C communication, which should be
connected to the SDA pin on the Arduino. For Arduino Uno, this is A4.

• INT (Interrupt): This optional pin can be connected to a digital pin on the Arduino.
It's used to signal the Arduino when a new set of measurements is available to read.

3.6 Relay Module

The 1 Channel 5V Relay Module provides a single relay that can be controlled by any 5V
digital output from your microcontroller. The relay is accessible using screw terminals and can
handle up to 2A of current. A handy LED indicates the status of the relay. This module provides
a standard 3 pin Signal/Voltage/Ground male header and a 4 pin "Grove" connector.

Fig 3.6.1 One Relay Module

The single-channel relay module is much more than just a plain relay, it contains components
that make switching and connection easier and act as indicators to show if the module is
powered and if the relay is active.

First is the screw terminal block. This is the part of the module that is in contact with mains so
a reliable connection is needed. Adding screw terminals makes it easier to connect thick mains
cables, which might be difficult to solder directly. The three connections on the terminal block
are connected to the normally open, normally closed, and common terminals of the relay.

The second is the relay itself, which, in this case, is a blue plastic case. Lots of information can
be gleaned from the markings on the relay itself. The part number of the relay on the bottom
says “05VDC”, which means that the relay coil is activated at 5V minimum – any voltage lower
than this will not be able to reliably close the contacts of the relay. There are also voltage and
current markings, which represent the maximum voltage and current, the relay can switch. For
example, the top left marking says “10A 250VAC”, which means the relay can switch a
maximum load of 10A when connected to a 250V mains circuit. The bottom left rating says
“10A 30VDC”, meaning the relay can switch a maximum current of 10A DC before the
contacts get damaged.

The 'relay status LED' turns on whenever the relay is active and provides an indication of
current flowing through the relay coil.

The input jumper is used to supply power to the relay coil and LEDs. The jumper also has the
input pin, which when pulled high activates the relay.

The switching transistor takes an input that cannot supply enough current to directly drive the
relay coil and amplifies it using the supply voltage to drive the relay coil. This way, the input
can be driven from a microcontroller or sensor output. The freewheeling diode prevents voltage
spikes when the relay is switched off

The power LED is connected to VCC and turns on whenever the module is powered.

Single-Channel Relay Module Specifications

• Supply voltage – 3.75V to 6V


• Quiescent current: 2mA
• Current when the relay is active: ~70mA
• Relay maximum contact voltage – 250VAC or 30VDC
• Relay maximum current – 10A
Pin Configuration:

• VCC: The power supply, which is usually connected to the positive terminal of the
power supply

• GND: The ground connection, which is connected to the negative terminal of the power
supply

• IN: The input signal pin, which is used to activate the relay.

3.7 CPU FAN


A computer fan is any fan inside, or attached to, a computer case used for active cooling. Fans
are used to draw cooler air into the case from the outside, expel warm air from inside and move
air across a heat sink to cool a particular component. Both axial and sometimes centrifugal
(blower/squirrel-cage) fans are used in computers. Computer fans commonly come in standard
sizes, such as 92 mm, 120 mm (most common), 140 mm, and even 200-220 mm. Computer
fans are powered and controlled using 3-pin or 4-pin fan connectors.

Usage of a cooling fan?

While in earlier personal computers it was possible to cool most components using natural
convection (passive cooling), many modern components require more effective active cooling.
To cool these components, fans are used to move heated air away from the components and
draw cooler air over them. Fans attached to components are usually used in combination with
a heat sink to increase the area of heated surface in contact with the air, thereby improving the
efficiency of cooling. Fan control is not always an automatic process. A computer's BIOS can
control the speed of the built-in fan system for the computer. A user can even supplement this
function with additional cooling components or connect a manual fan controller with knobs
that set fans to different speeds.[1]

In the IBM PC compatible market, the computer's power supply unit (PSU) almost always uses
an exhaust fan to expel warm air from the PSU. Active cooling on CPUs started to appear on
the Intel 80486, and by 1997 was standard on all desktop processors.[2] Chassis or case fans,
usually one exhaust fan to expel heated air from the rear and optionally an intake fan to draw
cooler air in through the front, became common with the arrival of the Pentium 4 in late 2000.[2]
Fig 3.7.1 CPU Fan

CHAPTER 4

4.SYSTEM DESIGN

4.1 UML DIAGRAMS:

Unified Modeling Language (UML) diagrams serve as powerful tools for visualizing,
specifying, constructing, and documenting the architecture and structure of software systems.
They provide a standardized way to depict various aspects of a system's design, facilitating
communication among stakeholders including developers, designers, analysts, and clients.
UML diagrams come in several types, each serving a distinct purpose: from the highlevel
conceptual view offered by use case diagrams to the detailed depiction of class structures in
class diagrams, and the dynamic behavior captured in sequence diagrams. Other types such as
activity diagrams, state machine diagrams, and component diagrams offer additional
perspectives on system functionality and structure. With their intuitive graphical
representations and standardized symbols and notations,UML diagrams aid in clarifying
requirements, identifying potential design flaws, and guiding the implementation process,
ultimately contributing to the development of robust and well-architected software systems.

4.2 USE CASE DIAGRAMS:

Use case diagrams are an essential component of Unified Modeling Language (UML),
providing a high-level overview of the functional requirements of a software system from the
user's perspective. These diagrams depict the interactions between users (actors) and the
system, illustrating how users interact with the system to achieve specific goals. One key point
of use case diagrams is their simplicity, which makes them easily understandable by
stakeholders across different domains, including developers, designers, testers, and clients. By
representing user-system interactions in a clear and concise manner, use case diagrams help
ensure that all stakeholders have a shared understanding of the system's intended behavior and
functionality. Another key aspect of use case diagrams is their versatility in capturing various
scenarios and user roles within a system. Each use case represents a specific functionality or
task that the system must perform to satisfy a user's goal. Actors, on the other hand, represent
the roles played by users or external systems interacting with the software. This flexibility
allows use case diagrams to capture a wide range of user-system interactions, from basic
actions like logging in to complex processes involving multiple actors and use cases. Moreover,
use case diagrams facilitate the identification of both primary and alternative flows of actions,
enabling developers to anticipate different user paths and design the system to accommodate
them effectively. Furthermore, use case diagrams serve as a foundation for the development of
more detailed system specifications and design artifacts. While use case diagrams provide a
high-level view of system functionality, they can be supplemented with additional UML
diagrams such as activity diagrams, sequence diagrams, and class diagrams to further refine
and specify system behavior and structure. This hierarchical approach allows for a gradual
transition from abstract requirements to concrete design decisions, ensuring that the resulting
software system meets the needs of its users while adhering 28 to architectural best practices.
In summary, use case diagrams play a crucial role in requirements analysis and system design,
promoting effective communication and collaboration among stakeholders throughout the
software development lifecycle.

Fig 4.2.1 use case diagram


4.3 Class Diagram:

Class diagrams are fundamental to object-oriented software design, offering a visual


representation of the structure and relationships among classes within a system. One key aspect
of class diagrams is their ability to depict the static structure of a system, showcasing the
classes, attributes, methods, and associations between them. Classes represent the blueprint for
objects in the system, encapsulating both data (attributes) and behavior (methods).
Relationships such as associations, aggregations, and inheritances are illustrated through
connecting lines between classes, providing insights into how classes interact and collaborate
to fulfill system requirements. By capturing the static structure of a system, class diagrams
enable developers to design robust and maintainable software architectures, laying the
groundwork for efficient implementation and future scalability.

Additionally, class diagrams facilitate abstraction and modularization, two essential principles
of object-oriented design. Through abstraction, class 29 diagrams emphasize the essential
characteristics and behaviors of objects while hiding irrelevant details, promoting a high-level
understanding of the system's architecture. Modularization, on the other hand, encourages the
decomposition of complex systems into smaller, more manageable modules represented by
classes. These modules can then be developed, tested, and maintained independently, fostering
code reusability and extensibility. By promoting both abstraction and modularization, class
diagrams support the development of flexible and adaptable software systems, capable of
evolving to meet changing requirements and environments.
Fig 4.3.1 Class Diagram
4.4 Sequence Diagram

Sequence diagrams play a pivotal role in software project development by visualizing the
interactions between objects or components within a system over time. These diagrams provide
a dynamic view of system behavior, 30 illustrating the sequence of messages exchanged
between objects to accomplish specific tasks or use cases. One key advantage of sequence
diagrams in a project context is their ability to uncover potential flaws or inefficiencies in the
system's design early in the development process. By mapping out the flow of interactions
between objects, developers can identify bottlenecks, unnecessary dependencies, or missing
functionalities, allowing for timely adjustments and optimizations to be made.

Moreover, sequence diagrams serve as valuable documentation for project teams, aiding in
communication and collaboration among developers, designers, and other stakeholders. They
provide a clear and concise visualization of the system's runtime behavior, making it easier for
team members to understand how different components interact and cooperate to achieve
desired outcomes. Additionally, sequence diagrams can serve as a blueprint for
implementation, guiding developers in writing code that accurately reflects the intended
behavior specified in the diagram. As a result, sequence diagrams contribute to the overall
efficiency and success of a software project by promoting better understanding,
communication, and alignment among project stakeholders.

Fig 4.4.1 Sequence Diagram


4.5 Activity Diagrams

Activity diagrams are indispensable tools in software project management, offering a visual
representation of the workflow or business processes within a system. These diagrams depict
the sequence of activities, actions, and decision points involved in completing a particular task
or use case. One key benefit of activity diagrams in project management is their ability to
provide a clear and structured view of the project's processes, enabling project managers and
team members to identify dependencies, bottlenecks, and potential areas for optimization. By
breaking down complex workflows into manageable steps and visualizing the flow of activities,
activity diagrams facilitate better understanding and planning of project tasks, leading to
improved efficiency and resource allocation.

Furthermore, activity diagrams serve as a powerful communication tool for project


stakeholders, fostering collaboration and alignment across the development team. They offer a
common language for discussing project processes and requirements, enabling stakeholders to
collaborate on defining, refining, and validating project workflows. Moreover, activity
diagrams can be used to document both current and future state processes, allowing teams to
analyze and improve existing workflows or design new ones to better meet project objectives.
With their intuitive graphical representations and standardized notation, activity diagrams
promote transparency and clarity in project management, ultimately contributing to the
successful execution and delivery of software projects.

Fig 4.5.1 Activity Diagram


CHAPTER 5

5.SYSTEM IMPLIMENTATION

5.1 Procedure:

Step 1:Planning and Requirements Gathering

• Objective Definition: Clearly define the system's goals, including which home
automation features and patient monitoring capabilities are desired.
• Gestures and Actions: Specify the hand gestures and map them to actions like turning
on/off lights, adjusting fan speed, or monitoring SpO2 levels.
• Stakeholder Feedback: Consult with potential users and technical experts to refine
requirements and ensure the system meets user needs.

Step 2:Hardware Setup

• Component Selection: Gather the Arduino (for prototyping and control logic),
NodeMCU (for WiFi connectivity), gesture sensors (for input), RF modules (for
wireless communication), SpO2 sensor (for patient monitoring), relays (for controlling
bulbs and fans), and the actuators (bulbs and fans themselves).
• Assembly: Connect the components following a schematic diagram that ensures proper
interfacing and power supply.

Step 3:Microcontroller Programming

• Arduino and NodeMCU: Write code for the Arduino to interpret gesture signals and
control relays accordingly. Program the NodeMCU to handle WiFi communications,
including sending SpO2 data to a cloud platform like ThingSpeak and receiving
commands from it.
• Integration: Ensure seamless data flow between the gesture controls, Arduino,
NodeMCU, and the actuators or sensors.
Step 4:ThingSpeak Integration

• Setup: Create a ThingSpeak account and set up channels for sending and receiving data.
• Data Logging: Program the NodeMCU to send patient monitoring data (like SpO2
readings) to ThingSpeak.
• Control Interface: Use ThingSpeak to send commands back to the system, allowing
remote monitoring and control.

Step 5:Communication Protocol Implementation

• RF Communication: Implement a protocol for the RF Transmitter & Receiver to


ensure reliable communication between the gesture control unit and the Arduino.
• WiFi Communication: Utilize MQTT or RESTful APIs for communication between
the NodeMCU and ThingSpeak, ensuring efficient data transmission.

Step 6:Security Measures

• Data Encryption: Implement SSL/TLS encryption for data transmitted between the
NodeMCU and ThingSpeak.
• Authentication: Use API keys and secure tokens for authenticating the NodeMCU
with ThingSpeak.
• Network Security: Ensure the WiFi network is secure and consider using VPNs for
additional security.

Step 7:Testing

• Functionality Testing: Test the system for correct gesture recognition, actuation of the
relays, and accurate transmission of SpO2 data.
• User Testing: Have users test the system in a real-world environment to gather
feedback on usability and reliability.
• Stress Testing: Evaluate the system’s performance under high loads or continuous
operation.
Step 8:Deployment

• Installation: Install the system in the intended environment, ensuring all components
are correctly placed and secured.
• User Training: Provide comprehensive training to users on operating the system,
performing gestures, and interpreting SpO2 data.

Step 9:Monitoring and Maintenance

• Performance Monitoring: Continuously monitor the system for any issues or failures,
using logs and alerts where possible.
• Regular Updates: Update the software regularly to fix bugs, improve performance,
and add features based on user feedback.

Step 10:Iterative Improvement

• Feedback Loop: Establish a feedback mechanism to gather suggestions and complaints


from users.
• Continuous Development: Periodically review the system’s performance and user
feedback to identify areas for improvement or expansion, such as adding new gestures,
enhancing patient monitoring capabilities, or integrating additional home automation
features.

Following this Procedure approach will help ensure the successful development, deployment,
and operation of a hand gesture-based system for home automation and patient monitoring,
leveraging the capabilities of Arduino, NodeMCU, and the other mentioned components.

5.2 SOURCE CODE

Nano Code(Transmitter):

#include <VirtualWire.h>

#include <Wire.h>

#include "MAX30100_PulseOximeter.h"
#define REPORTING_PERIOD_MS 1000

PulseOximeter pox;

uint32_t tsLastReport = 0;

const int led_pin = 13;

const int transmit_pin = 12;

double msg = 0;

int a,b,c,d;

int i = 0;

int sp = 0;

int hb;

char am[8];

void onBeatDetected(){

Serial.println("Beat!");

void setup(){

Serial.begin(9600);

vw_set_tx_pin(transmit_pin);

vw_set_ptt_inverted(true); // Required for DR3100

vw_setup(4000); // Bits per sec

pinMode(led_pin, OUTPUT);
pinMode(8, INPUT_PULLUP);

pinMode(9, INPUT_PULLUP);

pinMode(10, INPUT_PULLUP);

pinMode(11, INPUT_PULLUP);

Serial.print("Initializing pulse oximeter..");

pox.setOnBeatDetectedCallback(onBeatDetected);

pox.begin();

pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);

byte count = 1;

void loop()

a = digitalRead(8);

b = digitalRead(9);

c = digitalRead(10);

d = digitalRead(11);

if(a == 1 && b == 1 && c == 1 && d == 1)

msg = 1;

}
if(a == 0 && b == 1 && c == 1 && d == 1){

msg = 2;

if(a == 1 && b == 0 && c == 1 && d == 1) {

msg = 3;

if(a == 1 && b == 1 && c == 0 && d == 1)

msg = 4;

if(a == 1 && b == 1 && c == 1 && d == 0)

msg = 5;

pox.update();

if (millis() - tsLastReport > REPORTING_PERIOD_MS)

hb = pox.getHeartRate();

sp = pox.getSpO2();

Serial.print("Heart rate:");
Serial.print(hb);

Serial.print("bpm / SpO2:");

Serial.print(sp);

Serial.println("%");

tsLastReport = millis();

msg = msg * 1000;

msg = msg + hb;

msg = msg * 1000;

msg = msg + sp;

String abc = String(msg);

abc.toCharArray(am,8);

digitalWrite(led_pin, HIGH); // Flash a light to show transmitting

vw_send((uint8_t *)am, 8);

vw_wait_tx(); // Wait until the whole message is gone

digitalWrite(led_pin, LOW);

}
Arduino Uno Code(Receiver):

#include <VirtualWire.h>

const int led_pin = 13;

const int receive_pin = 11;

const int led = 2;

const int fan = 3;

int x = 0;

String data;

String hb;

String sp;

int hbi,spi;

void setup()

Serial.begin(9600);

vw_set_rx_pin(receive_pin);

vw_set_ptt_inverted(true);

vw_setup(4000);

vw_rx_start();

pinMode(led_pin, OUTPUT);

pinMode(led, OUTPUT);
pinMode(fan, OUTPUT);

digitalWrite(led,HIGH);

digitalWrite(fan,HIGH);

void loop()

uint8_t buf[VW_MAX_MESSAGE_LEN];

uint8_t buflen = VW_MAX_MESSAGE_LEN;

if (vw_get_message(buf, &buflen))

data="";

digitalWrite(led_pin, HIGH);

for (int i = 0; i < buflen; i++)

char abc = buf[i];

data.concat(abc);

digitalWrite(led_pin, LOW);

hb="";

hb.concat(data[1]);
hb.concat(data[2]);

hb.concat(data[3]);

hbi=hb.toInt();

sp="";

sp.concat(data[4]);

sp.concat(data[5]);

sp.concat(data[6]);

spi=sp.toInt();

if(data[0] == '1'){

x=1;

// Serial.println("Nothing");

if(data[0] == '2')

x=2;

// Serial.println("Light On");

digitalWrite(led,LOW);

if(data[0] == '3')
{

x=3;

// Serial.println("Light Off");

digitalWrite(led,HIGH);

if(data[0] == '4')

x=4;

// Serial.println("Fan On");

digitalWrite(fan,LOW);

if(data[0] == '5')

x=5;

// Serial.println("Fan Off");

digitalWrite(fan,HIGH);

delay(1000);

}
Nodemcu Code:

#define BLYNK_TEMPLATE_ID "TMPL3w5NCq007"

#define BLYNK_TEMPLATE_NAME "gesture"

#define BLYNK_DEVICE_NAME "gesture"

#define BLYNK_AUTH_TOKEN "No_njqCRwVGdlDrMIN8GyHJ1nprH9F0L"

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

#include <ArduinoJson.h>

BlynkTimer timer;

#define APP_DEBUG

char ssid[] = "No Internet";

char pass[] = "nonononon";

int x,hb,sp;

WidgetLED led1(V2);

WidgetLED led2(V3);

void setup()

Serial.begin(9600);

Blynk.begin(BLYNK_AUTH_TOKEN,ssid,pass);
while (!Serial) continue;

void loop()

if (Serial.available())

DeserializationError err = deserializeJson(doc, Serial);

if (err == DeserializationError::Ok)

Serial.print("Heartbeat = ");

hb = doc["count1"].as<int>();

Serial.println(hb);

Serial.print("SpO2 = ");

sp = doc["count2"].as<int>();

Serial.println(sp);

Serial.print("X = ");

x = doc["count3"].as<int>();

Serial.println(x);

} else

{
Serial.print("deserializeJson() returned ");

Serial.println(err.c_str());

while (Serial.available() > 0)

Serial.read();

if(sp>0)

Blynk.virtualWrite(V1, sp);

Blynk.virtualWrite(V0, hb);

if(sp>0 && sp<95)

Blynk.notify("SpO2 Low");

if(hb>140)

Blynk.notify("Heart Beat High");

if(x == 2)
{

led1.on();

if(x == 3)

led1.off();

if(x == 4)

led2.on();

if(x == 5)

led2.off();

Blynk.run();

timer.run();

5.3 Outputs:
Fig 5.3.1 Kit

Fig 5.3.2 Bulb & Fan ON


Fig 5.3.3 Blynk Alert

6.SYSTEM TESTING

6.1 System Testing

System testing involves testing the hand gesture-based home automation system as a whole to
ensure it meets the specified requirements.

• Functionality Testing: Verify that all system components (gesture recognition,


command processing, device control) function correctly together.
• Integration Testing: Check the integration points between different components, such
as between the gesture recognition module and the home automation controller, to
ensure data flows correctly and actions are triggered as expected.
• Usability Testing: Assess the system's ease of use, including the intuitiveness of gesture
controls and any user interface provided for monitoring or configuration.

6.2 Wi-Fi Connectivity Test

Wi-Fi connectivity is crucial for the system's communication with cloud services or remote
control via smartphones.
• Stability Test: Evaluate the stability of the Wi-Fi connection over extended periods.
Monitor for disconnections or significant drops in signal strength.
• Range Test: Test the effective range of Wi-Fi connectivity, ensuring the system remains
operational throughout the intended area of use.
• Throughput Test: Measure the data throughput in various conditions to ensure that the
system can communicate effectively under different network loads.

6.3 Power Consumption Test

Especially important for battery-powered devices within the system, power consumption
testing helps ensure the system is energy-efficient.

• Idle State Consumption: Measure power consumption when the system is idle but still
monitoring for gestures.
• Active State Consumption: Measure power consumption during active processing,
such as when recognizing a gesture and triggering an action.
• Sleep Mode Consumption: If the system has a sleep mode, measure the power usage
to ensure it drops to expected levels.

6.4 Security Testing

Security testing is vital to protect user data and prevent unauthorized access to the home
automation system.

• Vulnerability Scanning: Use software tools to scan the system for known
vulnerabilities, especially in web interfaces or Wi-Fi communication protocols.
• Penetration Testing: Simulate attacks on the system to identify potential security
breaches, including the Wi-Fi connection and any cloud communication.
• Data Encryption and Privacy: Verify that sensitive data, including user commands
and device status, are encrypted during transmission. Check compliance with privacy
regulations.
6.5 End-To-End Testing

End-to-end testing verifies the system performs as expected from the moment a gesture is made
to the final action being executed on a home device.

• Gesture to Action: Confirm that each recognized gesture correctly triggers the intended
action on home automation devices without undue delay.
• Error Handling: Test how the system handles incorrect gestures or system failures,
ensuring it fails gracefully and alerts the user if necessary.
• Recovery Testing: Assess the system’s ability to recover from crashes or power
failures, ensuring it returns to a known good state without manual intervention.

7.CONCLUSION AND FUTURE ENHANCEMENTS

7.1 CONCLUSION:

In conclusion, this innovative project not only simplifies home appliance control through
intuitive hand gestures but also prioritizes user safety by continuously monitoring blood
oxygen levels. With its ability to seamlessly integrate with a mobile app for real-time updates,
it offers peace of mind and timely intervention in case of emergencies. This holistic approach
to home automation and health monitoring exemplifies the potential of technology to enhance
both convenience and well-being in our daily lives.

7.2 FUTURE ENHANCEMENTS:

• Gesture Recognition Improvements: Incorporating advanced machine learning and


AI algorithms could enhance gesture recognition accuracy, enabling the system to
recognize a wider range of gestures and reduce false positives.
• Integration with More Devices and Platforms: Expanding the system to integrate
with a broader array of home automation devices and health monitoring sensors would
increase its utility. Compatibility with popular smart home ecosystems like Google
Home or Amazon Alexa could also be explored.
• Energy Efficiency: Further optimization of power consumption, especially for battery-
operated devices, could extend their operational life and reduce maintenance needs.
• Enhanced Security Features: As technology evolves, so do security threats.
Implementing more advanced encryption methods and continuous security assessment
protocols will help protect user data and system integrity.
• User Customization and Learning: Implementing features that allow the system to
learn from user behavior and preferences, offering more personalized automation and
monitoring options.
• Remote Access and Control: Enhancing the system's capabilities for remote access
and control through mobile applications or web interfaces, providing users with the
ability to manage their home and health data from anywhere.
• Voice Control Integration: Combining gesture-based controls with voice commands
could offer a more versatile and multi-modal interaction model for users, catering to a
wider range of preferences and accessibility needs.

8.REFERENCES

• [1] Ramya V and Palaniappan B Article: Embedded Home Automation for Visually
Impaired, International Journal of Computer Applications 41(18):32-39, March 2012.
Published by Foundation of Computer Science, New York, USA. BibTeX.
• [2] Van Der Werff M J, Xu W L, Gui X, Activation of Home Automation System via
Mobile Technology, In RCO.Ed (Ed.) ENZCon'04: Proceedings of the Eleventh
Electronics New Zealand Conference. pp. 235-240.
• [3] Alice Linsie A, Mangaiyarkarasi J, Hand Gesture Recognition Using MEMS For
Specially Challenged People, International Journal of VLSI and Embedded Systems-
IJVES, Vol 04, Issue 02; March-April 2013, pp. 238-241.
• [4] Ruize Xu, Shengli Zhou, and Wen J. Li, MEMS Accelerometer Based Nonspecific-
User Hand Gesture Recognition, IEEE SENSORS JOURNAL, VOL. 12, NO. 5, MAY
2012, pp. 1166-1173.
• [5] Wan S1, Nguyen HT, Human Computer Interaction using hand gesture, Conf Proc
IEEE Eng Med Biol Soc. 2008;2008:2357-60.
• [6] Yusekkaya B, Kayalar A.A, Tosun M.B, Ozcan M.K, Alkar A.Z, A GSM, Internet
an Speech Controlled Wireless Interactive Home Automation System, IEEE
Transactions on Consumer Electronics Volume 52 Issue 3, August 2006, pp. 837-843.
• [7] Do-Hoon Kim, Chungbuk, Cheongju,, Heung- Gyoon Ryu, Obstacle recognition
system using ultrasonic sensor and Duplex Radio-Frequency Camera for the visually
impaired person, 13th International Conference on Advanced Communication
Technology (ICACT), February 2011, 326-329.
• [8] Arthi.J.E, Jagadeeswari M. Control of Electrical Appliances through Voice
Commands, IOSR Journal of Electrical and Electronics Engineering (IOSR-JEEE),
Volume 9, Issue 1 Ver. V (Feb. 2014), pp. 13-18.
• [9] Kirankumar T. Bhavani B., A Sustainable Automated System for Elderly People
Using Voice Recognition and Touch Screen, International Journal of Science and
Research (IJSR), Volume 2 Issue 8, August 2013, pp.265-267.
• [10] Faisal Baig, Saira Beg, Muhammad Fahad Khan, Controlling Home Appliances
Remotely through Voice Command, International Journal of Computer Applications
(0975 888), Volume 48-No.17, June 2012, pp. 1-4.

You might also like