Professional Documents
Culture Documents
Smart Home With Google Assistant
Smart Home With Google Assistant
Smart Home With Google Assistant
ABSTRACT
This project aims to implement a voice controlled home automation system using a
WI-FI and IOT, which is being remotely controlled and monitored by any Android OS smart
phone. The system is implemented using ordinary household appliances. Typical language
voice headings are given to the Google Assistant and with the assistance of IF-TTT
application and the Adafruit application the direction are decoded and after that sent to the
microcontroller, the microcontroller thusly controls the trades related with it as required,
turning the device related with the particular relay On or OFF as shown by the clients
mentioning to the Google Assistant. The microcontroller utilized is NodeMCU and the
communication between the microcontroller and the application is established via Wi-Fi
(Internet).
The project focuses on controlling lights and fans referred as Home Automation and
providing Smart security by sending signals using internet when an object is detected. By
using Microcontroller Module we are going to implement this project. This will be more
helpful for Handicapped and aged people.
Today is the world of advanced ubiquitous mobile applications which are used
thoroughly to save energy and time. These applications ease day-to-day life of a common
people. Based on these applications and technologies we designed a “Automatic Smart Home
Security System”. An attractive market for “Smart Home Security System” is for busy
families and individuals with physical disability. Users can controls electrical appliances in
home or office via smart phone. Application will also provide secure notification and alarm
for Burglary, fire hazards and LPG leakage. This project aims at controlling every happening
at home or offices on your fingers.
INTRODUCTION
Home, it is where one likes or wants to be following a long tiring day. Individuals
return home depleted following a long dedicated day. Some are too worn out that they think
that its difficult to move once they arrive on their love seat, couch or bed. So any little
gadget/innovation that would enable them to switch theirs lights on or off, or play their
preferred music and so forth on a go with their voice with the guide of their advanced mobile
phones would make their home increasingly agreeable.
The current situation is such that people have to manually operate various kinds of
appliances which at times is not workable for busy families and individuals with physical
limitations. Also there is no effective means of controlling various accidents due to gas
leakage, fire and burglary. Our system will provide proper notifications to users for such
incidents and alert them through messages on their mobile phone. Smart home is a very
promising area, which has various advantages such as providing increased comfort, safety
and security to people. It is rational use of energy and other resources thus contributing to a
purposeful savings in terms of time and more secure. Such system will be affordable, portable
and compatible so that new devices can be easily integrated in to systems. The technology is
easy to use and targeted for people without technical background.
Manish Prakash Gupta (2018) have proposed “Home automation using voice via Google
assistant. The spoken commands from google assistant sends message to micro-controller this
micro-controller pass the message to relay which will switch On and Off the appliances.
Aayush Agarwal, Anshul Sharma, Asim Saket Samad and S Babeetha (2018) “UJALA-
Home Automation System Using Google Assistant” This project presents a design and
prototype of Home Automation system that will use ESP8266 Wi-Fi module as a network
provider in connecting with other appliances. Further we will connect the specific home to
our database and it can be accessed from anywhere through a specific IP address or website.
Also, an app would be developed which will allow the user to control their devices using the
Google Assistant.
Md Sarwar Kamal in (2017) “Efficient low cost supervisory system for Internet of Things
enabled smart home.” This paper proposes an efficient low cost supervisory system for smart
home automation that can be managed using IoT. The proposed system is based on Apriority
algorithm and will help to monitor and control all the home appliances and electronic devices
through a supervisory system in a most efficient and reliable manner. Both the consumers and
the suppliers will get the opportunity to manage the power distribution by monitoring the
electricity consumption.
Nikhil Singh, Shambhu Shankar Bharti, Rupal Singh, Dushyant Kumar Singh (2014)
“Remotely controlled home automation system”, Advances in Engineering and Technology
Research (ICAETR) This paper describes an investigation into the potential for remote
controlled operation of home automation systems. It considers problems with their
implementation, discusses possible solutions through various network technologies and
indicates how to optimize the use of such systems. The home is an eternal, heterogeneous,
distributed computing environment (Greaves, 2002) which certainly requires a careful study
before developing any suitable Home Automation System (HAS) that will accomplish its
requirements. Nevertheless, the latest attempts at introducing Home Automation Systems in
actual homes for all kinds of users are starting to be successful thanks to the continuous
standardization process that is lowering the prices and making devices more useful and easier
to use for the end user. Even so several important issues are always to be handled strictly
before developing and installing a Home Automation System; factors like security, reliability,
usefulness, robustness and price are critical to determine if the final product will accomplish
the expected requirements.
Potamitis, Georgila, Fakotakis, and Kokkinoss, G. (2003) suggested the use of speech to
interact remotely with the home appliances to perform a particular action on behalf of the
user. The approach is inclined for people with disability to perform real-life operations at
home by directing appliances through speech. Voice separation strategy is selected to take
appropriate decision by speech recognition.
Tan, Lee and Soh (2002) proposed the development of an Internet-based system to allow
monitoring of important process variables from a distributed control system (DCS). It
proposes hardware and software design considerations which enable the user to access the
process variables on the DCS, remotely and effectively rent designations.
Prof. Era Johri in (2001) have successfully completed the project on “Remote Controlled
Home Automation”.
OBJECTIVES OF THE PROJECT
The main objective of this project is remote controlling of any household device and ensuring
security.
•User can remotely switch off or on the any appliance through a web based application.
•Detect LPG gas leakage and makes emergency sound which can prevent massive
fire accident.
•User also sees the room temperature through the web application.
•Makes system interface is so much interactive so that it can help to control electronics
devices of elder people.
•Makes the web application is secured so that everyone cannot allow controlling devices
COMPONENTS REQUIRED
C. Fire Sensor
E. IR Sensor
F. Smoke Sensor
G. Mobile phone to operate home appliances and Blink app in mobile phone to see results.
• The hardware- It has the capability to connect to the router. It would also be able to turn
on/off specified devices, such as lights and fans. It is called the ‘Control Unit’. And,
• The Software- The Blynk app, the IFTTT app and the Google Assistant constitute the
software of the design and these applications would be integrated in the Android device.
The Control Unit comprises of the microcontroller- NodeMCU and the 4/8 Channel Relay
board. Relay board uses Node MCU(ESP 8266) to control the relays. The Blynk app on an
Android device communicates with the microcontroller and sends the desired signal via the
internet. Figure below shows the basic system design architecture.
SYSTEM DEVELOPMENT
The proposed automation and security system has the capabilities to control the
following components in users home and monitor the following alarms:
Motion detection
The proposed home automation system can control the following appliance:
Lights on/off
Fan on/off
Door Open/close
BLOCK DIAGRAM
The above shown block diagram represents the architecture of the proposed work. In
this system a NODEMCU controller board is used to control the complete circuit action of
the system. This controller acts as a brain of the system and is programmed to perform the
desired operation of the system.
The circuit components in the system require the power supply for their desired
function. This power is supplied by the power supply unit in the system. Power supply unit
provides regulated 5v and 12v DC supply as per the requirement of the components.
An IR obstacle detector sensor is used in this system and interfaced with the
microcontroller as shown in the above architecture of the system. This IR obstacle detector
sensor is used to detect the entrance of the intruders in the home for theft purpose.
Smoke Sensor: A smoke detector is a device that senses smoke molecules in the air.
And it gives respective voltage output to the microcontroller. In this system a MQ-2 smoke
sensor is used for the leakage detection. This gas sensor provides the signal to the
microcontroller after sensing the malfunctions.
In this system we have interfaced a DHT11 temperature and humidity sensor used to
measure the temperature of the surrounding area where the system is implemented as per the
application. They measure both the moisture and temperature in the air and express relative
humidity as a percentage of the ratio of moisture in the air to the maximum amount that can
be held in the air at the current temperature.
Here in this system we have connected three loads to operate remotely through IOT
application for demo of automation feature of the system. In this system we have connected
three lamps, a water pump and a DC fan as load to the system. These loads are interfaced
with the system through relay. These relays are act as switch for the loads.
The system is designed in such a way that it is able to operate the door. To open and
close the door we have used a demo model of door as shown in the architecture of the system.
In this system we have used a servo motor interfaced with the microcontroller. To operate
this motor we have connected it to the pin number 15 of the microcontroller to rotate the
motor in clockwise and anticlockwise direction to open and close the door.
To open and close the door we have used a demo model of door as shown in the
architecture of the system. In this system we have used a servo motor interfaced with the
microcontroller. To operate this motor we have connected it to the pin number 15 of the
microcontroller to rotate the motor in clockwise and anticlockwise direction to open and
close the door.
This system is designed including the emerging IOT technology to send all the data to
the IOT application for the convenience of the user. For this purpose we have designed an
IOT application for this system by using an open source IOT platform Blynk in android
powered device. This IOT application shows the presence of the person near the door. And
also consists of door open and door close buttons to operate the door through this IOT
application designed in the android smart device. All this data will display on the screen of
the IOT application designed for this system using Blynk open source IOT platform. Also,
this work includes how to turn ON and OFF loads using the Google Assistant.
CIRCUIT DIAGRAM
CIRCUIT IMPLEMENTATION
The above diagram shows the complete circuit implementation of the proposed
system “Wi-Fi Automation with Security System”. The system consists of a microcontroller
used to control whole system.
In this system we have used NODEMCU controller board which acts as a brain of the
system and controls the hardware of the system. This controller and other components in the
circuit require power supply for their functionality. The microcontroller works on regulated
5V DC supply. To fulfil this power requirement of the circuit we have designed a power
supply unit which provides 12V and regulated 5V power supply as per the requirement of the
circuit component. To design power supply unit a step down transformer is used. 230V mains
supply is applied to the primary of this transformer and at the secondary it gives 12V stepped
down supply. Since circuit components require DC supply a bridge rectifier circuit is
designed using 4 diodes to convert the AC supply to the DC as shown in the circuit diagram
of the circuit diagram. The obtained 12V AC supply from the secondary of the transformer is
fed to the rectifier circuit and DC supply is obtained at its output terminal. Microcontroller
requires regulated 5V supply, to get this voltage supply we have used a LM-7805 voltage
regulator IC. This IC has 3 terminals Vin, GND and Vout. To Vin terminal of the regulator
IC 12V supply is applied, the GND terminal of the IC is connected to the ground voltage
supply and at the output terminal i.e. Vout terminal of the IC we get regulated 5V supply.
Two parallel connected capacitors are also used in the power supply unit. These capacitors
act as filters to complete elimination of the ripples from the supply. 1000pf and 100pf
capacitors are used for this purpose and connected at input side and output side of the voltage
regulator IC respectively. This obtained regulated 5V supply is provided to the Vin of the
controller board.
In this system we have used an IR obstacle detector sensor to monitor the area from
the intruder. For this purpose we have used IR obstacle detector sensor as shown in the above
circuit diagram of the system. This obstacle detector sensor is connected to the GPIO pin 5 of
the controller board as shown in the circuit diagram of the system. This sensor requires 5V
supply for the operation. For this 5V supply is provided to the VCC pins of the obstacle
sensor and the last pin of the sensor i.e. ground pin is connected to the ground potential as
shown in the circuit diagram of the system. The output pin of the sensor is used to provide the
output to the microcontroller as connected to the pin number 13 of the controller board as
shown in the circuit diagram of the system.
Also a smoke sensor used in this prototype which is also a security element of that
area where the system is implemented by the user. This smoke sensor is MQ2 series sensor
used to detect the smoke elements in the air of the surrounding area. The output terminal of
the smoke sensor is connected to the analog pin 0 of the controller board to get the output for
processing and to take appropriate action in case of smoke detected by the sensor. The smoke
sensor is an electronic device requires regulated power supply for its working. We have
connected regulated 5V supply to the VCC pin of the sensor and ground potential is
connected to the GND terminal of the sensor to provide complete path to the power supply
for the sensor.
To monitor the temperature and humidity in the surrounding environment we have
used a DHT 11 temperature and humidity sensor. This DHT11 Temperature & Humidity
Sensor features a temperature & humidity sensor complex with a calibrated digital signal
output. This sensor has 4 pins for the connection. One pin is used to provide power supply,
one is used to connect the sensor with the microcontroller and one pin is a GND pin used to
connect it with ground terminal and one terminal of the sensor is a NULL terminal. This
sensor requires regulated 5V supply for its working. This power supply is provided to the pin
number 1 of the sensor. This sensor provides monitored parameters readings to the
microcontroller. This DHT 11 temperature and humidity sensor is connected to the pin
number 25 in port C of the controller IC as shown in the circuit diagram of the system.
In this system we have connected four loads three lamps and other is DC fan general
appliance can be connected to the system. These loads are interfaced with the microcontroller
through relays as sown in the circuit diagram of the system. These relays are act as
electromagnetic switches to turn ON and OFF the loads through an IOT application designed
for this system. These relays are connected to the pin number 4 and 5 of the controller board
through a NPN transistor BD139 and a resistor of 1Kiloohm as shown in the circuit diagram
of the system. The microcontroller turns on the transistor which will then triggers the relays
for controlling the load.
For this prototype we have designed a demo model of the door using DVD driver and
servo motor. A servo motor is attached at the centre of the circular disk as shown in above
figures. When the ESP modem receives data for locking and unlocking. The servo motor
rotates which actuates the circular disk’s rotation making the links move in and out of the
door ensuring latching and unlatching. The amount of power applied to the motor is
proportional to the distance it needs to travel. So, if the shaft needs to turn a large distance,
the motor will run at full speed. If it needs to turn only a small amount, the motor will run at a
slower speed. This is called proportional control. The servo motor is interfaced with the
microcontroller as shown in the circuit diagram of the system. The VCC pin of the motor is
connected to the regulated voltage supply and GND pin is connected to the ground potential.
Whereas the output pin of the servo motor is connected to the pin number 15 of the
microcontroller board as shown in the circuit diagram of the system.
The hardware of the system consists of an inbuilt Wi-Fi modem of the controller
board. This Wi-Fi modem is used to send the obtained data i.e. status of the loads connected
in the system and the alert messages according to the output of the sensors interfaced in this
system for security purpose.
FLOW CHART
Flow charts explain the step to step working of the home automation system. It can be
understood as follows.
1. First of all, the system is initialized by using the initialization algorithm as mentioned.
2. In the second step, the Google assistant gets activated on hearing word okay Google.
3. Then as given in the decision box of the flow chart the command is matched with the
command in IFTTT.
4. Here if the command is not matched it returns the whole process to step 2.
5. Although at step 3 if the command matches on and off status are loaded.
This IOT based smart security and smart automation systems are trying to achieve
comfort combined with simplicity. Wireless security and automation are the dual aspects of
this project. The currently built prototype of the system sends alerts to the owner over the
IOT application using the Internet if any sort of human movement is sensed near the entrance
of his house. On the other hand if the owner identifies that the person entering his house is
not an intruder but an unexpected guest of his then the user/owner can make arrangements
such as opening the door, switching on various appliances inside the house, which are also
connected and controlled by the micro-controller in the system to welcome his guest. The
same can be done when the user himself enters the room and by virtue of the system he can
make arrangements from his doorstep such that as soon as he enters his house he can make
himself at full comfort without manually having to switch on the electrical appliances.
Under the Home Automation we can control all electrical appliances from long
distance through an IOT application using smart phone. In this project we are controlling
Lights and Fans through an Internet. Even though if Wi-Fi is not available we can go to 3G or
4G services to operate the system. This will helps us to operate our home appliances through
a long distance. This will helps the handicapped and aged people to control their home
appliances easily.
Other security features of the system include some sensors like fire, smoke and
temperature and humidity sensors. Humidity sensors detect the relative humidity of the
immediate environments in which they are placed. They measure both the moisture and
temperature in the air and express relative humidity as a percentage of the ratio of moisture in
the air to the maximum amount that can be held in the air at the current temperature. As air
becomes hotter, it holds more moisture, so the relative humidity changes with the
temperature. The fire sensor detects the fire if there occurred in the surrounding environment
where the system is implemented. The fire sensor sends the signal to the microcontroller and
then microcontroller sends an alert message to the IOT application through Wi-Fi modem
using internet for alerting the system user and to take appropriate action. The similar process
will be carried out by the system if the smoke sensor detects the smoke elements in the air. In
this project we are placing these two sensors inside the home to know the weather condition
of our home. Here DHT11 sensor shows the values of humidity and temperature and MQ2
sensor checks the air purity if any poisons gas is mixed, For every second it will shows the
new value in our mobile phone. If the temperature or air impurity becomes high at that time
we can switch on fans to send that air outside. In this way we can monitor and protect the
area which we want to protect through an IOT application designed by using open source
IOT platform Blynk powered by android system.
HARDWARE SPECIFICATIONS
Node MCU:
NodeMCU is an open source IoT platform. It includes firmware which runs on the
ESP8266WiFi SoC from Espressif Systems, and hardware which is based on the ESP-12
module. The term "NodeMCU" by default refers to the firmware rather than the development
kits. The firmware uses the Lua scripting language. It is based on the eLua project, and built
on the Espress-if NonOS SDK for ESP8266. It uses many open source projects, such as lua-
cjson, and spiffs.
Node MCU provides a way to connect different sensors to their controllers wirelessly via
wifi. Since, it is an improved version of the ESP8266 it has better and easier programming,
with better voltage stability and more reliability.
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.
NodeMCU Pinout and Functions Explained
Power 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
I2C Pins
These 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.
GPIO Pins
NodeMCU/ESP8266 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 interrupts.
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
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:
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
These 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.
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.
At the point when the IR recipient does not get a flag, the potential at the reversing input goes
higher than that non-upsetting contribution of the comparator IC (LM339). In this way the
yield of the comparator goes low, yet the LED does not gleam. At the point when the IR
beneficiary module gets flag to the potential at the altering input goes low. Consequently the
yield of the comparator (LM 339) goes high and the LED begins sparkling. Resistor R1
(100 ), R2 (10k ) and R3 (330) are utilized to guarantee that base 10 mA current goes through
the IR LED Devices like Photodiode and typical LEDs individually. Resistor VR2 (preset=5k
) is utilized to conform the yield terminals. Resistor VR1 (preset=10k ) is utilized to set the
affectability of the circuit Diagram.
Principle of Operation:
We have as of now examined how a light sensor functions. IR Sensors work by utilizing a
particular light sensor to distinguish a select light wavelength in the Infra-Red (IR) range. By
utilizing a LED which delivers light at an indistinguishable wavelength from what the sensor
is searching for, you can take a gander at the power of the got light. At the point when a
question is near the sensor, the light from the LED skips off the protest and into the light
sensor. This outcomes in a vast hop in the force, which we definitely know can be identified
utilizing an edge.
Detecting Brightness Since the sensor works by searching for reflected light, it is conceivable
to have a sensor that can give back the estimation of the reflected light. This kind of sensor
can then be utilized to gauge how "splendid" the protest is. This is valuable for errands like
line following.
Features
This DHT11 Temperature & Humidity Sensor features a temperature & humidity
sensor complex with a calibrated digital signal output. By using the exclusive digital-signal-
acquisition technique and temperature & humidity sensing technology, it ensures high
reliability and excellent long-term stability. This sensor includes a resistive-type humidity
measurement component and an NTC temperature measurement component, and connects to
a high-performance 8-bit microcontroller, offering excellent quality, fast response, anti-
interference ability and cost-effectiveness.
Each DHT11 element is strictly calibrated in the laboratory that is extremely accurate
on humidity calibration. The calibration coefficients are stored as programmes in the OTP
memory, which are used by the sensor’s internal signal detecting process. The single-wire
serial interface makes system integration quick and easy. Its small size, low power
consumption and up-to-20 meter signal transmission making it the best choice for various
applications, including those most demanding ones. The component is 4-pin single row pin
package. It is convenient to connect and special packages can be provided according to users’
request.
DHT11’s power supply is 3-5.5V DC. When power is supplied to the sensor, do not
send any instruction to the sensor in within one second in order to pass the unstable status.
One capacitor valued 100nF can be added between VDD and GND for power filtering.
Technical Specifications:
Detailed Specifications:
Typical Application:
Note: 3Pin – Null; MCU = Micro-computer Unite or single chip Computer
When the connecting cable is shorter than 20 metres, a 5K pull-up resistor is recommended;
when the connecting cable is longer than 20 metres, choose a appropriate pull-up resistor as
needed.
Single-bus data format is used for communication and synchronization between MCU and
DHT11 sensor. One communication process is about 4ms.Data consists of decimal and
integral parts. A complete data transmission is 40bit, and the sensor sends higher data bit
first.
Data format: 8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit
decimal T data + 8bit check sum. If the data transmission is right, the check-sum should be
the last 8bit of "8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit
decimal T data".
MQ2 SMOKE SENSOR
The MQ-2 Gas sensor can detect or measure gasses like LPG, Alcohol, Propane,
Hydrogen, CO and even methane. The module version of this sensor comes with a Digital Pin
which makes this sensor to operate even without a microcontroller and that comes in handy
when you are only trying to detect one particular gas. When it comes to measuring the gas in
ppm the analog pin has to be used, the analog pin also TTL driven and works on 5V and
hence can be used with most common microcontrollers.
So if you are looking for a sensor to detect or measure gasses like LPG, Alcohol,
Propane, Hydrogen, CO and even methane with or without a microcontroller then this sensor
might be the right choice for you.
Using an MQ sensor it detects a gas is very easy. You can either use the digital pin or
the analog pin to accomplish this. Simply power the module with 5V and you should notice
the power LED on the module to glow and when no gas it detected the output LED will
remain turned off meaning the digital output pin will be 0V. Remember that these sensors
have to be kept on for pre-heating time (mentioned in features above) before you can actually
work with it. Now, introduce the sensor to the gas you want to detect and you should see the
output LED to go high along with the digital pin, if not use the potentiometer until the output
gets high. Now every time your sensor gets introduced to this gas at this particular
concentration the digital pin will go high (5V) else will remain low (0V).
You can also use the analog pin to achieve the same thing. Read the analog values (0-
5V) using a microcontroller, this value will be directly proportional to the concentration of
the gas to which the sensor detects. You can experiment with this values and check how the
sensor reacts to different concentration of gas and develop your program accordingly.
If you are looking for some accuracy with your readings then measuring the PPM
would be the best way to go with it. It can also help you to distinguish one gas from another.
So to measure PPM you can directly use a module. A basic wiring for the sensor from
datasheet is shown below.
The procedure to measure PPM using MQ sensor is the same but few constant values
will vary based on the type of MQ sensor used.
Pin Configuration:
For Module
1 Vcc This pin powers the module, typically the operating voltage is +5V
3 Digital You can also use this sensor to get digital output from this pin, by setting a threshold
Out value using the potentiometer
4 Analog This pin outputs 0-5V analog voltage based on the intensity of the gas
Out
For Sensor
1 H –Pins: Out of the two H pins, one pin is connected to supply and the other to ground
2 A-Pins: The A pins and B pins are interchangeable. These pins will be tied to the Supply
voltage.
3 B-Pins: The A pins and B pins are interchangeable. One pin will act as output while the
other will be pulled to ground.
Features:
Operating Voltage is +5V
Can be used to Measure or detect LPG, Alcohol, Propane, Hydrogen, CO and even
methane
Analog output voltage: 0V to 5V
Digital Output Voltage: 0V or 5V (TTL Logic)
Preheat duration 20 seconds
Can be used as a Digital or analog sensor
The Sensitivity of Digital pin can be varied using the potentiometer
SERVO MOTOR
A servomotor is a rotary actuator that allows for precise control of angular position,
velocity and acceleration. It consists of a suitable motor coupled to a sensor for position
feedback. It also requires a relatively sophisticated controller, often a dedicated module
designed specifically for use with servomotors.
Servomotors are not a different class of motor, on the basis of fundamental operating
principle, but uses servomechanism to achieve closed loop control with a generic open loop
motor.
RELAYS:
Connect this to a power source, and it will now grab and hold small pieces of metal.
So, herein lies the concept. If we take an electromagnet, it will interact with metals in its
vicinity. Now let’s take this one step further... If we were to place a piece of metal, near the
electromagnet, and connect some contacts, so that when the electromagnet is energized, the
contacts close, we have a working relay.
The simplest relay, is the Single Pole, Single Throw (spst) relay. It is nothing more than an
electrically controlled on-off switch. Its biggest property is the ability to use a very small
current, to control a much larger current. This is desirable because we can now use
smallerdiameter wires, to control the current flow through a much larger wire, and also to
limit the wear and tear on the control switch.
The coil, now energized becomes an electromagnet, and attracts the metal strip with the
contacts, which closes, providing a secondary heavy current path ( RED ) to the device ( say,
the fog lights)
Turning off the switch, opens the circuit to the coil, removes current flow, and the
electromagnet is no longer a magnet, the secondary path is opened, and the lights extinguish
TRANSISTOR:
A transistor is a semiconductor device used to amplify and switch electronic signals
and electrical power. It is composed of semiconductor material with at least three terminals
for connection to an external circuit. A voltage or current applied to one pair of the
transistor's terminals changes the current through another pair of terminals. Because the
controlled (output) power can be higher than the controlling (input) power, a transistor
can amplify a signal. Today, some transistors are packaged individually, but many more are
found embedded in integrated circuits.
The transistor is the key active component in practically all modern electronics. Many
consider it to be one of the greatest inventions of the 20th century. Its importance in today's
society rests on its ability to be mass-produced using a highly automated process
(semiconductor device fabrication) that achieves astonishingly low per-transistor costs. The
invention of the first transistor at Bell Labs was named an IEEE Milestone in 2009.
The transistor's low cost, flexibility, and reliability have made it a ubiquitous device.
Transistorized mechatronic circuits have replaced electromechanical devices in controlling
appliances and machinery. It is often easier and cheaper to use a standard microcontroller and
write a computer program to carry out a control function than to design an equivalent
mechanical control function.
The essential usefulness of a transistor comes from its ability to use a small signal
applied between one pair of its terminals to control a much larger signal at another pair of
terminals. This property is called gain. It can produce a stronger output signal, a voltage or
current, that is proportional to a weaker input signal; that is, it can act as an amplifier.
Alternatively, the transistor can be used to turn current on or off in a circuit as an electrically
controlled switch, where the amount of current is determined by other circuit elements.
There are two types of transistors, which have slight differences in how they are used
in a circuit. A bipolar transistor has terminals labeledbase, collector, and emitter. A small
current at the base terminal (that is, flowing between the base and the emitter) can control or
switch a much larger current between the collector and emitter terminals. For a field-effect
transistor, the terminals are labeled gate, source, and drain, and a voltage at the gate can
control a current between source and drain.
The image to the right represents a typical bipolar transistor in a circuit. Charge will
flow between emitter and collector terminals depending on the current in the base. Because
internally the base and emitter connections behave like a semiconductor diode, a voltage drop
develops between base and emitter while the base current exists. The amount of this voltage
depends on the material the transistor is made from, and is referred to as VBE
SOFTWARE SPECIFICATIONS
ARDUINO IDE
The ARDUINO integrated development environment (IDE) is a cross stage application (for
Windows, macOS, Linux) that is written in the programming language Java. It is utilized
write and upload programs to Arduino compatible boards, but also, with the help of 3rd party
cores, other vendor development boards. Here we are using NodeMCU. NodeMCU is an
open source improvement board and firmware arranged in the for the most part used
ESP8266 - 12E WiFi module. This ESP8266 progression board genuinely takes after Arduino
Nano. The Arduino IDE additionally supports the languages C and C++ utilizing exceptional
guidelines of code organizing. The Arduino IDE supplies a software library from the wiring
venture, which gives numerous basic info and yield methodology. It empowers us to program
the ESP8266WiFi module with the direct and earth shattering LUA programming language or
Arduino IDE.
BLYNK
Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi and
the likes over the Internet. Blynk IOT App Platform is most popular to make an Android or
IOS App based IOT system to monitor there sensor’s value or to turn On/OFF any device
around the globe via internet. Not only that Blynk app provides you with the Bluetooth
connectivity for your projects too and also a local server i.e a WiFi connectivity for your
projects to monitor and control them within a local network.
It's a digital dashboard where you can build a graphic interface for your project by
simply dragging and dropping widgets. It's really simple to set everything up and you'll start
tinkering in less than 5 mins.
Blynk is not tied to some specific board or shield. Instead, it's supporting hardware of
your choice. Whether your Arduino or Raspberry Pi is linked to the Internet over Wi-Fi,
Ethernet or this new ESP8266 chip, Blynk will get you online and ready for the Internet Of
Your Things.
IFTTT
IFTTT is named after the programming prohibitive clarification "if this, by then that."
IFT-TT is both a webpage and an adaptable application that pushed in 2010 and has the
maxim "Set the Internet to work for you animals". The idea is that we use IFTTT to automate
everything from your most adored applications and objectives to application attracted
embellishments and smart devices. Here, IFTTT application is utilized to cross over any
barrier between the Google Assistant directions and the adafruit. Setting up the IFT-TT
application at first requires venturing in after which we have to make an applet and sooner or
later "This", for example the trigger, here we select Google Assistant and subsequently we
will type in the approaches to manage which the Google Assistant ought to react and to this
mentioning it should control the mechanical get-together/move related with it. The reaction
course from the Goggle Assistant can what's more be circled in as required. In the wake of
masterminding the trigger, for instance "This" of the application we need to design the
"That". What should be done once the Google Assistant hears the requesting which we
basically composed? This is picked by setting "That" of the application. We click "That"
decision which is used to accessory Google Assistant with Adafruit. By then range for
Adafruit and select it. Before long enter what information we have to send to which feed of
Adafruit dashboard. This makes the activity for the trigger for example the Google Assistant
solicitation. when we use Google Assistant on flexible and give voice demand, applet made
in IFT-TT get this course and will send information '1' to the Adafruit feed.
GOOGLE ASSISTANT
Google Assistant is Google's voice-controlled impressive right hand. It's was at initial
an expansion of Google Now - intended to be precious - while working up Google's current
"OK Google" voice controls. At first, Google Now shrewdly hauled out critical data for you:
it knew where you worked, and it knew your get together domains and visiting plans, the
entertainments packs you increased in value, and what captivated you so it could give you
particular data that had any sort of impact. Google Assistant can take part in two-manner
discussions living behind organization's previous remote helper. Additionally it is accessible
in various dialects giving solace to client.
Power supply is the first and the most important part of our project. For our project
we require +5V regulated power supply with maximum current rating1A.
Following basic building blocks are required to generate regulated power supply.
TRANSFORMER:
Transformers convert AC electricity from one voltage to another with a little loss of power.
Step-up transformers increase voltage, step-down transformers reduce voltage. Most power
supplies use a step-down transformer to reduce the dangerously high voltage to a safer low
voltage.
If the secondary coil is attached to a load that allows current to flow, electrical power is
transmitted from the primary circuit to the secondary circuit. Ideally, the transformer is
perfectly efficient; all the incoming energy is transformed from the primary circuit to the
magnetic field and into the secondary circuit. If this condition is met, the incoming electric
power must equal the outgoing power:
If the voltage is increased, then the current is decreased by the same factor. The impedance in
one circuit is transformed by the square of the turns ratio. For example, if an impedance Zs is
attached across the terminals of the secondary coil, it appears to the primary circuit to have an
impedance of (Np/Ns)2Zs. This relationship is reciprocal, so that the impedance Zp of the
primary circuit appears to the secondary to be (Ns/Np)2Zp.
Description
The LM78XX/LM78XXA series of three-terminal positive regulators are available in
the TO-220/D-PAK package and with several fixed output voltages, making them useful in a
Wide range of applications. Each type employs internal current limiting, thermal shutdown
and safe operating area protection, making it essentially indestructible. If adequate heat
sinking is provided, they can deliver over 1A output Current. Although designed primarily as
fixed voltage regulators, these devices can be used with external components to obtain
adjustable voltages and currents.
Polarity = +ve
Vm=vrms x sq. rt of 2
= 12x sq.rt of 2
= 16.97
C= (IxT)/V
T=1/2πf
= 1/2 x3.14×50 hz
= 955.41×10-6
=1000 µf
RECTIFIER:
ADVANTAGES
1. Low cost
2. Easy to use
4. This low cost system with minimum requirements takes Care of both home security as well
as Home automation.
8. Control contraptions from anywhere in the world using mobile phones to control smart
home. Cost effective.
DISADVANTAGES
1. It will also send alert message if any one of the known person comes in that area.
APPLICATION
2. For offices
3. And any other restricted area which is to be monitored for security purpose.
4. Medical Applications
5. Agriculture automation
CONCLUSION
The main aim of this project was to propose a considerably cost effective voice
controlled (Google Assistant) home automation controlling generally all kind of home
appliances found at home. The home automation utilizing IOT has been experimentally
demonstrated to work attractive by connecting simple appliances to it and the appliances
were effectively controlled remotely through internet using voice commands. This will help
the users to monitor the condition of various home parameters in the home anytime
anywhere. The designed system not only monitors the sensor data, like temperature, smoke,
fire, motion sensors, but also actuates a process according to the requirement, for example
switching on the light when it gets dark. It also stores the sensor parameters in the cloud in a
timely manner. This will help the user to analyze the condition of various parameters in the
home anytime anywhere.
Future work:
Using this system as frame work, the system can be expanded to include various other
options which could include home security feature like capturing the photo of a person
moving around the house and storing it onto the cloud. This will reduce the data storage than
using the CCTV camera which will record all the time and stores it. The system can be
expanded for energy monitoring, or weather stations. This kind of a system with respective
changes can be implemented in the hospitals for disable people or in industries where human
invasion is impossible or dangerous, and it can also be implemented for environmental
monitoring.
REFERENCES
[1] Ravi Kishore kodali and Vishal jain “ IOT based smart security and Home Automation
system” International conference on computing, communication and automation (ICCCA
2016)
[2] R. Piyare and M. Tazil, "Bluetooth based home automation system using cell phone,"
Consumer Electronics (ISCE), 2011 IEEE 15th International Symposium on, Singapore,
2011, pp. 192-195.
[5] R. Teymourzadeh, Salah Addin Ahmed, Kok Wai Chan and Mok Vee Hoong, "Smart
GSM based Home Automation System," Systems, Process & Control (ICSPC), 2013 IEEE
Conference on, Kuala Lumpur, 2013, pp. 306-309.