0% found this document useful (0 votes)
12 views7 pages

Vc-02 With Arduino

This project outlines a Smart Home Automation system using an Arduino UNO and a VC-02 Offline Voice Recognition Module to control appliances like lights and fans through voice commands. The system operates offline, utilizing HEX codes sent via UART to control relays that manage high-voltage devices safely. It is designed for ease of use, making it ideal for elderly care and hands-free control, while being cost-effective and adaptable for various home applications.

Uploaded by

shreedurga034
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views7 pages

Vc-02 With Arduino

This project outlines a Smart Home Automation system using an Arduino UNO and a VC-02 Offline Voice Recognition Module to control appliances like lights and fans through voice commands. The system operates offline, utilizing HEX codes sent via UART to control relays that manage high-voltage devices safely. It is designed for ease of use, making it ideal for elderly care and hands-free control, while being cost-effective and adaptable for various home applications.

Uploaded by

shreedurga034
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction

In today’s world, automation plays a major role in improving comfort, security, and energy
efficiency in homes. Smart Home Automation systems allow electrical appliances to be
controlled automatically or remotely, without needing manual switches.​
In this project, an Arduino UNO is used along with the VC-02 Offline Voice Recognition
Module to control home appliances such as lights and fans using voice commands. The
VC-02 module converts spoken commands into predefined HEX codes and sends them to the
Arduino through UART (Serial Communication).

The Arduino receives these HEX codes and controls relays connected to the home appliances.
The relay operates as an electrically controlled switch, allowing low-voltage control of
high-voltage devices such as lights and fans. Since the relays in the project are active-low, the
output pins must be set LOW to turn the appliance ON and HIGH to turn the appliance OFF.

This system eliminates the need for internet or mobile apps, because the VC-02 works offline,
making it reliable even without Wi-Fi. The project is ideal for smart home setups, elderly care,
physically disabled users, and hands-free appliance control.

Overall, this project demonstrates a practical and user-friendly home automation solution using
voice commands, serial communication, and relay control.

Components Used

1.​ Arduino UNO​

○​ Acts as the main controller of the system.​

○​ Receives HEX commands from the VC-02 voice module and controls the relay
outputs.​

2.​ VC-02 Offline Voice Recognition Module​

○​ Recognizes voice commands without needing the internet.​

○​ Sends corresponding HEX codes to the Arduino through UART communication.​

3.​ Relay Module (4-Channel, Active-Low)​

○​ Used to control AC appliances like lights and fans.​

○​ Operates as an electronic switch controlled by Arduino digital pins.​


4.​ Light Bulbs / LED Lamp​

○​ Represents Indoor Light 1 and Outdoor Light loads.​

5.​ Electric Fan​

○​ Represents Fan control load.​

6.​ Power Supply (5V DC)​

○​ Used to power the Arduino and relay module.​

○​ Must be able to supply enough current to drive relays.​

7.​ Jumper Wires (Male-Male / Male-Female)​

○​ Used to make circuit connections between modules.​

8.​ Breadboard / PCB Board​

○​ Used for mounting and connecting components.​

9.​ AC Mains Power Cable​

○​ Used to power the fan and lights through the relay.​

○​ Must be handled carefully for safety.

Block Diagram
Circuit Description
The circuit consists of an Arduino UNO, a VC-02 offline voice recognition module, and a
3-channel relay module used to control home appliances.​
The VC-02 module is powered using +5V and GND and communicates with the Arduino
through UART serial communication, where the TX pin of VC-02 is connected to RX (Pin 0) of
Arduino. When a voice command is detected, the VC-02 sends a 2-byte HEX code to the
Arduino.
The Arduino reads the HEX code and matches it with predefined commands. Based on the
received command, Arduino sends digital output signals to the relay module pins (D2, D3, and
D4). The relay module is active-low, meaning the relay is turned ON when the Arduino pin
outputs LOW, and turned OFF when the pin outputs HIGH.

The relay module is connected to 230V AC appliances such as Light 1, Fan 1, and Outdoor
Light. One wire of each appliance passes through the relay’s NO (Normally Open) terminal,
while the other wire is connected directly to the neutral line. When the relay turns ON, the NO
terminal closes and completes the circuit, powering the appliance.

This setup allows safe, efficient, and hands-free control of electrical appliances through voice
commands without requiring internet or Bluetooth connectivity.

Arduino Code (Active-Low Relay Control using HEX Commands)

unsigned int receivedValue = 0;

// Relay Pin Assignments (Active-Low Relays)


#define LIGHT1_PIN 2 // Light 1 Relay
#define FAN1_PIN 3 // Fan 1 Relay
#define OUT_PIN 4 // Outdoor Light Relay

void setup() {
[Link](9600);

pinMode(LIGHT1_PIN, OUTPUT);
pinMode(FAN1_PIN, OUTPUT);
pinMode(OUT_PIN, OUTPUT);

// All Relays OFF initially (active low, so HIGH = OFF)


digitalWrite(LIGHT1_PIN, HIGH);
digitalWrite(FAN1_PIN, HIGH);
digitalWrite(OUT_PIN, HIGH);

[Link]("System Ready - Waiting for VC-02 Commands");


}

void loop() {

if ([Link]() >= 2) { // Wait for two bytes


byte highByte = [Link]();
byte lowByte = [Link]();
receivedValue = (highByte << 8) | lowByte;

[Link]("Received HEX: 0x");


[Link](receivedValue, HEX);

// ---- Light 1 Commands (AA11 = ON, AA00 = OFF) ----


if (receivedValue == 0xAA11) {
digitalWrite(LIGHT1_PIN, LOW); // ON
[Link]("LIGHT 1 ON");
}
else if (receivedValue == 0xAA00) {
digitalWrite(LIGHT1_PIN, HIGH); // OFF
[Link]("LIGHT 1 OFF");
}

// ---- Fan 1 Commands (BB11 = ON, BB00 = OFF) ----


else if (receivedValue == 0xBB11) {
digitalWrite(FAN1_PIN, LOW); // ON
[Link]("FAN 1 ON");
}
else if (receivedValue == 0xBB00) {
digitalWrite(FAN1_PIN, HIGH); // OFF
[Link]("FAN 1 OFF");
}

// ---- Outdoor Light Commands (CC11 = ON, CC00 = OFF) ----


else if (receivedValue == 0xCC11) {
digitalWrite(OUT_PIN, LOW); // ON
[Link]("OUTDOOR LIGHT ON");
}
else if (receivedValue == 0xCC00) {
digitalWrite(OUT_PIN, HIGH); // OFF
[Link]("OUTDOOR LIGHT OFF");
}

receivedValue = 0; // Reset after processing


}
}

Explanation of the Code

Part Meaning
[Link](9600); Arduino listens for data from VC-02 voice module.

if ([Link]() VC-02 sends every command as 2 bytes, so we wait for


>= 2) both.

`(highByte << 8) lowByte`

digitalWrite(pin, LOW); Relay turns ON because relay is active-low.

digitalWrite(pin, HIGH); Relay turns OFF.

The IF conditions Match the command code to the correct appliance


action.

Command → Action Table


Spoken Command (VC-02 Trained) HEX Sent Appliance Action Output Signal

Light 1 ON AA11 Light 1 Turns ON Pin 2 = LOW

Light 1 OFF AA00 Light 1 Turns OFF Pin 2 = HIGH

Fan 1 ON BB11 Fan Turns ON Pin 3 = LOW

Fan 1 OFF BB00 Fan Turns OFF Pin 3 = HIGH

Outdoor Light ON CC11 Outdoor Light ON Pin 4 = LOW

Outdoor Light OFF CC00 Outdoor Light OFF Pin 4 = HIGH

Output

After uploading the Arduino code and completing the wiring, the system was powered on and
the VC-02 voice recognition module successfully detected voice commands. When a voice
command was spoken, the VC-02 module processed the speech and sent the corresponding
HEX code to the Arduino through UART communication. The Arduino compared this received
code with the predefined values and activated the correct relay.

Spoken Command HEX Code Relay Action Appliance Output


Received

"Light One ON" AA11 Relay Channel 1 → ON Light 1 Glows


"Light One OFF" AA00 Relay Channel 1 → Light 1 Turns OFF
OFF

"Fan One ON" BB11 Relay Channel 2 → ON Fan Starts Running

"Fan One OFF" BB00 Relay Channel 2 → Fan Stops


OFF

"Outdoor Light ON" CC11 Relay Channel 3 → ON Outdoor Light Glows

"Outdoor Light OFF" CC00 Relay Channel 3 → Outdoor Light Turns


OFF OFF
The system responded instantly to voice commands with no delay because the VC-02 module
works offline without needing Wi-Fi, Bluetooth, or an internet connection.
The relays operated correctly in active-low mode, meaning the appliances turned ON when
Arduino output was LOW and turned OFF when the output was HIGH.

Conclusion

This project successfully demonstrates a practical and efficient Smart Home Voice Control
System using the Arduino UNO and the VC-02 Offline Voice Recognition Module. By converting
spoken commands into predefined HEX codes and sending them to the Arduino through UART
communication, home appliances such as lights and fans can be controlled without the need for
physical switches. The use of a relay module allows safe control of AC electrical loads, while the
active-low logic ensures reliable switching performance.

The system works completely offline, making it more secure, faster, and independent of internet
connectivity. This makes it suitable for rural areas, elderly users, physically challenged
individuals, and home automation enthusiasts. The project is cost-effective, easy to expand, and
adaptable to many home applications.

Overall, this project provides a smart, user-friendly, and hands-free solution for home
automation and demonstrates the real-world application of embedded systems, voice
recognition, and relay control technology.

You might also like