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

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" ...

Register form through OTP Verification using Firebase (Android Studio).

Android is an operating system that was developed by Google which is designed for touchscreen mobile devices such as smartphone and tablets. Description In this project we will build an app using A ndroid Studio. T his app will take your username and phone number.By this phone number you will receive an OTP and after entering OTP you will be able to register your phone number with the Firebase. Android Studio it is a integrated development environment (IDE) for  Android operating system, built on JetBrains' IntelliJ IDEA software and designed specifically for Android development.It is available for download on Windows, macOS and Linux based operating systems. Firebase Firebase Authentication is a service that can authenticate users using only client-side code. It supports social login providers Facebook, GitHub, Twitter and Google as well as other service providers like Google Play Games, Apple, Yahoo, and Microsoft. Additionally, it includes a user manag...