Bluetooth Home Automation


5,718

35

13

Introduction: Bluetooth Home Automation

Hello guys! Today i'm gonna show you how to control electronic home appliances through your android device. This is nothing but Bluetooth home automation by using relays. Not only can you turn on or off the appliance, but you can also set a timer to switch it off.

In this instructable i'm going to explain each and every step so that everyone including beginners can also feel comfortable.

:)

The past decade has seen significant advancement in the field of consumer electronics.
Various “intelligent” appliances such as cellular phone, air conditioners, home security devices, home theaters, etc., are set to realize the concept of a smart home. where all these appliances can be interconnected and monitored using a single controller. Home automation involves introducing a degree of computerized or automatic control to certain electrical and electronic systems in a building. These include lighting, temperature control, etc.

This instructable demonstrates a simple home automation system which contains a remote mobile host controller(android device) and several client modules (home appliances). The client modules communicate with the host controller through a wireless device such as a Bluetooth enabled mobile phone, in this case, an android based Smart phone.

Step 1: THINGS REQUIRED

1) Arduino uno ( for beginners) or Arduino pro mini 5v ( I used a pro mini to make the project cheaper )

2) Hc-06 Bluetooth module

3) USB to serial converter for arduino pro mini (if you have an old adruino uno you don't need this) I had used my old arduino.

4) Relay module of your choice OR if you want to make them on our own you can ( I recommend buying a module instead of making it because we work with high current of 250V )

5) Bread board(optional)

6) Jumper wires ( male to female & female to female based on your requirement )

7) Printer USB cable to program arduino

8) LED's of any color

9) Arduino IDE installed in your computer

10) Electrical wire , tape ,sockets

11) 5V power supply

13) ANDROID BASED SMART PHONE

Step 2: CODE

download the above code file and open wit arduino ide and upload it

The above code is to control 2 relays only (if u want u can increase them)

Step 3: Connecting Hc 06 Bluetooth Module to Arduino

Setting up the HC-06 is as easy as ABC. All you need to know is the pin configuration. The HC-06 has 6 pins: wakeup, VCC, GND, TXD, RXD and State. Right now I will only deal with 4 pins, which are VCC, GND, TXD and RXD.

Here is how you should connect the Bluetooth module to your Arduino.

HC-06>>>Arduino

VCC>>>>3.3v

GND>>>>GND

TXD>>>>RXD

RXD>>>>TXD

The HC-06 acts as a serial port through which you can send and receive data. So using a serial terminal or a Bluetooth customized application on your computer or phone, you can control and monitor your project. I used Teraterm as the serial terminal. Before, uploading the code to the Arduino, disconnect the HC-06 module, since it shares the tx/rx pins and will interfere with the upload. Connect it back once the code has been uploaded successfully.

Step 4: CONNECTING RELAY

As You can see

the relay module has

VCC=5V

GND

IN1(DIGITAL INPUT 1)

IN2(DIGITAL INPUT 2)

Connect the vcc ti the vcc of arduino and gnd to gnd

CONNECT IN1 TO ARDUINO DIGITAL PIN4

CONNECT IN2 TO ARDUINO DIGITAL PIN5

Step 5: WIRING THE RELAY

BE CARE FULL WE ARE NOW DEALING WITH HIGH CURRENT 230V AC

WIRING THE RELAY IS AS ADDING THE SWITCH TO BULB

AS YOU CAN SEE THE RELAY HAS 3 PORTS

1.NC(NORMALLY CONNECTED)

2.COM(COMMON)

3.NO(NORMALLY CLOSED)

AS SHOWN

DONT TOUCH THE RELAY WHEN THE AC POWER SUPPLY IS SWITCHED ON

Step 6: THE APP

this app works great you you can change the device name and timer setting also

opn the app

connect the bluetooth by pairing it generally the pin is 1234

and connect it

Step 7: Testing

once you are finished connecting all the connections properly you are done

BUT BE CAREFULL

[Play Video]

TESTING AND WORKING VIDEO

Step 8: FABRICATION

i had attached the realys to sockets as shown

.And you are done with this project

Step 9:

for any queries please post a comment

hope you guys like it

THANK YOU :)

Full Spectrum Laser Contest 2016

Participated in the
Full Spectrum Laser Contest 2016

Hack Your Day Contest

Participated in the
Hack Your Day Contest

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    13 Discussions

    0
    er.muhsincp
    er.muhsincp

    Question 1 year ago

    i have 0nly 12v relay. is it possible to use ?

    0
    bipin123
    bipin123

    3 years ago

    Is this code also works on HC-O5 Bluetooth module

    0
    VishalV63
    VishalV63

    3 years ago

    i m not getting ...plz give apk format file

    0
    kehaldoshi
    kehaldoshi

    4 years ago

    Pls tell me how to write code for control more then two relay.

    0
    Niranjan_Niru
    Niranjan_Niru

    Reply 3 years ago

    to control more than two relays you need to change some part of the code

    #define PIN1 4

    #define PIN2 5

    define some more pwm pins

    if(inByte == 'a'){

    digitalWrite(PIN1, HIGH); // switch on relay2

    Serial.print('a'); // send a char

    status_unlock = true;

    sec = 0;

    inByte = 0;

    make changes here in this part

    0
    kehaldoshi
    kehaldoshi

    4 years ago

    How can I contact u if I have some problem ??

    0
    Niranjan_Niru
    Niranjan_Niru

    Reply 3 years ago

    If you have any problem drop me a mail to Vishnubhatlaniranan@gmail.com

    0
    Niranjan_Niru
    Niranjan_Niru

    Reply 4 years ago

    Msg me or comment below

    0
    kehaldoshi
    kehaldoshi

    Reply 4 years ago

    How can I control more then 2 appliance ?

    0
    Niranjan_Niru
    Niranjan_Niru

    Reply 4 years ago

    By changing the number of relays

    0
    nsmdwaqas
    nsmdwaqas

    3 years ago

    Sir Project seems to be much Intresting. Thank you for the References . Could you please Upload the the connection for Relay Because we have already connected our Arduino uno (5V ,GND) to HC-05 Bluetooth Module.So could you please send me the relay connection pics for reference. Eagerly waiting for your response. Thank You.

    0
    kehaldoshi
    kehaldoshi

    4 years ago

    How can I contact u if I have some problem ??

    0
    kehaldoshi
    kehaldoshi

    4 years ago

    Very nice I will try to make it using Arduino uno.