Skip to main content

Voice controlled Bulb by Bluetooth using Relay Module in Adruino.

 


Description

  • In this project we are using Bluetooth, Voice Control App and Relay Module to control the bulb.
  • The App we are using is Aduino Bluetooth Voice Controller to send the commands to the Arduino using Bluetooth.
  • Relay module is a electrically operated switch which requires power supply of 5V to turn ON/OFF.
  • There are terminals mainly--NO(Normally open),NC(Normally closed),COM(Common).
  • NO supply current when relay is activated.
  • NC do not supply current when relay is activated.
  • COM is common between NO and NC and it is a moving part in relay module.

Demo Video



Working

  • Using App we send voice command to ON/OFF the bulb and it is send through bluetooth connection where HC - 05 Bluetooth Module will recieve the command and pass it to the arduino. 
  • And After Receiving the command, current is supplied from arduino to relay module, Inside a relay module the COM part will move due to Induction of electromagnetic field.
  • This will make it work by turning ON/OFF by the given Instruction in the program.

Requirements:-

  1.  Arduino UNO with Cable.
  2.  Bluetooth Module 
  3.  Relay Module.
  4.  Bulb with Holder.
  5.  Jumper wires and Wires with plug.
  6.  9V Battery( MIN of 5V ).
  7. Arduino IDE.

Lets get Started...

Step 1 
Open the Arduino IDE and Select the board as Arduino UNO and also the port.



Step 2
Connect Relay Module and Bluetooth Module to the Arduino as Shown in Fig.,Also connect the Bulb to the Holder and Plug it to the AC Source.


Step 3
Copy this code and Upload into the Arduino or you can Download the FILE.

Download the source code

String voice;
char character;
void setup() 
{
 Serial.begin(9600);
 pinMode(5,OUTPUT);
}
void off()
{
  digitalWrite(5,LOW);
}
void on()
{
  digitalWrite(5,HIGH);
}
void loop() {
  while(Serial.available())
  {
    delay(15);
    character = Serial.read();
    if(character == '#')
    {
      break;
    }
    voice += character;
  }
  if(voice.length()>0)
  {
    Serial.println(voice);
 
      if(voice.equals("lights off"))
      {
         off();
      }
      else if(voice.equals("lights on"))
      {
         on();
      }
  }
  voice="";
  delay(600);
}


Step 4
Connecting the App to the Bluetooth Module and Sending the Command to Arduino.

Click here to open the App.







Thank You

Comments