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

Popular posts from this blog

Auto-Image Slider using Javascript

  Introduction Image Slider is a way of displaying multiple images, videos or graphics which is created using javascript. Preview HTML Code <!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title > Auto-Image Slider </ title > < link rel = "stylesheet" href = "https://use.fontawesome.com/releases/v5.15.1/css/all.css" > < link rel = "stylesheet" href = "ImageSlider.css" > < script src = "ImageSlider.js" > </ script > </ head > < body > < div class = "container" > < div class = "slides" > < div class = "slide" > < img src = "https://cdn.pixabay.com/photo/2020/11/20/01/10/glacier-5760277_960_72...

Instagram Post Downloader using JQuery and Ajax

  Introduction In this project, we will learn to get the data from Instagram using the link given by the user. First the given link is modified and passed to the instance of XMLHttpRequest. Using instance of XMLHttpRequest, we will get JSON data and Access the required data such as image url, video url and create image and video tag respectively. Now you can download image as well as video as shown in the preview video. Pre-Requisite you should know to use JSON data, to access the required data ( object, arrays, string etc ). you should know to use XMLHttpRequest, to send the request, to get the data from the response. basic of JQuery is enough. Preview HTML Code <!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title > Document </ title > < link rel = "stylesheet" ...