home automation using voice control

23
1 HOME AUTOMATION USING VOICE CONTROL

Upload: others

Post on 12-Dec-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HOME AUTOMATION USING VOICE CONTROL

1

HOME AUTOMATION USING

VOICE CONTROL

Page 2: HOME AUTOMATION USING VOICE CONTROL

2

Table of Contents

Executive Summary............................................................................................................. 3

I Introduction............................................................................................................... 4

II RESEARCH METHODOLOGY............................................................................ 5 2.1 Proposed Prototype............................................................................................. 5

2.2 Topic Formulation.............................................................................................. 6

III IMPLEMENTATION............................................................................................... 7 3.1 Requirements...................................................................................................... 7

3.2 Hardware Specifications.................................................................................... 8

IV WORKING OF DIMMER CIRCUIT.................................................................... 15

V SCHEMATIC DESIGN & PCB DESIGN................................................................... 17

VI Conclusion.................................................................................................................. 21

3.1 Result and Discussion......................................................................................... 21

3.2 Future Scope....................................................................................................... 21

VII REFRERNCES..........................................................................................................

. 22

VIII ACKNOWLEDGMENT........................................................................................... 23

Executive Summary

Page 3: HOME AUTOMATION USING VOICE CONTROL

3

In this fast paced life of 21st century, automation plays a key role in human life. Home

automation allows us to control household electrical appliances like light, door, fan, AC etc.

It also provides home security and emergency system to be activated. Home automation not

only refers to reduce human efforts but also energy efficiency and time saving. The main

objective of home automation and security is to help handicapped and old aged people who

will enable them to control home appliances and alert them in critical situations.

This project put forwards the implementation of home automation and security system using

Arduino microprocessor and Android smartphone. Home appliances are connected to the

microprocessor and communication is established between the Arduino and Android mobile

device or tablet via Bluetooth module. We would develop an authentication to the system for

authorized person to access home appliances. The device with low cost and scalable to less

modification to the core is much important. It presents the design and implementation of

automation system that can monitor and control home appliances via android phone or tablet.

Chapter I

Introduction

Page 4: HOME AUTOMATION USING VOICE CONTROL

4

Nowadays, we have remote controls for our television sets and other electronic systems,

which have made our lives real easy. Have you ever wondered about home automation which

would give the facility of controlling tube lights, fans and other electrical appliances at home

using a remote control? Today‟s homes require sophistication control in its different gadgets

which are basically electronic appliances. This has revolutionized the area of home

automation with respect to an increased level of affordability and simplicity. Through the

integration of home appliances with smart phone and tablet connectivity. Smart phones are

already feature-perfect and can be made to communicate to any other devices in an ad hoc

network with a connectivity options like Bluetooth. With the advent of mobile phones,

Mobile applications development has seen a major outbreak. Utilizing the opportunity of

automating tasks for a smart home, mobile phone commonly found in normal household can

be joined in a temporary network inside a home with the electronic equipment. Android, by

Google Inc. provides the platform for the development of the mobile applications for the

Android devices. Home automation system is a mobile application developed using Android

targeting its vast market which will be beneficial for the masses.

Automation of the surrounding environment of a modern human being allows increasing his

work efficiency and comfort. There has been a significant development in the area of an

individual‟s routine tasks and those can be automated. In the present times, we can find most

of the people clinging to their mobile phones and smart devices throughout the day. Hence

with the help of his companion – a mobile phone, some daily household tasks can be

accomplished by personifying the use of the mobile phone. Analyzing the current smart

phone market, novice mobile users are opting for Android based phones. It has become a

second name for a mobile phone in layman terms. Home Automation System (HAS) has been

designed for mobile phones having Android platform to automate an 8 bit Bluetooth

interfaced microcontroller which controls a number of home appliances like lights, fans,

bulbs and many more using on/off relay. This project presents the automated approach of

controlling the devices in a household that could ease the tasks of using the traditional

method of the switch. The most famous and efficient technology for short range wireless

communicationBluetooth is used here to automate the system.

Chapter II

Research Methodology

Page 5: HOME AUTOMATION USING VOICE CONTROL

5

Presently, conventional wall switches located in different parts of the house makes it

difficult for the user to go near them to operate. Remote controlled home automation

system provides a most modern solution with smart phones. In order to achieve this, a

Bluetooth module is interfaced to the Arduino board at the receiver end while on the

transmitter end, a GUI application on the cell phone sends ON/OFF commands to the

receiver where loads are connected. By touching the specified location on the GUI,

the loads can be turned ON/OFF remotely through this technology. The loads are

operated by Arduino board through optoisolators and thyristors using triacs. Presently,

conventional wall switches located in different parts of the house makes it difficult for

the user to go near them to operate. Even more it becomes more difficult for the

elderly or physically handicapped people to do so. Remote controlled home

automation system provides a most modern solution with smart phones. In order to

achieve this, a Bluetooth module is interfaced to the Arduino board at the receiver end

while on the transmitter end, a GUI application on the cell phone sends ON/OFF

commands to the receiver where loads are connected. By touching the specified

location on the GUI, the loads can be turned ON/OFF remotely through this

technology. The loads are operated by Arduino board through optoisolators and

thyristors using triacs.

Proposed Prototype:

As value of product is increasing in our routine life due to the event of technology a

tiny low plan referred to as smart home project is introduced to scale back the cost and

inconvenience. A sensible house is ready to management the house although the

person isn't accessible in home. Smart lighting allows you to control wall switches,

blinds, and lamps, but how intuitive is a lighting control system? It turns out, quite; its

capabilities are extensive. You‟re able to schedule the times lights should turn on and

off, decide which specific rooms should be illuminated at certain times, select the

level of light which should be emitted, and choose how particular lights react through

motion sensitivity, as seen with Belkin‟s WeMo Switch + Motion, which is both

affordable and easy to use with its plug-and-play simplicity. The proposed system will

have following features: Arduino, Devices controlled through android app, also

through voice commands, Mobile control, Bluetooth. If any person inside the home

then automatically device turn on and vice versa.

Topic Formulation:

Page 6: HOME AUTOMATION USING VOICE CONTROL

6

Can we automatically power off the appliances when going on vacations or do we have to

bother our neighbor? There are various application base device available in India which can

turn normal appliances to smart appliances. So, in smart home implemented using

Bluetooth/Wi-Fi, one can operate the devices from home only within the vicinity of 10-20m.

This project paper include the control of different electronic devices in home using mobile

application but it including security feature.

Chapter III

Page 7: HOME AUTOMATION USING VOICE CONTROL

7

IMPLEMENTATION

The circuit diagram of the proposed system is:

3.1 Requirements for Project:

A. Hardware Requirements:

Page 8: HOME AUTOMATION USING VOICE CONTROL

8

1. Arduino Uno R3

2. Bluetooth Module HC-06

3. BT136 Triac

4. LM393 Comparator

5. Optocoupler MOC3021

6. 4 x 5V Relays.

7. 6 x 1n4007 Diode.

8. 4 x BC547 Transistors.

9. 4 x 330e ohm Resistors.

10. 2 x 220k ohm Resistor

11. 10k Potentiometer

12. 10k ohm Resistor

13. 220 ohm Resistor

14. 470 ohm Resistor

15. 100 ohm Resistor

16. 220 ohm Resistor

B. Software requirements:

1. Arduino IDE

2. Block Coding.

3. Proteus.

ARDUINO:

1. BLOCK: Microcontroller

2. TYPE: ATMEGA328

3. ANALOG/DIGITAL: Digital PINS FOR INTERFACE : 20 Pins

Page 9: HOME AUTOMATION USING VOICE CONTROL

9

4. PHOTO/CIRCUIT SYMBOL:

Arduino is a tool for making computers that can sense and control more of the physical world

than your desktop computer. It's an open-source physical computing platform based on a

simple microcontroller board, and a development environment for writing software for the

board. Arduino can be used to develop interactive objects, taking inputs from a variety of

switches or sensors, and controlling a variety of lights, motors, and other physical outputs.

Arduino projects can be stand-alone, or they can communicate with software running on your

computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or

purchased preassembled; the opensource IDE can be downloaded for free.The Arduino Uno

is a microcontroller board based on the ATmega328. It has 14 digital input/output pins (of

which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, 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.

RELAY:

Page 10: HOME AUTOMATION USING VOICE CONTROL

10

A relay is an electrical switch that uses an electromagnet to move the switch from the off to

on position instead of a person moving the switch. It takes a relatively small amount of power

to turn on a relay but the relay can control something that draws much more power. A relay is

used to control the air conditioner in your home. The AC unit probably runs off of 220VAC

at around 30A. That's 6600 Watts! The coil that controls the relay may only need a few watts

to pull the contacts together. A relay switch can be divided into two parts: input and output.

The input section has a coil which generates magnetic field when a small voltage from an

electronic circuit is applied to it. This voltage is called the operating voltage. Commonly used

relays are available in different configuration of operating voltages like 6V, 9V, 12V, 24V

etc. The output section consists of contactors which connect or disconnect mechanically. In a

basic relay there are three contactors: normally open (NO), normally closed (NC) and

common (COM). At no input state, the COM is connected to NC. When the operating voltage

is applied the relay coil gets energized and the COM changes contact to NO. Different relay

configurations are available like SPST, SPDT, DPDT etc., which have different number of

changeover contacts. By using proper combination of contactors, the electrical circuit can be

switched on and off.

Bluetooth Module HC-06:

Page 11: HOME AUTOMATION USING VOICE CONTROL

11

Bluetooth is a specification for a small form-factor, lowcost radio solution providing links

between mobile computers, mobile phones and other portable handheld devices, and

connectivity to the Internet. It will enable users to connect a wide range of computing and

telecommunications devices easily and simply, without the need to buy, carry, or connect

cables.It is a wireless technology that operates on an unlicensed radio spectrum. There is no

charge for communicating between two Bluetooth devices. Bluetooth is intended to get

around the problems that come with both infrared and cable synchronizing systems. The

hardware vendors, which include Siemens, Intel, Toshiba, Motorola and Ericsson, have

developed a specification for a very small radio module to be built into computer, telephone

and entertainment equipment. From the user‟s point of view, there are three important

features to Bluetooth: 1. Its wireless. When you travel, you don‟t have to worry about

keeping track of a briefcase full of cables to attach all of your components, and you can

design your office without wondering where all the wires will go. HC‐05 module is an easy

to use Bluetooth SPP (Serial Port Protocol) module, designed for transparent wireless serial

connection setup.

Page 12: HOME AUTOMATION USING VOICE CONTROL

12

The HC-06 Bluetooth Module can be used in a Master or Slave configuration, making it a

great solution for wireless communication. This serial port Bluetooth module is fully

qualified Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps Modulation with complete

2.4GHz radio transceiver and baseband. It uses CSR Blue core 04‐ External single chip

Bluetooth system with CMOS technology and with AFH (Adaptive Frequency Hopping

Feature). Bluetooth Module HC-05 The Bluetooth module HC-05 is a MASTER/SLAVE

module. By default the factory setting is SLAVE. The Role of the module (Master or Slave)

can be configured only by AT COMMANDS. The slave modules cannot initiate a connection

to another Bluetooth device, but can accept connections. Master module can initiate a

connection to other devices. The user can use it simply for a serial port replacement to

establish connection between MCU and GPS, PC to your embedded project, etc.

HC-05 Specification:

1. Bluetooth protocol: Bluetooth Specification v2.0+EDR

2. Frequency: 2.4GHz ISM band

3. Modulation: GFSK (Gaussian Frequency Shift Keying)

4. Emission power: ≤4dBm, Class 2

5. Sensitivity: ≤-84dBm at 0.1% BER

6. Speed: Asynchronous: 2.1Mbps(Max) / 160 kbps,

7. Synchronous: 1Mbps/1Mbps

8. Security: Authentication and encryption

9. Profiles: Bluetooth serial port

10. Power supply: +3.3VDC 50mA

11. Working temperature: -20 ~ +75Centigrade

12. Dimension: 26.9mm x 13mm x 2.2 mm

BT136 TRIAC:

Page 13: HOME AUTOMATION USING VOICE CONTROL

13

There are many different ways to use a TRIAC; since the device is bi-directional the

TRIAC gate can be trigger with either positive voltage or negative voltage. So this

allows the TIRAC to be operated in four different modes. Since the TRIAC and SCR

share most of the same characteristics, just like SCR the TRIAC will also not turn off

when the gate voltage is removed. We need special type of circuit called commutation

circuit to turn of the SCR again. This commutation is normally done by reducing the

load current (forced commutation) less than the holding current. To put it simple the

TRIAC will remain turned on only till the load current is greater than the holding

current of the TRIAC. The BT136 is TRIAC with 4A maximum terminal current. The

gate threshold voltage of the BT136 is also very less so can be driven by digital

circuits. Since TRIACs are bi-directional switching devices they are commonly used

for switching AC applications. So if you looking to switch of control (dim, speed

control) an AC load which consumes less than 6A with a digital device like

microcontroller or microprocessor then BT136 might be the right for you.

LM393 Comparator:

The IC LM393 has two internally inbuilt operational amplifiers which are internally

compensated with frequency. These ICs are specially designed for performing their

different tasks using a single power supply. It can also execute its functions properly

with a split power supply. The supply of current-drain does not rely on the amount of

the power supply. One of the most important features of this IC is, it includes ground

in its common-mode input voltage. The applications of this IC mainly include various

fields in real life, and also industrial, ADC (Analog to digital converters), electrical

systems powered by the battery, time-delay generators limit comparators, etc. This

article discusses an overview of the LM393 IC and its working.

Page 14: HOME AUTOMATION USING VOICE CONTROL

14

Optocoupler MOC3021:

MOC3021 is a non-zero crossing based optoisolator consists of gallium arsenide

infrared emitting diodes, optically coupled to a silicon-based triac. Optocoupler has

multiple types and every type has almost the same operating functionality, but

sometimes its internal structure makes it different from another optocoupler. There is

also a TRIAC based optocoupler known as MOC3021. It is having internal TRIAC

installed which gives it a capability to control any external switching devices like

HIGH POWER TRIAC, MOSFETS, and Solid States Relay. MOC3021 comes in an

internal light-emitting diode and a TRIAC based light activating based transistor. This

optocoupler provides protection from HIGH resistive and inductive loads. It has the

ability to flow the current up to 1A. MOC3021 Optocoupler work on the IR based and

it keeps any kind of current to flow towards the circuit. The optocoupler comes only in

one package but the single package could be used with any circuit. In HIGH load the

operating temperature always affects the circuit performance, but MOC3021 has the

ability to operate in HIGH temperature and it also increases the optocoupler life.

Page 15: HOME AUTOMATION USING VOICE CONTROL

15

Chapter IV

WORKING OF DIMMER CIRCUIT

We have used the LM393 (dual comparator IC) for the zero crossing detection, the LM339

quad comparator IC also can be used. An optocoupler can be used for the same purpose( zero

crossing detection) but we think the comparator is much better. The two diodes which are

connected between the non-inverting input (+) and the inverting input (-) of the comparator

are used to limit the voltage across the 2 pins. The output of the LM393 (or LM339) is an

open collector, so we added a 10k ohm resistor there (between +5V and Arduino pin 2). Also

the comparator chip is supplied with +5V which comes from the Arduino board. The BT136

TRIAC to control AC voltage. The first thing to do is to detect the zero cross since our pulse

needs to be in phase with the AC voltage. So, we have to detect when the voltage passes from

positive to negative or from negative to positive and synchronize our pulse with that so it will

fire always in the same spot. For that we have to use a full bridge rectifier. This will give me

at the output both the positive and negative curves of the AC wave and we do that since

Arduino can‟t work with negative values. Here below on my oscilloscope we have the input

(green) and the output (yellow) from the full bridge rectifier. TRIAC is a three-terminal AC

switch which can be triggered by a low energy signal at its gate terminal. In SCRs, it

conducts in only one direction, but in the case of TRIAC the power can be controlled at both

directions. Here we are using a BT136 TRIAC for AC Lamp dimming purpose.

As in above graph, the TRIAC is triggered at a firing angle of 90 degrees by applying a small

gate pulse signal to it. The time “t1” is the delay time which we have to give as per our

dimming requirement. For example, in this case as the firing angle is 90%, hence the power

output will also be halved and hence the lamp will also glow with half intensity. We know

that the frequency of AC signal is 50 Hz here. So the time period will be 1/f, which will be

20ms, so for a half cycle, this will be 10ms or 10,000 microseconds. Hence for controlling the

power of our AC lamp, the range of “t1” can be varied from 0-10000 microseconds.

Page 16: HOME AUTOMATION USING VOICE CONTROL

16

The optocoupler (MOC302x) is used for firing the BT136 triac, its LED is connected to

Arduino pin 8 through 120 ohm resistor. we chose the value 120 ohm in order to get a current

of about 30mA (current passes through the optocoupler LED).Optocoupler is also known

as Optoisolator. It is used to maintain isolation between two electrical circuits like DC and

AC signals. Basically, it consists of an LED that emits infrared light and the photosensor

which detects it. Here we are used a MOC3021 Optocoupler to control the AC lamp from

microcontroller signals which is a DC signal. We previously used the same MOC3021

Optocoupler in TRIAC dimmer circuit.

Page 17: HOME AUTOMATION USING VOICE CONTROL

17

Chapter V

SCHEMATIC DESIGN & PCB DESIGN

The hardware and circuit connection for developing PCB for Bluetooth Arduino

Home automation Ckt based home automation circuit and the top silk layer.

Below is the top silk layer of the schematic connections which includes all the

actual measured components. The copper layer PCB is developed using online

tool Easyeda platform. The developed PCB has tracks or as we say copper

traces are of 0.5mm. The final 2D view of PCB looks like;

Page 18: HOME AUTOMATION USING VOICE CONTROL

18

Front view or Top View

Page 19: HOME AUTOMATION USING VOICE CONTROL

19

Back view or Bottom View

Page 20: HOME AUTOMATION USING VOICE CONTROL

20

3D view of Designed PCB

Page 21: HOME AUTOMATION USING VOICE CONTROL

21

Chapter VI

CONCLUSION

In this paper we have introduced design and implementation of a low cost, flexible

and wireless solution to the home automation. The system is secured for access from

any user or intruder. The users are expected to acquire pairing password for the

Arduino BT and the cell phone to access the home appliances. This adds a protection

from unauthorized users. This system can be used as a test bed for any appliances that

requires on-off switching applications without any internet connection. We hide the

complexity of the notions involved in the home automation system by including them

into a simple, but comprehensive set of related concepts. This simplification is needed

to fit as much of the functionality on the limited space offered by a mobile device‟s

display. This paper proposes a low cost, secure, ubiquitously accessible, auto-

configurable, remotely controlled solution. The approach discussed in the paper is

novel and has achieved the target to control home appliances remotely using the WiFi

technology to connects system parts, satisfying user needs and requirements. WiFi

technology capable solution has proved to be controlled remotely, provide home

security and is cost effective as compared to the previously existing systems. Hence

we can conclude that the required goals and objectives of home automation system

have been achieved. The system design and architecture were discussed, and

prototype presents the basic level of home appliance control and remote monitoring

has been implemented. Finally, the proposed system is better from the scalability and

flexibility point of view than the commercially available home automation systems.

RESULTS AND DISCUSSIONS

The main purpose of this smart home design is to control the electronic appliances in

home like fans, lights, AC and forth remotely using smart phone by using Android

Application. The system as the name indicates, „Home automation‟ makes the system

more flexible and provides attractive user interface compared to other home

automation systems. In this system we integrate mobile devices into home automation

systems. A novel architecture for a home automation system is proposed using the

relatively new communication technologies.

FURTHER SCOPE:

More smartness can be added to this proposed project for making this smart home

highly automated by using Wi-Fi or GSM module. A camera can also be connected to

micro controller so that suspect photograph can be taken and can be forwarded to the

police if needed. Also voice call feature can be included to this system through which

user can control the home appliances.

Page 22: HOME AUTOMATION USING VOICE CONTROL

22

Chapter VII

Reference

1. " Joaquin Gutierrez, Juan Francisco Villa-Medina, Alejandra Nieto-Garibay, and

Miguel Angel PortaGándara “Automated Irrigation System Using a Wireless

Sensor Network and GPRS module” IEEE 2013

2. Zhang Feng Yulin university Yulin University [email protected], “Research on

Water-Saving Irrigation Automatic Control System Based on Internet of Things

Institute of Information Technology”, 2011 IEEE.

3. Abhinav Rajpal, Sumit Jain, Nistha Khare and Anil Kumar Shukla”

Microcontroller-based Automatic Irrigation System with Moisture Sensor”

Proceedings of the International Conference on Science and Engineering (ICSE

2011).

Page 23: HOME AUTOMATION USING VOICE CONTROL

23

Chapter VII

Acknowledgment

We are thankful to all those who have given us this opportunity to complete this report.We

give special gratitude to our honorable principal Dr.Sandip Joshi who always encourages us

and motivates us to do innovative things that will increase our knowledge. We would also

like to thank our H.O.D of Humanities Department Prof. Swati Patil for her guidance. We

also thank H.O.D of the Electronics department Dr. R. H. Khade for this opportunity.