IoTBoysRajiv SharmaShambhoo kumar
Published

Voice Control Home Automation System Using Arduino and HC-05

We are showing voice control home automation system to control appliances with own voice command an Android app IoTBoys.

IntermediateProtip8 hours42,639
Voice Control Home Automation System Using Arduino and HC-05

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Two AC Bulbs(Red,Yellow)
×1
Relay (generic)
Using 4 Channel Relay
×1

Software apps and online services

Arduino IDE
Arduino IDE
IoTBoys (Android App)

Story

Read more

Schematics

Circuit Design

Circuit Design for all components

Code

Souce Code

C/C++
Source Code
String voice;
int RED = 2;
int YELLOW = 3;
void RedOn(){
digitalWrite (RED, LOW);
}
void RedOff(){
digitalWrite (RED, HIGH);
}
void YellowOn(){
digitalWrite (YELLOW, LOW);
}
void YellowOff(){
digitalWrite (YELLOW, HIGH);
}
void allon() {
digitalWrite (RED, LOW);
digitalWrite (YELLOW, LOW);
}
void alloff() {
digitalWrite (RED, HIGH);
digitalWrite (YELLOW, HIGH);
}
void setup() {
Serial.begin(9600);
pinMode(RED, OUTPUT);
pinMode(YELLOW, OUTPUT);
digitalWrite (RED, HIGH);
digitalWrite (YELLOW, HIGH);
}
void loop() {
while(Serial.available()) {
delay(10);
char c=Serial.read();
if(c=='#')
{
break; 
}
voice += c;
}
if (voice.length() > 0) {
Serial.println(voice);
if (voice == "on" || voice== "all on")
{
allon() ;
}
else if (voice == "off" || voice=="all off")
{
alloff() ;
}
else if(voice =="red" || voice =="red on"){
RedOn();
}
else if(voice =="red off"){
RedOff();
}
else if(voice =="yellow" || voice =="yellow on"){
YellowOn();
}
else if(voice =="yellow off"){
YellowOff();
}
voice="";
}
}

Credits

IoTBoys

IoTBoys

9 projects • 115 followers
Watch, Learn and Built IoT projects | DIY IoT Projects | IoT Projects for College Student.
Rajiv Sharma

Rajiv Sharma

17 projects • 71 followers
Having more than 10 years of experience in IoT and software technology. Founded IoTBoys to share knowledge with IoT enthusiasts.
Shambhoo kumar

Shambhoo kumar

4 projects • 43 followers

Comments