ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Volume 6, Issue 1, June 2021
Impact Factor: 4.819
Gesture-Based Smart Switch
Archana Benkar1, Abhishek Duduskar2, Shivani Gandhamwar3, Prof. P. A. More4
Students, Department of Electronics and Telecommunication1,2,3
Assistant Professor, Department of Electronics and Telecommunication4
Zeal College of Engineering & Research, Pune, India
Abstract: The project aims at making old/dum electric appliances smart for controlling remotely for
easy and touchless/contactless operations via software operations. As in this era of covid-19, a button is
the most common interface to interact with the digital world. It could be as simple as a light/fan switch.
So our Smart Switch box can be used to replace the existing switches in home which produces sparks and
results in fire accidents in a few situations. Considering the advantages of Wi-Fi, an advanced
automation system was developed to control the appliances in the house.
Keywords: IOT=internet of things, Arduino IDE = Arduino integrated development environment, Relay,
ESP32= Microcontroller with inbuilt Wifi & Bluetooth module, APDS-9960 Gesture sensor
I. INTRODUCTION
Due to advancements in technology, there is an improvement in living standards, by automating even simple tasks to
complex tasks. A predefined gesture is used to turn on/off the device Gesture is defined as a motion of limbs or any
other body part which are made to emphasize speech. A waving hand means goodbye, which is an example of a
dynamic gesture, and the stop sign is an example of a static gesture. It is necessary to explain all the static and dynamic
gestures over some time to understand the message.
Gesture recognition is the interpretation of human motion by the computing device. Hand gestures can be detected by
the controller that can sense tilting and acceleration of movement. For different applications, different gesture
recognition techniques are used. This system will act as a remote control for operating all the consumer electronic
devices present in a house, which is achieved through hand gestures instead of push buttons.
II. LITERATURE SURVEY
● As per the recent advancement in technology we used SparkFun's APDS-9960 which comes with the features
like Ambient Light, RGB color Sensing, Proximity Sensing, Gesture Detection. Which has an operating range
of around 4-8 inches i.e 10-15 centimeters. It works on the I2C Interface (I2C Address: 0x39). The reason we
have used this sensor is for its Gesture Sensing capacity It almost supports 8 types of gestures.
● So if we want to go with the speed and flow of the newer generations we have to upgrade ourselves with
newer advancements in technology. We are using an ESP32 microcontroller which is scalable and adaptive. It
has 2 CPU cores which will be individually controlled and has a clock frequency adjustable from 80 MHz to
240 MHz. It has inbuilt Wi-Fi, Bluetooth, BLE MCU module ESP-WROOM-32s. The main reason to use this
microcontroller is that it has Wi-Fi capabilities and using this we can control anything connected to it from
anywhere in the world.
● To control this microcontroller we used the Blynk IoT Platform which provides us simplicity to operate
complex HVAC systems & The full back-end IOT cloud support to run our Android and WEB Apps on their
platform.
III. PROBLEM STATEMENT
As we all know, buttons are the most common interface to interact with the digital world. To avoid the risk of getting
Covid-19, It could be as simple as a light switch or it could be as complex as in the elevator or a TV remote that has
been frequently used by other people. These buttons increase the spread of viruses. So, the cheapest way to solve this
Copyright to IJARSCT DOI: 10.48175/IJARSCT-1415 402
www.ijarsct.co.in
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Volume 6, Issue 1, June 2021
Impact Factor: 4.819
problem is by introducing gesture control to these day-to-day appliances. By using these types of gesture control
everywhere we can reduce the spread of this covid virus significantly. And also we can use our existing smartphones to
control the appliances. To minimize the spread of the covid-19 virus we should implement smart gesture-based
switches everywhere in our day-to-day life.
IV. IMPLEMENTATION DETAILS
4.1 Hardware Requirements
• ESP32
• APDS-9960
• 5V Dual Channel Relay Module with Optocoupler
• 3.3V Hi-Link AC-DC converter Module
• 1000uF Capacitor
• BreadBoard
• Connecting Wires
4.2 Software Requirements
• Arduino IDE
• Blynk IoT Platform
• Google Assistant
• Amazon ALEXA
• C & C++ Languages
Before moving onto the actual implementation let us get introduced to the hardware that we will be using in this
project.
Hardware Requirements
A. ESP32
ESP32 is an open-source development board that consists of an ESP32 D0WDQ6 chip. The Board consists of the
number of pins for various operations such as input and output pins known as IO pins for connecting various sensors
and output devices. The Board has a total of 48 IO pins. Out of which it has 18 ADC pins and 2 DAC pins. It has 3
UART, SPI interfaces, and 2 I2C interfaces. It has 16 PWM output channels. It has 2 I2S interface and 10 Capacitive
interface pins
Figure 1: ESP32 Module
Copyright to IJARSCT DOI: 10.48175/IJARSCT-1415 403
www.ijarsct.co.in
ISSN (Online) 2581-9429
2581
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Volume 6, Issue 1, June 2021
Impact Factor: 4.819
B. APDS-9960
This is the Gesture Sensor, a touch breakout board with a built-in
built APDS-9960
9960 sensor that provides ambient light and
color measuring, proximity detection, and touchless gesture sensing. With this RGB and Gesture Sensor you'll be ready
to control a computer, microcontroller, robot, and more with an easy swipe of your hand! This is, in fact, an equivalent
sensor that the Samsung Galaxy S5 uses and is perhaps one among the simplest gesture sensors on the marketplace for
its worth.
Figure 2: APDS-9960 Gesture Sensor
Fig
C. 5V Dual Channel Relay Module with Optocoupler
We can control high voltage electronic devices using relays. A Relay is a switch that is electrically operated by an
electromagnet. The electromagnet is activated with a low vol
voltage,
tage, for example, 5 volts from a microcontroller and it
pulls a contact to make or break a high voltage circuit.
This is a 2 Channel isolated 5V 10A relay module Optocoupler for Arduino PIC ARM. It can be used to control
various appliances and other types
pes of equipment with a large current. It can be controlled directly with 3.3V or 5V logic
signals from microcontrollers (Arduino, 8051, AVR, PIC, DSP, ARM, ARM, MSP430, TTL logic).
Fig
Figure 3: 5V Dual channel relay module
Copyright to IJARSCT DOI: 10.48175/IJARSCT-1415 404
www.ijarsct.co.in
ISSN (Online) 2581-9429
2581
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Volume 6, Issue 1, June 2021
Impact Factor: 4.819
D. 3.3V Hi-Link AC-DCDC converter Module
This module can supply 3.3V DC from 120VAC – 230VAC and has a power rating of 3 Watt. This Power Supply
Module voltage source is a switching source, so you do not have to worry about fluctuations in the voltage grid. So we
have used this module for power supply.
Figure 4: 3.3 Hi-Link AC-DC Converter Module
Software Requirements:
A. Arduino IDE
The open-source
source Arduino Software (IDE) makes it easy to write code and upload it to the board. This softwar
software can be
used with any Arduino Supported Boards such as ESP32 and other similar boards.
B. Blynk IoT Platform
To control this Project we used the Blynk IoT Platform which provides us simplicity to operate complex HVAC
systems & The full back-end
end IOT cloud support to run our Android and WEB Apps on their platform. It has support for
IOS apps also. It’s a digital dashboard where you can build a graphic interface for your project by simply dragging and
dropping widgets. Blynk HTTP RESTful API allows users to easily read and write values to/from Pins in Blynk apps
and Hardware (microcontrollers and microcomputers like Arduino, Raspberry Pi, ESP8266, Particle, etc.).
Every PUT request will update Pin's state both in apps and on th the hardware. Every GET request will return the
current state/value on the given Pin. We also provide a simplified API so you can do updates via getting requests.
Figure 5: Blynk App Interface
Copyright to IJARSCT DOI: 10.48175/IJARSCT-1415 405
www.ijarsct.co.in
ISSN (Online) 2581-9429
2581
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Volume 6, Issue 1, June 2021
Impact Factor: 4.819
C. Voice Assistant (Google Assistant)
To use google assistant and Amazon Alexa with our project we have used Blynk REST API Which integrates voice
assistants Google & Alexa. We can control appliances through Google or Alexa Native apps also or by giving voice
command.
Figure 6: Google Home Interface Figure 7: Amazon Alexa Interface
V. ACTUAL IMPLEMENTATION
In this project, we used ESP32 Wi-Fi
Fi Development Board which needs only 3.3V to work. So we used Hi-Link
Hi AC to
DC converter IC which converts 230V AC power supply to DC 3.3V supply which is given to the ESP32 Wi Wi-Fi
Development Board. To overcome the spread of the covid-19 19 virus we interfaced the gesture sensor to our
microcontroller and as it has an inbuilt Wi
Wi-Fi Module so we can control
ol the appliances connected to the Relay Module
in a wireless manner and from anywhere in the world. By using the Blynk IoT Platform and we can get features like :
• Control From Anywhere
• Time-Based Control
• Voice Activated Control
• Gesture-based Control
Copyright to IJARSCT DOI: 10.48175/IJARSCT-1415 406
www.ijarsct.co.in
ISSN (Online) 2581-9429
2581
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Volume 6, Issue 1, June 2021
Impact Factor: 4.819
Figure 8: Block Diagram of Gesture
Gesture-Based Smart Switch
Figure 9: Circuit Diagram of Gesture
Gesture-Based Smart Switch
Figure 10: Actual Implementation on BreadBoard Figure 11: Actual Demonstration of Smart Switch
Copyright to IJARSCT DOI: 10.48175/IJARSCT-1415 407
www.ijarsct.co.in
ISSN (Online) 2581-9429
2581
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Volume 6, Issue 1, June 2021
Impact Factor: 4.819
5.1 Algorithm and Its Details
As we plug our Gesture-Based
Based Smart Switch in a plug and turn it ON. It will scan the network to connect to our set
home Wi-FiFi and it will get connected to it. When it connects to a Wi Wi-Fi network successfully it will get Connected to
the Blynk IOT Platform for further long-distance
distance operations. If there is no Wi-Fi
Wi Fi network then it will work in offline
mode. In this mode, we only can access this smart switch with only our hand gestures.
After connecting to Wi-FiFi It will initialize the APDS-9960
APDS 9960 Gesture Sensor and it will get connected. After that, we
can access the Smart Switch by using Hand gestures or Android Application or by using a Voice Assistant like Google
Assistant and Amazon Alexa. Let's get into the depth of how APDS-9960 detects the gestures.
ure 12: Left gesture detection algorithm
Figure
There are 4 different sensors named R, L, U, D which detect the different gestures and there is 1 IR LED. Let's
consider the Left gesture 1 st IR LED continuously in ON state as we move our hand from right to left. The first right
sensor gets obstructed by our hand and it senses that the light is reflected from the hand and it gets activated. As we
move our hand in the same direction than the first 3 sensors i.e R, U, D get activated as shown in the 2nd figure. As we
go on in the same direction it will obstruct the LEFT leftmost sensor i.e L gets activated as shown in the 3rd figure In
this way Left Gesture is detected.
ure 13: Right gesture detection algorithm
Figure
Copyright to IJARSCT DOI: 10.48175/IJARSCT-1415 408
www.ijarsct.co.in
ISSN (Online) 2581-9429
2581
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Volume 6, Issue 1, June 2021
Impact Factor: 4.819
Let's consider the Right gesture 1 st IR LED continuously in ON state as we move our hand from left to right. The
first left sensor gets obstructed by our hand and it senses that the light is reflected from the hand and it gets activated.
As we move our hand in the same direction than the first 3 sensors i.e L, U, D get activated as shown in the 2nd figure.
As we go on in the same direction it will obstruct the Right rightmost sensor i.e R gets activated as shown in i the 3rd
figure In this way Right gesture is detected.
By using the same algorithm APDS-9960 9960 detects the UP, DOWN gestures, and Anti-Clockwise
Anti Clockwise gestures, and
Clockwise gestures. It also can detect the Far and Near gestures by placing our hand far aboveabove the gesture sensor and
bringing it down towards the sensor and moving our hand leftwards. And for Far gestures, we have to place our hands
near the sensor and move upwards and out of the detection range.
5.2 Communication via Blynk platform
So to control the appliances over the internet or from anywhere in we used the Blynk IoT Platform which can be
accessed through our android app to turn ON and OFF appliances from remote locations.
With the help of this platform, we are also able to integrate the Voice assistant operation for our project. What it does
when we control via a voice assistant or android app ESP32 sends a signal to Blynk REST API and it turns on that
particular device.
ure 14: Communication via Blynk platform
Figure
VI. ADVANTAGES
• Gesture-Based Control
• Control From Anywhere
• Time-Based Control
• Voice Activated Control
• Convenience
• Greater control
• Energy saving
VII. CONCLUSION
With the help of our algorithm, we were able to decode gestures successfully and could control the LED
successfully. The goal of our project was to design a useful and fully functional real-world
real world product that efficiently
translates the movement of hands to electrical signals that can control home appliances. Our motivation is to help
differently-abled
abled people to control electrical appliances more easily. The gesture-based
gesture based smart switch uses an APDS
APDS-
9960 sensor to recognize hand gestures and control electronic devices like fans, light, music system, electric kettle,
kitchen appliances, security systems, etc. The system was trained and tested for multiple users successfully. The
Copyright to IJARSCT DOI: 10.48175/IJARSCT-1415 409
www.ijarsct.co.in
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Volume 6, Issue 1, June 2021
Impact Factor: 4.819
proposed system has the advantage of low power consumption, simple hardware, control from anywhere, voice-
activated control, time-based control, cheaper electricity bills and hand gestures, easy to operate, and user friendly.
REFERENCES
[1] Websites - https://circuitdigest.com , hacker.io
[2] Niharika Shrotriya, Anjali Kulkarni, Priti Gadhave, International Journal of Science, Engineering and
Technology Research (IJSETR), “SMART HOME USING WI-FI".
[3] Hardik S. Jayaswal, Mit R. Thakkar, Ronakkumar K. Patel, "Proximity Hand Gesture based Home
Automation A system using Arduino and APDS-9960". , International Journal of Computer Applications
(0975 – 8887) Volume 181-No.3, July 2018.
[4] Gonzalo Pomboza-Junez, Juan A. Holgado-Terriza ,"Control of Home Devices based on Hand Gestures", Sep.
2015.
[5] Priyanka D. Hatwar, Neha A. Wahile, Isha M. Padiya," Home Automation System based on Gesture
Recognition", March 2017.
[6] Dr. B. Muruganantham, Dr. A. Murugan, Dr. S. Ganesh Kumar," Smart Home Automation System Using
Hand Gestures, IoT and Service, Nov. 2020.
[7] Jikhil John, Anjana Nair, Munna Basil Mathai," Hand Gesture based Home Automation", March 2017.
Copyright to IJARSCT DOI: 10.48175/IJARSCT-1415 410
www.ijarsct.co.in