Voice-activated light Control using Arduino UNO -Automation project
Voice activated light control system for home automation using Arduino Uno. controls the home appliance using voice commands.
in this project we control the appliances using a voice module integrated with Arduino UNO.
NAME | QUANTITY | PRICE |
---|---|---|
Arduino UNO | 1 | ₹ 200- ₹1000 $2.5 – $ 12 |
voice recognition module | 1 | |
Relay | 1 | |
jumper wires | As Required | |
Breadboard | 1 | |
How it will works
the voice recognition module will capture the voice command from the user. it will process the command and send the signal to the Arduino UNO. The Arduino UNO will process the command and send signal to the relay to control the appliances
implementation
Hardware connection
make the Hardware connection as per the instruction given below,
Voice Module | Arduino UNO |
---|---|
TX | RX |
RX | TX |
GND | GND |
VCC | 5V |
Relay connection
Relay | Arduino UNO |
---|---|
VCC | 5V |
GND | GND |
IN1 | D12 |
Programming Arduino UNO
C++
//ptogrammed by KAVIKUMARAN G
// Visit: Pickupmyskills.com
#include <SoftwareSerial.h>
SoftwareSerial mySerial(0, 1); // RX, TX
const int Relay1 = 12; // Output Relay
void setup() {
pinMode(Relay1, OUTPUT); // Set Relay1 as an output
Serial.begin(9600); // Start Serial for debugging
mySerial.begin(9600); // Start communication with voice module
Serial.println("Voice-Controlled Light System Ready");
}
void loop() {
if (mySerial.available() > 0) {
int command = mySerial.read();
if (command == 1) {
digitalWrite(lightPin, HIGH); // Turn on the light
Serial.println("Light ON");
}
else if (command == 2) { // Assuming "light off" command is mapped to '2'
digitalWrite(lightPin, LOW); // Turn off the light
Serial.println("Light OFF");
}
}
}
- Write the programm for the PRoject . the code is given above.
- connect the Arduino UNO to the conputer
- Select the correct Board and Port
- click the upload button to boot the program into the Arduino UNO
Test the project
- connect the Arduino to the power supply
- Speak “Light ON or Relay ON” to turn ON the Appliances
- Speak “Light OFF or Relay OFF” to turn OFF the Appliances