You are on page 1of 20

ELECTRONICS HUB

P R O J E C T S | T U T O R I A L S

HOME ARDUINO VOICE ACTIVATED HOME AUTOMATION

Voice Activated Home Automation


MARCH 7, 2017 BY ANUSHA 5 COMMENTS

Contents [hide]

1 Circuit Diagram
2 Components Required
3 Components Description
4 Circuit Design
5 Working of the Project
6 Code
7 Applications
8 Construction and Output Video
9 Related Articles

The concept of Home Automation is gaining popularity as it helps in reducing human effort
and errors and thus increasing the efficiency. With the help of Home Automation system, we
can control different appliances like lights, fans, TV, AC etc. Additionally, a home automation
system can also provide other features like security, alarms, emergency systems etc. can be
integrated.

Select the Next Set of DIY Arduino Projects you want us to try

There are many types of Home Automation Systems like Bluetooth Controlled, Internet
Controlled, RF Controlled, Remote Controlled (IR Remote) etc. Each type has its own
advantages and disadvantages. In this project, we have designed a Voice Activated Home
Automation system, where different appliances are controlled by sending a Voice Command.

The Voice Activated Home Automation project is implemented using Arduino UNO, Bluetooth
and a smart phone. Further sections will explain circuit diagram, components required and
working of the project.
Circuit Diagram
Components Required
Arduino UNO 1
HC 05 Bluetooth Module 1
Smart Phone or Tablet 1
2N2222 NPN Transistor 4
12V Relay 4
1 K Resistor 4
1N4007 PN Junction Diode 4
Power Supply
Connecting Wires
Breadboard (Prototyping Board)
App for transmitting voice to Bluetooth

Components Description
Bluetooth HC 05 : For wireless communication, we used Bluetooth Technology and the
module used for this is HC 05. This module can be interfaced using UART protocol with a
wide range of programmable baud rates but the default baud rate is 9600 bps. HC 05
Bluetooth Module can be configured as either master or slave, whereas another module HC
06 can work only in slave mode.

The following image shows the HC 05 Bluetooth Module used in this project. In this module,
there are pins for VCC (5V), GND, TX and RX.
BT Voice Control for Arduino: This app is developed by SimpleLabsIN for voice based
Arduino projects. This Android App will use the phones voice recognition feature and will
convert the voice commands to text and transfer the string via Bluetooth.

The app can be downloaded from here BT Voice Control for Arduino

If you are familiar with any other similar app, you can always use that.

Relay Board (4 Channel): A Relay is used to connect a small current transistor circuit with a
large current AC circuit. In this project, we have used a pre-built relay board with 4 channels.

NOTE: Be cautious when using Relay board with AC Mains Supply.

Circuit Design
We will now see the design of the Voice Activated Home Automation circuit. First, we will
connect the Bluetooth Module to the Arduino. Since Bluetooth uses UART protocol, we need
to use the RX and TX pins of the Arduino. We will be using SoftwareSerial library to define
our own RX and TX pins (Pin 2 is RX and Pin 3 is TX).
NOTE: We have left out the Bluetooths RX and Arduinos TX connection as it is not used. In
case you face a problem, connect a voltage divider to convert the Arduino TXs 5V signal to
Bluetooth RXs 3.3V.

Next, we will connect the relays to the Arduino. Since we used a readymade relay board with
4 channels, all we need to do is to connect the inputs of the individual relays to the Arduino.
For detailed connection like the resistor, transistor, diode and relay, refer the circuit diagram.

NOTE: We did not connect any load to the relay but you can always connect some small loads
and check out the functioning. Be extra careful while using AC Mains with relay board.

All the necessary connections are explained in the circuit diagram.

Working of the Project


In this project, a simple Voice Activated Home Automation system is designed. Voice
commands are used to control different appliances. We will now see the working of the
project. All the connections are made as per the circuit diagram above.

After making the necessary connections, we have to switch on the power supply to the circuit.
Now, we need to pair the Phones Bluetooth to the HC 05 Bluetooth Module. Before that, we
have to install the App mentioned above in the phone. The home screen of the app looks
something like this.
Next step is to connect the phone with the Bluetooth module. For this, choose the option
Connect Robot and select the appropriate Bluetooth Device. If the devices arent paired
earlier, we need to pair them now using the Pin of the HC 05 Bluetooth Module.
After successful connection, the devices are ready to transmit data. For that, press the press
microphone icon on the app and start giving voice commands.

NOTE: Make sure that the voice recognition feature is enabled on the phone (this is usually
associated with Google app).

For example, if we press the microphone icon and say turn on light, the app will recognise
the command and the transfers it to the Bluetooth Module. Also, the command gets displayed
on the screen for our reference.
When the string turn on light is detected by the app, it will send the string as *turn on light#.
So, the actual message received by the Bluetooth Module is in the format of *Message#. The
reason for padding the * and # at the begging and end of the string is to identify the starting
and ending of the message.

We are able to delete the # from the string but left out the * in order to identify the starting of
the string. The received message is compared with some predefined strings and if the
message matches with any of them, then corresponding action like turning on or turning off
the load happens.

We have used the following commands: turn on AC, turn off AC, turn on light, turn off
light, turn on TV, turn off TV, turn on fan, turn off fan, turn on all and turn off all.

Code
1 #include <SoftwareSerial.h>

2
3 const int rxPin = 2;

4 const int txPin = 3;


5 SoftwareSerial mySerial(rxPin, txPin);

6
7 int ac=4;

8 int light=5;
9 int fan=6;

10 int tv=7;

11 String data;

12
13 void setup()
14 {

15 Serial.begin(9600);
16 mySerial.begin(9600);

17
18 pinMode(ac, OUTPUT);

19 pinMode(light, OUTPUT);

20 pinMode(fan, OUTPUT);

21 pinMode(tv, OUTPUT);
22
23 digitalWrite(ac, LOW);

24 digitalWrite(light, LOW);

25 digitalWrite(fan, LOW);
26 digitalWrite(tv, LOW);
27 }

28
29 void loop()

30 {
31 int i=0;

32 char ch=0;

33 data="";

34 while(1)
35 {

36 while(mySerial.available()<=0);

37 ch = mySerial.read();

38 if(ch=='#')
39 break;

40 data+=ch;

41 }

42 Serial.println(data);

43
44 if(data=="*turn on AC")

45 {
46 digitalWrite(ac,HIGH);

47 Serial.println("ac on");

48 }

49 else if(data=="*turn off AC")

50 {

51 digitalWrite(ac,LOW);

52 Serial.println("ac off");

53 }
54 else if(data=="*turn on light")

55 {

56 digitalWrite(light,HIGH);

57 Serial.println("light on");

58 }

59 else if(data=="*turn off light")

60 {

61 digitalWrite(light,LOW);

62 Serial.println("light off");
63 }

64 else if(data=="*turn on fan")

65 {

66 digitalWrite(fan,HIGH);

67 Serial.println("fan on");

68 }

69 else if(data=="*turn off fan")

70 {

71 digitalWrite(fan,LOW);
72 Serial.println("fan off");

73 }

74 else if(data=="*turn on TV")


75 {

76 digitalWrite(tv,HIGH);

77 Serial.println("tv on");

78 }

79 else if(data=="*turn on TV")


80 {

81 digitalWrite(tv,LOW);

82 Serial.println("tv off");

83 }

84 else if(data=="*turn on all")

85 {

86 digitalWrite(ac,HIGH);

87 digitalWrite(light,HIGH);

88 digitalWrite(fan,HIGH);
89 digitalWrite(tv,HIGH);

90 Serial.println("all on");

91 }

92 else if(data=="*turn off all")

93 {

94 digitalWrite(ac,LOW);

95 digitalWrite(light,LOW);

96 digitalWrite(fan,LOW);
97 digitalWrite(tv,LOW);

98 Serial.println("all off");

99
100 }

101
102 }

Voice Activated Home Automation hosted with by GitHub view raw

Applications
The Voice Activated Home Automation system will help us control different loads
(electrical appliances) with simple voice commands.
This kind of system is very useful for people with disabilities.
Further, the project can be expanded by adding different sensors (light, smoke, etc.).

Construction and Output Video


Related Articles

Arduino Home Arduino Based Home How to Connect Arduino Controlled


Automation Using RF Automation Using TV Arduino Uno to Power Outlet
Remote Android via Bluetooth

How To Make Arduino GSM Based Home How To Build A Simple Internet of Things
Based Home Security Alarm System Arduino Robotic ARM
Automation Project via Using Arduino [DIY]
Bluetooth?

FILED UNDER: ARDUINO

Comments

aqil sadiq says


MARCH 7, 2017 AT 9:47 AM

thanks alot for this


where is the programming file for arduino???

Reply

Bharath Janakiraman says


MARCH 18, 2017 AT 1:13 AM

Mention disadvantages that will help students to further development

Reply
Shahd says
MAY 4, 2017 AT 8:14 AM

Hello,
I want to ask how we can pair the Bluetooth Module.

Reply

Anusha says
JULY 7, 2017 AT 4:13 AM

Hi, Check this video. https://www.youtube.com/watch?v=dHwInrh5niU If you are


pairing the Bluetooth Module for the first time, you probably have to enter the PIN of
the Bluetooth Module on the phone. It is usually printed on the Module (1234 or 0000).

Reply

Nithish Kanna says


JUNE 25, 2017 AT 9:06 AM

Please send a exact circuit connection so it will be easier to be identify.

Reply

Leave a Reply
Your email address will not be published. Required fields are marked *

Comment

Name *

Email *
Website

reCAPTCHA

Please upgrade to a supported browser


to get a reCAPTCHA challenge.

Alternatively if you think you are getting


this page in error, please check your
internet connection and reload.

Why is this happening to me?

POST COMMENT

Search this website

Suggest A Topic [or] Project

COMPLETE STEP BY STEP GUIDE


ads by media.net

Wireless Home Automation System

Home Automation Controller

Discount Home Automation

Arduino Bluetooth

Smart Home Automation System

Voice Activated Home Automation

Microsoft Product Activation

Electronics Hub

YouTube 18K

Electronics Hub

Follow On
Electronics Hub

Suivre

SUBSCRIBE FOR FREE PROJECT CIRCUITS

Enter your email address:

SUBSCRIBE

Delivered by FeedBurner

Electronics Hub
667,242 likes

Like Page Sign Up

Be the first of your friends to like this


ads by media.net

Wireless Home Automation

System
Voice Activated Home

Automation
Discount Home Automation

Home Automation Controller

X10 Home Automation

Affordable Home Automation

Voice Alert

Wireless Router Setup

Wireless Phone Carriers

Wireless Internet Providers

Wireless Cellular Phones

Best Wireless Modem

Wireless Cable Modems

New Invention Ideas

Home Security Systems

PROJECTS BY CATEGORY

Arduino Projects (200+)


Electronics Projects (250+)
Mini Project Circuits (160+)
Mini Project Ideas (150+)
ECE Projects (150+)
EEE Projects (150+)
8051 Projects (110+)
Raspberry Pi Projects (101+)
Electrical Project Ideas (100+)
Embedded Projects (100+)
Latest Electronics Ideas (100+)
Microcontroller Mini Projects (100+)
Robotics Projects (100+)
VLSI Projects (100+)
Solar Projects (100+)
IOT Projects (100+)

Communication Projects (70+)


LED Projects (70+)
Power Electronics Projects (60+)
RFID Projects (60+)
Home Automation Projects (50+)
Matlab Projects (50+)
EIE Projects (50+)
Wireless Projects (50+)
LabView Projects (45+)
Zigbee Projects (45+)
GSM Projects (40+)
555 Timer Circuits (40+)
Sensor Projects (40+)
ARM Projects (60+)
DTMF Projects (30+)
PIC Projects (30+)
Electrical Mini Projects (25)

GENERAL

Tutorials

Symbols

Courses
Calculator

Contact

PROJECTS

Electrical

Electronics

Embedded
Power

Robotics

ARM

IOT

PROJECTS

Mini projects

Microcontroller

Aurdino

Solar

Free circuits

Home Automation

TUTORIALS

Capcitors

Resitors

Filters

Diodes

Transistors

TUTORIALS

Amplifiers
IO Devices

Thyristors
DC Circuits

Nummber System

FOLLOW US

Facebook

Youtube

Google Plus
Twitter

Copyright 2017 Electronicshub.org

You might also like