Voice Controlled Home Automation using Arduino and HC-05 Bluetooth Module

Share This

Hello friends! Welcome back to ElectroDuino. This blog is base on Voice Controlled Home Automation using Arduino and HC-05 Bluetooth Module. Here we will discuss Introduction to Voice Controlled Home Automation, Project Concept, Block Diagram, Components Required, Circuit Diagram, Working Principle, and Arduino code.

Introduction

In the previous Home Automation Series, we have learned how to make RF Based, IR Remote Control, Bluetooth Control, and GSM Based home automation systems, where we have controlled home appliances by sending text messages or pressing the button. But, in this project, we will control the AC home appliances by sending Voice Command from our smartphone. We will use a Bluetooth module in our project that helps to connect and communicate with a smartphone wirelessly. Also, we will use a Bluetooth app on our smartphone, which is helping to send our voice Command from our smart phone to the project circuit.

Project Concept

Here we will control four different home appliances by voice Command. The key components of this project are Arduino, Bluetooth module, Relay module, LCD display, a smartphone, and Android App. At first, we need to install the app on our smartphone, which is easily available in the play store. This app receives our Voice command and sends it to the Bluetooth module wirelessly. The Arduino decodes this command from the Bluetooth module. Then Arduino sends a command to the Relays to control the home appliances. These four home appliances are switched on/off by eight different voice commands. The LCD module will display the status of the home appliances on or off.

Block Diagram of Voice Controlled Home Automation

Block Diagram of Voice Controlled Home Automation using Arduino and HC-05 Bluetooth Module
Voice Controlled Home Automation Block Diagram

Components Required

Components NameQuantity
Arduino  ( you can use Arduino  nano or other types of Arduino board)1
HC-05 Bluetooth Module ( you can use the HC-06 Bluetooth Module circuit diagram and the connection is the same)1
4 Channel Relay Module1
LCD display module
1
AC Bulb with Holder and Wire4
PCB Prototyping board1
12V DC Power supply1
220V AC Power supply1
Connecting wiresAs required in the circuit diagram
Android Phone1
“Bluetooth voice control for Arduino” AppAvailable in the play store

Circuit Diagram of Voice Control Home Automation using Arduino and Bluetooth Module HC-05

Voice Control Home Automation using Arduino and Bluetooth Module HC-05 Circuit Diagram
Voice Control Home Automation using Arduino and Bluetooth Module HC-05 Circuit Diagram

App Configure

First of all, open the Play Store of your phone and search for “BT Voice Control for Arduino”. Then you will get this app. Now install this app.

Bluetooth Voice Controlled Home Automation App configuration / Setup 1

After completing the installation process, open the app and make sure the circuit is connected to the power supply and the Bluetooth module is on. Now click on the mic button to come on the app dashboard.

Bluetooth Voice Controlled Home Automation App configuration / Setup 2

Now you can see the 3 dots on the top right corner of the app dashboard. Then click on it and select the Connect Robot option. Before doing this make sure, your smartphone has Paired with Bluetooth Module. If it not paired then find the HC-05 Bluetooth module in your phone Bluetooth settings and pair your phone with it. In this case, the HC-05 Bluetooth module asks for a pin code for pairing, usually, the pin code is 1234 or 0000.

Bluetooth Voice Controlled Home Automation App configuration / Setup 3

After click on the Connect Robot option. Then select the HC-05 for connecting the Bluetooth module with your phone. When this process is successfully completed, then you get the “Connected to HC-05” message on the app dashboard.

Bluetooth Voice Controlled Home Automation App configuration / Setup 4

 

Bluetooth Voice Controlled Home Automation App configuration / Setup 5

Now click on the mic button on the dashboard, then you can send a voice command through the App.

Bluetooth Voice Controlled Home Automation App configuration / Setup 6

Working Principle of Voice Control Home Automation using Arduino and Bluetooth Module HC-05

At first, we need to choose 8 different types of Voice Commands to control 4 devices. Particular two voice commands are used to control a device. For example, the “turn on light ” command is used to Turn ON the Light, and the “turn off light ” command is used to Turn OFF the Light. These Voice commands are used in Arduino code.  The list of voice commands is below, which is used in Arduino code:

Voice commandsDevice statusControl Relay (Relay Pin)
turn on lightLight OnRelay-1 (IN1)
turn off lightLight Off
turn on fanFan OnRelay-2 (IN2)
turn off fan Fan Off
turn on TVTV OnRelay-3 (IN3)
turn off TVTV Off
turn on pumpPump OnRelay-4 (IN4)
turn off pumpPump Off
turn on allAll Device OnRelay-1, Relay-2 Relay-3, Relay-4 (IN1, IN2, IN3, IN4)
turn off all All Device Off

When we send a voice command through the App, then the Bluetooth module receives that command and passes it to the Arduino. Now Arduino compares this command with the predefine Commands (which are defined in Arduino code). If this command matches then Arduino sends a command to operate the relay module. We can see the Device status (on or off) on the 16×2 LCD Display Module.

For example, when we send the “turn on light” voice command through the app. Then the Arduino gets this command through the Bluetooth module. Then the Arduino sends Low (0) input voltage to the Input-1 (IN1) pin of the relay module. Now the relay is in On mode. So the device (light) will also turn on, which is connected to the relay-1 of the relay module. At the same time, the “D1 (Device 1) is ON” status print on the 16×2 LCD Display Module.

When we send the  turn off light” voice command through the app. Again the Arduino gets this command through the Bluetooth module. This time the Arduino sends a High (5v) input voltage to the Input-1(IN1) pin of the relay module. Now the relay is in Off mode. So the device (light) will also turn off, which is connected to the relay-1 of the relay module. At the same time, the “D1 (Device 1) is OFF” status print on the 16×2 LCD Display Module.

In this way, we can control all relays of the 4 channel Relay module through the voice command

Arduino Code for Voice Controlled Home Automation

 

Share This

Leave a Reply

Your email address will not be published.