DIY Android Home Automation with free Smartphone Application

 

DIY Android Home Automation

DIY SmartHome Application

Ever wanted to make your home automated? Wanted to control the lights, fan and other appliances from your smartphone? Or wanted a tutorial about connected devices and getting started with it? DIY Android Home Automation will show you how to make your home automated using an android smartphone. This requires you to have no experience of android programming at all, as a free application is included for you to develop. Using this android application you will be able to control your lights, air conditioning, door locks ,etc all from your smartphone. This system uses bluetooth to connect with your device and control the various appliances in your home. Have fun with this DIY hacking tutorial!

What are the stuff required to do this project?

Hardware :

  1. Arduino / Arduino Clone or make your own custom arduino board with this tutorial.
  2. A 5v TTL -UART bluetooth module like : JY-MCU BT_BOARD (Cheaper) or Bluesmirf Gold/Silver.
  3. Five 5V SPDT relays like : 5V relay.
  4. Prototype board or breadboard.
  5. Connecting wires.

Software :

  1. Arduino IDE : Arduino .
  2. Eclipse for android programming (optional, not required). For instructions on installing and setting up the environment : How to install android and eclipse. And tutorials to begin learning android programming even though you don’t require it for this project : Tutorial .

So how does it work?

The DIY Android Home Automation project comes with a free application called “DIY SmartHome” . This application controls the various appliances connected to your arduino and relays. When the toggle buttons on the application are pressed, corresponding bluetooth signals are sent from your android phone to the bluetooth module you have hooked up to your arduino. The arduino finds out which signal was sent and compares it to the predefined signals assigned for each appliance. When it identifies that signal, then the arduino activates the relay hooked up to its digital pin by passing 5V through it. Thus the relay is switched ON and the corresponding appliance connected to the relay is turned ON as well. To switch it OFF , arduino passes a 0V or logic low to its digital pin.

DIY Android Home Automation

DIY Android Home Automation

 

Step 1 : Setting up the connections for the DIY Android Home Automation project

DIY Android Home Automation

DIY Android Home Automation

The connection diagram for arduino is as shown. For setting up this system , wiring connections have to be made between the arduino and bluetooth module and also with the relays. Here, the bluetooth module’s Tx is connected to arduino Rx (digital pin 0) and the module’s Rx to arduino Tx (digital pin 1). 5V and GND of the module is connected to the arduino’s 5V and GND.

DIY Home Automation

Relay pin out

The relay your using is SPDT, it has 5 pins on the under side. As shown above , here pins 1 and 3are the coil pins. 1 is connected to the arduino digital pin and 3 is connected to arduino GND. 2 is the common contact in the relay to which you have to connect the power for your appliance (AC 230V), and 4 is the pin to which you have to connect your appliance wire.

Step 2 : Connecting your appliance to the relay

DIY Android Home Automation

5V SPDT Relays

In a normal SPDT relay, whose pin out is shown in the above step, pins 2 and 4 act identical to the two terminals of a switch. When digital HIGH voltage is applied from the arduino to the relay, switch turns ON, when the voltage is withdrawn it turns OFF. You can attach this system you made to a normal switchboard by extending the wires from behind the switches in the board to your relay. As seen in the connection diagram in the above step, you have to connect a power AC line to the common terminal of all the relays. Then, you have to extend the wires from behind the switchboard of the corresponding lights/lamps you wish to control. Each of these wires are connected to the “NO”(Normally Open) terminal of the relays (pin no 4 in step no 1’s relay pin out diagram). NOTE : If you wish to control door locks, you may use door lock solenoids , which can be purchased and connected to your system and turned ON/OFF using the same way. The picture below shows how you can attach the system to your switchboard (keep in mind, this is just to show you the arrangement, it is not the original system being described here):

DIY Android Home Automation

 Step 3 : (Optional) Creating your custom PCB for the DIY Android Home Automation project

DIY Android Home Automation Schematic

DIY Android Home Automation Schematic

If you wish to create your own custom PCB, please use the above schematic. Here, you just have to insert an arduino bootloaded ATmega 168/328 chip in the socket to get it working. All the supporting circuitry for arduino is included.

Step 4 : Loading the arduino software

DIY Android Home Automation

Arduino DIY Android Home Automation Code

 If you are new to arduino, download the arduino IDE (Integrated Development Environment) from Arduino . The tutorials for beginners can be seen here :  Arduino tutorial . The arduino code for the following project is here : DIY_SmartHome . The code is really simple, here it checks the incoming bluetooth signal via the bluetooth module and then compares (ASCII values) using an “if” statement with previously defined values. If it matches the value, relay is activated using “digitalWrite(pin,HIGH)” command , which passes 5V to the arduino digital pin.PLEASE NOTE : SINCE THE BLUETOOTH MODULE IS CONNECTED TO THE RX AND TX PINS OF THE ARDUINO, THE MODULE SHOULD BE REMOVED WHILE UPLOADING THE CODE FROM PC TO THE ARDUINO. THE MODULE SHOULD BE CONNECTED ONCE THE UPLOAD IS COMPLETE. Upload the code to your arduino board , then follow step 5.

Step 5 : Downloading the android application and setting up bluetooth

DIY Android Home Automation

Discovering new bluetooth devices

To download the android application to your phone, copy this .apk file to your phone from the PC and then click on it from the phone to install it : DIY SmartHome. For those who wish to modify the application, I am attaching the project file here : DIY SmartHome project . Be sure to check  “Allow installation of non-Market apps” in the Security tab under settings. Once you have installed the application, before opening it you need to pair and connect with your bluetooth module. For this, you need to power the arduino and bluetooth module and then turn ON the bluetooth of your phone and make it visible to other devices. After that, search for new devices in bluetooth, select your bluetooth module from the list, enter the pairing code when prompted , it is usually ’1234′  or ’0000′ .

Note the name of your device , in this case it is “HC-06″. After pairing with the system, go to the “DIY SmartHome” application and enter the name of your bluetooth module you noted earlier (case-sensitive) and click “OK”. After that the phone will get connected to your system , and on clicking the respective buttons, the appliances turn ON/OFF. Have fun with your new DIY Android Home Automation system!

DIY SmartHome Application

DIY SmartHome Application


DIY Android Home Automation

DIY Smart Home Application

 

 

 

 

 

 

 

 

 

 

Recommended Posts
Showing 195 comments
  • debei
    Reply

    awesome project sir,can you or anyone please sent me the programming code, setup code and main code to debeitaau88@gmail.com tq

  • Sharath Cherian Thomas
    Reply

    Not working on my marshmallow.
    Bluetooth pairing successful but after typing the name in the app and selecting Ok nothing happens. When i try turning on it shows connection failed.

  • Charfeddine
    Reply

    Nice project sir. Plz can you mail me source code?
    thank you!

    charfeddinefouad@gmail.com

  • ALEX
    Reply

    Please also send me your project

  • Shubham
    Reply

    Nice project sir. Plz can you mail me source code?
    thank you!
    checkitoutshubham@gmail.com

  • Rohit
    Reply

    can anyone send me the code of this project.
    Email:- rohitborse82@gmail.com

  • Syed Badar
    Reply

    can anyone send me the code of this project.
    Email: p126312@nu.edu.pk
    Thanks

  • Lance
    Reply

    Can I use MIT app Inventor for this?

  • Eugene Ramnarayan
    Reply

    Hi. Thanks for this project. Worked first time for me.
    To make changes to the android app, what software did you use? Eclipse, Studio or something else? I want to add 2 more outputs to the app please and rename all of them.

  • ashok
    Reply

    Sir i want to change app componentso to i do

  • ashok
    Reply

    Sir i want to change the app so what to i do

  • ASIF
    Reply

    Worked for meeee……Thanksssss
    1)uploaded code in arduino
    2)used HC-05 Bluetooth module
    3)Installed App
    4)Turned on Bluetooth module
    5)paired app with my mobile
    6)Turned on App and wrote the name HC-05
    7)Hurrahhhhhh !!! devices are being controlled
    if anyone is facing any problem contact me on my fb account asif5955iqbal@yahoo.com

  • Asad Rahim Khan
    Reply

    one more thing is that when switch should on or off manually what should be happen in app, i means that if i want to start any activity on switch on light and ends activity when switch offed ..

    please rep me as soon as possible because i am very excited ….

  • Asad Rahim Khan
    Reply

    can you help me to connect this with my own develop mobile application, i want to use this smart technique with my own develop mobile application with some other things like start time and end time total duration and cost etc …

  • Lokesh Kumar
    Reply

    i am using iphone,so please help me to make this type of home automation system with iphone.

  • ri
    Reply

    whate is the name of the app?

  • Raj pradhan
    Reply

    sir i have WIBT40D CAI I USE THIS MODEL

  • wahidullah rahimi
    Reply

    it really amazing and useful.sir, I have some question 1- first how can we secure Bluetooth module from another user? what is the software security for this project i mean how can we secure our app and software? thnk u sir

  • ganesh joshi
    Reply

    Hello sir, Its really very nice project and i have design same module through your help.Thank you very much! Right now I want to add light sensor and temp sensor in module which sends data to android app and then android app do ON/OFF light and fan automatically based on data.So please guide me for this points. Thanks in advance..!!

  • Stan
    Reply

    Hi

    Hope to find you well.

    I am requesting for the code of this project which may help me to learn understand and an example. my email address is stanjiri@yahoo.com thank you

  • Roby A.
    Reply

    can i get the codes please ? :)
    roby.ardi17@gmail.com

  • Aviral
    Reply

    Sir, the app doesn’t seem to connect with the bluetooth module HC-05, on entering the bluetooth name it says “connection not established with your home”. Can you please help me out.
    thanks!!

  • pushpendra kewat
    Reply

    Dear sir
    can i connect “4Pin Bluetooth RF Wireless Serial Transceiver Module HC-06 RS232 With backplane” blutooth module against JY-MCU BT_BOARD (Cheaper).

    reply me ASAP

  • Jenil
    Reply

    I am getting response as “CONNECTION NOT ESTABLISHED WITH YOUR HOME”. Please help me.

  • saurabh
    Reply

    Hello,

    I run a software development company, i can handle the android development side but i need someone experience to help me with the other stuff [hardware part]. I am from INDIA [North] , i would like to have a paid guidance in properly implementing this. My contact number is 9216142737 and my email is – ersaurabh101@gmail.com, please contact me, what i will be needing from you is- Hardware procurement guidance, i will hire the electrician to join it to my switch board and i will need your help/guidance till i control the 1st light from my device.

    Thank you

  • adisa shukurat temitope
    Reply

    LEAVE YOUR COMMENT
    l need the literature review of this project work

  • DIMPLE
    Reply

    I am getting response as “CONNECTION NOT ESTABLISHED WITH YOUR HOME”. Please help me.

  • ishaan
    Reply

    Sir, I want to ask can we use 8 Channel Relay Board instead of a single relay?

  • Ashutosh
    Reply

    You can try making one of your own project just follow the link http://arm-tutorials.com/2016/01/03/controlling-home-appliances-with-smartphone/

  • Marjorie Cabo
    Reply

    Hello. been meaning to make this kind of project and i wish to modify the app.i have already install the android studio and the eclipse. what to do next? thanks

  • muhib
    Reply

    Dear Aravind i getting a “Unfortunatly smarthome has been stopped”when iam clicking on ok button on ur app..i also
    pair my phone with the BT module HC-05..help me plz,

  • Sridhar
    Reply

    Hai,

    Socket not connected, isSecurityAllowedPolicy device null, and write function have exception….

    socket.connect() – raised exception……Do i need change UUID? or anything?

    Plz help me

  • vjking
    Reply

    Can you use raspberry pie board for this instead of arduino uno ?

  • Guru
    Reply

    the apps is not reaponding

  • Guru
    Reply

    Hi sanjeev
    I have hc-05 module with same baud rate but the is not responding

  • Guru
    Reply

    sir I have
    HC-06
    HC-07
    HC-05
    TRANSCEIVER
    MODULE
    BASE
    I can be suitable for this

  • salman faris
    Reply

    if any problem for using 12v relay

  • salman faris
    Reply

    how to programe the atmega ic
    is it combelsory to make an pcb board

    • kaleem
      Reply

      is there any problem to use 12v relay

  • Dharm
    Reply

    Dear Sir,

    Thank you very much for such a nice circuit and understanding new technologies.

    I prepare circuit as above but bluetooth module is HC-05, Baud rate 9600 is set in Arduino code. Then i paired with my android mobile then go to application and write HC-05 then press the button but the message appear as ” Connection is not established…”. Further the Blue tooth module is (2.1 version). I request u to give me your mobile no for discussion on this circuit.

    Regards,

    Dharm Kalsaria

  • srfraz
    Reply

    What’s it’s range

  • iralimin nordin
    Reply

    sir,….how to find adapter 220v ac…???

    • Arvind Sanjeev
      Reply

      I couldn’t understand your question. Do you mean ac-dc adapter? You can buy it online or from local electronics stores.

  • iralimin nordin
    Reply

    hello sir i want to ask about door lock…how to connect with door lock..??any connection part.?and also i want to change air cond with mini toy fan…problem is i don’t how to connect it…

    • Arvind Sanjeev
      Reply

      Hi, you can use solenoid door locks which can be controlled using an arduino: http://www.adafruit.com/products/1512

      • iralimin nordin
        Reply

        how about connection solenoid door lock it…??their wire must connection with what.?positve to relay.negative to voltage source?

  • Vedang
    Reply

    ‘Connection not established with your home’ is the error i am getting on my mobile phone. where possibly am i wrong? please help arvind

  • caesar
    Reply

    hey arvind, thank you for your tutorial here.. it is inspiring me for my last assignment project.. but I’ve been wondering, can I modify the android application into auto-connect to the already paired device ? (without having to insert the bluetooth name) if you do know how to, and if not too much for asking, can you tell me which part of your coding I need to change ?
    thanks before

  • jickson ferry
    Reply

    Hi.. I couldn’t find that bt module… is there any anternative for bt module other than the two mentioned above? Pls help

  • Shollix
    Reply

    Hello i tried to edit the mobile app with eclipse but i couldnt get it. Please lead me through on how i can open it with eclipse. You know its a zip file, so how will i open it with the eclipse. Please help me.

    • caesar
      Reply

      unzip it all, then import > existing android code into workspace, then choose the folder where you unzipped all of the file

    • Arvind Sanjeev
      Reply

      Hi, please extract the zip file and try.

  • Sandeep chauhan
    Reply

    i did baud rate 9600 but not working

  • Sandeep chauhan
    Reply

    hii Arvind i have HC-05 and 6v relay while arduino uno output dc voltage is 5v.
    it is not working i wanna only 2 output (light and 5v dc fan ) how i edit soft and apps . when i connected apps with arduino their is no data transfer (rx light dost not works any how) one message shows connection is not establish with home like this so what i will do i m getting tired so plzzzzzzzz help me .
    one more ques output of arduino(2,3,4,…) connected with input of relay or vcc .

    • Arvind Sanjeev
      Reply

      Hi Sandeep,
      Did you try pairing the module with your phone? Also, check the serial monitor if there is any incoming data.

  • Harish
    Reply

    Is it so necessary to connect two continuously rotating servos to pin 9 and 10 ?

  • nil
    Reply

    to make seprate board which ic should i use
    atmega328 or atmega 328p
    i all ready have uno board to burn program in it.

  • nil
    Reply

    how can do this with simple 5v relay or switch simple led diode instead of ac applinces
    is it possible

  • John
    Reply

    very helpful tutorial. please i need your help further on how to turn on /off home appliances over the internet (anywhere) instead of using Bluetooth. thanks you.

  • bella
    Reply

    Hi, thank you for the tutorial. I want to ask about the bluetooth connection. When we pressed the button, how did bluetooth reads the value ? How did bluetooth know that we are pressing light 1 button or other button ? I don’t really understand the concept here.

    • Arvind Sanjeev
      Reply

      Pressing each button sends a character to arduino from the phone. Eg: Pressing button one, sends “1” to arduino, arduino then uses simple “if-else” conditions to check which button is pressed.

  • ravinder
    Reply

    hi Arvind ,
    good project. can you please Mail me How to on two Devices at Same time .
    please mail me at rvndr93@gmail.com

    • Arvind Sanjeev
      Reply

      Bluetooth allows connection with only one device at a time, you can disconnect and connect to another. Refer to the tutorial :)

      • ravinder
        Reply

        Sir ,
        i have Done it .
        And Was Trying to control two or More Devices at same time As we can do with multichanel RF ,and DTMF Modules.
        so I was Asking to Do this With Bluetooth By Using Shift Register or other Device?

  • nilesh
    Reply

    arvind, will you plz send mi the complete circuit diagram with component spesificaton and pcb design and all hardware required for project..
    plz send mi all component list with speciation and circuit diagram. :) :)

  • sathish
    Reply

    Day home automation app is it working arduino uno Bord or not pls replay me

  • Dane
    Reply

    I’m using BLUNO Mega 2560. I cannot pair my device to the module (BlunoMegaV1.9) . I’m trying to pair using “0000” or “1234” . And when I open your application, type my Device name, and click “OK” , the app force closes.

    • Arvind Sanjeev
      Reply

      Can you try running the app on another android device, and make sure you have paired the bluetooth device before opening the application.

      • Dane
        Reply

        I can only use my Samsung Galaxy S4 because it supports Bluetooth version 4.0 . My other device only supports lower version of Bluetooth which my Module isn’t compatible.

  • satya
    Reply

    hi Arvind,
    is it possble to work this project by specific voice recognition for security reason…? if yes..how…?

  • nilesh
    Reply

    hey friend..
    i downloaded both .apk and .rar files that you give above but i want to know how to edit those file in android studio software .

    plz. help me :) :)

    • Arvind Sanjeev
      Reply

      Check out android development beginner tutorials on youtube, that will help you get started :)

  • Abhishek
    Reply

    I have a 4 channel rf relay module which I control with a rf remote, now my question is can I use arduino as tx remote & at the same time I want to control relay using bluetooth via Android app

    • Arvind Sanjeev
      Reply

      Hey, if you want to use bluetooth, then you would have to replace the RF module with the bluetooth module.

  • shollixs
    Reply

    Also bro
    what is the difference between an arduino board and a raspberry pi? do they perform the same function?

  • shollixs
    Reply

    hello bro,
    can i use a wifi-shield instead of a bluetooth module? if yes can u send me d code for d arduino loading that will make it communicate with the wifi-shield and also the code for the android app so to communicate with the wifi shield. thanks and God bless.

    • Arvind Sanjeev
      Reply

      Hey, I haven’t tried it with the wifi shield. You can search online for interfacing arduino with the wifi shield and edit the code accordingly :)

  • say liang
    Reply

    hi, how to open your file project?

    • Arvind Sanjeev
      Reply

      You would need to setup the eclipse IDE and then open it using it.

  • say liang
    Reply

    hi sir..i want to ask u about how the relay work….it is will automatically connect to the light, tv, and fan..???

  • jaydeep bagthariya
    Reply

    i want to know when light 1 on button is clicked what type of data is send from android application?????

    • Arvind Sanjeev
      Reply

      Serial ascii data, open the arduino serial monitor and find out.

  • sam
    Reply

    one more thing : the serial monitor tool on Arduino IDE shows 0(zero) value. i m using bc417 (HC-06) blue tooth kit and baud rate is 115200 as well.

    • Arvind Sanjeev
      Reply

      For each button press on the smartphone, the value is 0? Is that what you meant?

      • sam
        Reply

        “mukesh says:
        November 28, 2014 at 10:00 am ”
        please read this early posted conversation.i and Mukesh are committed same problem.he has used 12v. relay but i used 5v.

        more clearly: when i m pressing a button on smart phone the ‘Tx ‘ led blinks on Arduino board but no voltage is growing up(on the pin no. 3 / 4 / 5 etc. for Smart Home Auto.) like the Blink prog.(as you recommend.) .today i am going to try it at my office.i think there are some problem of my home electric-wiring system.because, I’ve already tried a dedicated power adapter of 5v-1amp.then i found the on-board 5v. pin on arduino shows 3.80 v but ,at the USB connection same pin shows 4.60 v .please do something…….

        i have also tried on a Arduino Mega board. the issues is same as upper lines…

        thanks..

        • Arvind Sanjeev
          Reply

          Please check the pins (3,4,5) using multimeter to see the voltage levels. If it is not supplying ~5V then use a transistor to power the relay.

  • sam
    Reply

    sir ji thank u for reply,
    i ‘ve sorted out the previously mentioned problem.the new one problem is , my Arduino’s ‘Tx’ led is replying if the button pressing and release on android but the digital voltage is not going high at any pin.is my arduino DEAD?

    • Arvind Sanjeev
      Reply

      Did you check it using a multimeter? Load the blink program from the example codes and manually check the pins using a multimeter.

      • sam
        Reply

        the Blink program is doing well.and multimeter is showing the ‘high’ voltage(4.5v) on the pin no.13 using the on ground.
        thanks

  • satyajit B kulkarni
    Reply

    Is it possible to add voice recognition extension to the app

  • sam
    Reply

    hello mr. AJ sir,

    how to solve ‘unfortunately ,DIY smarthome has stopped’ message?
    thanks..

    • Arvind Sanjeev
      Reply

      Try turning ON and pairing the bluetooth first and then running the application. Also try installing on other android phones.

  • Hans
    Reply

    Arvind,
    I’m looking for a solution where I will have up to 6 different Bluetooth JY MCU / relays to switch different lights on and off controlled from my Android device. The Bluetooth/relays are in different locations through out my house. If i enter a room, the Phone connects automatically to the according Bluetooth/relay maybe 2 or 3 at a time and i can switch the lights from the android device. I also will have a manual “override” on the relay where i have to walk to the relay and push a button.
    can I have multiple Bluetooth devices connected to the Android and control them simultaneously?

    • Arvind Sanjeev
      Reply

      Hi Hans,
      In phones, you can only connect to one bluetooth device at a time. I advice you setup a central hub using Raspi/Arduino which has bluetooth/wifi and then which connects to other arduinos/raspi in the rooms via RF.

  • Gadgetsfort
    Reply

    I have found an IC other than microcontroller in your PCB. which is that??

  • Mukesh kumar Mannu
    Reply

    hiiii, i have tried my best but didn’t success, each and every connection is correct, when i press the button on the android app, the rx light blinks, also i can see data in the serial monitor of the arduino when i press the buttons in the android app. Yet the arduino is not switching the relay, i have tried my best, the relay when i checked has no fault, as when i apply power supply to its coil ports directly i can hear the clicking sound and also the load gets turned on, now please help me what will be the main problem behind this, how can i correct this, i need this project, so please help me.

    • Arvind Sanjeev
      Reply

      Hi Mukesh, I think the arduino is not able to power the relay with just the 5V. What is the voltage rating of the relay coil? Also try checking the arduino pin using a multimeter, to see if it is indeed supplying the 5v.

  • carlos
    Reply

    Good day Arvind Sanjeev can you please help with my problem making this project i can control using serial monitor but in android phone connection not established with your home plz

    • Arvind Sanjeev
      Reply

      Which bluetooth module are you using Carlos?

      • carlos
        Reply

        im using HC-05 sir,,,,but ive already figure out sir just the code,,,thanks,,,nice project

        • Arvind Sanjeev
          Reply

          You can call me Arvind :) Good luck with the project (y)

  • Sachin Jaiswal
    Reply

    when i want to connect my android phone BT with my PC its give a message “connection is not established with your home” plz help me

    • Arvind Sanjeev
      Reply

      Did you try pairing the device like in the tutorial? Was it a success?

      • Dharmesh Kalsaria
        Reply

        Dear Sir,
        I have HC-05, I did all the above steps but It do not operate through android mobile. Intially pair the device but then go to application, write name HC-05 but then it not work.

        I try baud rate 9600 also. The arduino Uno circuit is checked with relay but it is problem in communication. Kindly it is requested to solve the same due to submission.

        • Arvind Sanjeev
          Reply

          Is the application crashing? What is the message you receive after entering HC-05 and hitting the button?

  • Bilal
    Reply

    arvind anjeev

    i made home automation sytem uing android app through bluetooth
    but know my application i corrupted but i have my device so can u help me for making new application ? plz rply i have to submit my project?

  • Gururaj
    Reply

    Can I get that code..??
    id- gsa943@gmail.com
    I need full details of this project

    • Arvind Sanjeev
      Reply

      All the details including the source code is available here in this page :)

  • shollix
    Reply

    I have checked the how to be a maker, yet am not clear about it? I really want to know how i can connect my phone to the internet to control home appliances/

  • Mukesh kumar Mannu
    Reply

    hiii,
    i was making this project as my final year college project, i have connected everything and all is working, only the relay part i am not getting into it.
    I am using relay board http://www.ebay.in/itm/FOUR-CHANNEL-4-CH-12V-ULN2003-RELAY-BOARD-MODULE-RASPBERRY-PI-ARDUINO-AVR-/281380321593?pt=LH_DefaultDomain_203&hash=item418392f939

    bought from ebay.in…

    it has 2 gnd and 2 v+ ports, i am not able to distinguish how to connect these ports, and how to connect the appliance, as this relay board is of 12 volt relay, so i want to give the external power supply fo 12 volt, plz suggest me where to give this 12 volt i.e in which gnd and v+ ports..

    and also how to connect the appliances,plz, reply i am waiting for your reply..

    thanks…

  • shollix
    Reply

    How will i go about the raspberry pi.?
    I really dont understand it.

  • Shollix
    Reply

    OK…Am here now. But this only talks about arduino, Smarthome app. But i will love to know how to connect those parts with the internet in which i can be able to control the lights from whereever i am through my phone.

  • hadeel safaa
    Reply

    o.k. thanks alot for your response, but i really don’t know what to do with this case.

    • Arvind Sanjeev
      Reply

      Did you try pairing the phone with the module as said on the tutorial? Using the pin: 0000

  • hadeel safaa
    Reply

    yes, it’s became stable with slow blinking

    • Arvind Sanjeev
      Reply

      It will remain lit throughout if its connected with your phone. Slow blinking means your phone is not connected to arduino.

  • hadeel safaa
    Reply

    now i have an empty serial monitor window,even when i switching from the app.
    it’s mean that no signal comming from the BT,isn’t?

    • Arvind Sanjeev
      Reply

      Yes, does the red light on your BT module become stable when your phone gets connected to it?

  • hadeel safaa
    Reply

    my connection of relay is correct i’m sure, but did u think that is the program of arduino have to be change cause i use the bluetooth model HC-05..??? please help me this cct. is part of my master search project

    • Arvind Sanjeev
      Reply

      Did you try checking whether the data from the Smartphone is being transmitted to the arduino? You can simply check the RX led on the arduino (check if it blinks when you press a button on your phone) for this.

      • hadeel safaa
        Reply

        it’s lighting but not blinking when I use the app switching., I have a blink led on the bluetooth. Did you think that is a programming problem?

        • Arvind Sanjeev
          Reply

          Try checking if any data is coming through the bluetooth using the serial monitor.

  • hadeel safaa
    Reply

    the electrical cct. i have connecting it perfectly, and even the application in my mobile is doing well when i connect it with the bluetooth module, but but but i have no signal in the other side of the relay i mean the o/p is not available to me.please help me in your answer.
    thanks alot

  • Sam
    Reply

    Even after pairing the bluetooth module , I’m getting unfortunately DIY smarthome has been stopped. Do you think it’s because your app is not supported for my version of android?Or what else could it be?

    • Arvind Sanjeev
      Reply

      Did you try pairing your bluetooth module to your phone first?

  • suhail
    Reply

    Aravind i getting a “Unfortunatly smarthome has been stopped”when iam clicking on ok button on ur app iam using Sony Xperia m

    • Arvind Sanjeev
      Reply

      Did you pair your phone with the BT module? After pairing and saving it, use the app. And make sure you turn your BT ON.

  • suhail
    Reply

    I have a doubt installing the android programming software
    #)if I want install the android studio and sdk too

    • Arvind Sanjeev
      Reply

      Yes, you need to do that, if you want to make your own android application. Search for installation videos on youtube.

  • suhail
    Reply

    Thank u so much :-D

  • suhail
    Reply

    Can i please change ur disclaimer in your android app and re edit to my profiles pls

    • Arvind Sanjeev
      Reply

      Sure, please download the project file. You can edit it anyway you want to :)

  • akhil
    Reply

    Buddy , am select this as my final yr project , buy arduino and BT module , but a prblm, downloaded android app it can’t communicate the arduino via BT module (HC-05)
    Baud rate of this module i don’t know , am used as 9600
    Bt module pair with android phone and connected ,but no output in the arduino

    • Arvind Sanjeev
      Reply

      Hi Akhil, default baud rate for HC-05 is 9600. Did you change it on the arduino code? And how are you checking the output on arduino? Via serial monitor?

  • Vina
    Reply

    send the Android Code please

    • Arvind Sanjeev
      Reply

      Hello Vina,
      Please check for the links to the code on step no:5.

  • MallikarjunaRao
    Reply

    Excellent project, is it possible on arm 7 processor , plz send code

    • Arvind Sanjeev
      Reply

      Thank you,I haven’t implemented this on an ARM, you would have to port the code manually for that.

  • mukesh
    Reply

    how to connect the two wires of the relay the vcc and gnd, in your blog, i understand that the gnd is connected to arduino, but what about the vcc, whether it should be connected to the ac mains supply, and also can i use 12 v spdt relay..

  • mukesh
    Reply

    hey frnd how to connect the relay, evertything is understandable, i only want to ask, that one pin of the relay is connected to the ground of the arduino, and where to connect the other vcc pin of the relay, i am going to buy a relay board from ebay- http://www.ebay.in/itm/FOUR-CHANNEL-4-CH-12V-ULN2003-RELAY-BOARD-MODULE-RASPBERRY-PI-ARDUINO-AVR-/281380321593?pt=LH_DefaultDomain_203&hash=item418392f939

    it has pin named gnd and vcc, so please give me details that where to connect these two pins..

    and also in this relay board how to connect the appliances, in which output pins to connect the two wires of the appliaces like a fan.
    plz help me, your details are very clear, yet i want to clear my every doubts, because this is my first project.

    you can email me on mirnal.mannu123@gmail.com

    thanks a lot in advance

  • Kiran
    Reply

    Hi Arvind,

    i tried to hook up wifi shield on arduino uno board butafter updating the standard program (in-build program ) my serial monitor show “wifi shiled not present”. i’ll be very great-full if you tell me the solution?

    Regards
    Kiran G

    • Arvind Sanjeev
      Reply

      Have you tried double checking the connections? Was it working before?

  • Mahesh
    Reply

    Thank you

  • Mahesh
    Reply

    Impressive project, nice work…….i am doing final year project this year…..can i have your arduino code???

    • Arvind Sanjeev
      Reply

      Hello Mahesh, thanks a lot. The source code is available in the tutorial. Please check Step 4.

  • Pwong
    Reply

    Thanks for sharing this tutorial…l am a newbie
    In this Bluetooth control thing and will be trying
    Out the steps above…

    Thanks again…and have a nice day !!

  • dhruv
    Reply

    Really impressive…thanks

    Can u suggest me any android/wifi home automation? Can we modify ur app or i need to start with another scenario?

    • Arvind Sanjeev
      Reply

      You can modify my app to make it communicate over wifi. It currently uses bluetooth.

  • Mathew
    Reply

    Hello,

    My question is can i replace the Bluetooth module with WiFi Module so that i could get more coverage, if it is possible how it can be done.

    Anticipating your reply

    Thanks an Regards

  • jignesh patel
    Reply

    bt how ?? i dont know java programming!!!!
    plz help me?

  • jignesh patel
    Reply

    thank u very much …its working….now i think to modify app for 11 outputs ..coz arduino has 11 digital output pin…..help me in eclips…if possible!!!>?

    • Arvind Sanjeev
      Reply

      It is possible, you can modify the app that I posted.

      • faizan
        Reply

        hlo arvind…all working fin but rx light is not blinking and my realy is not working.my realy connection is all good.can u plz hlp mi

        • Arvind Sanjeev
          Reply

          Can you open the serial monitor on arduino and check if any incoming data from bluetooth, shows up on it.

  • jignesh
    Reply

    ac voltage have 2wire +,- and also appliance like light have 2 wire ……and in above connection only 1pins for connection …….how to connect another 1?????plz give sechmetic for ac voltage and appliance connection

  • jaydeep parekh
    Reply

    Very impressive and quite helpful

pingbacks / trackbacks
  • […] 2 Loading the arduino software If you are new to arduino, download the arduino IDE (Integrated Development Environment) from Arduino . The tutorials for beginners can be seen here :  Arduino tutorial . The arduino code for the following project is here : DIY_SmartHome . The code is really simple, here it checks the incoming bluetooth signal via the bluetooth module and then compares (ASCII values) using an “if” statement with previously defined values. If it matches the value, relay is activated using “digitalWrite(pin,HIGH)” command , which passes 5V to the arduino digital pin.PLEASE NOTE : SINCE THE BLUETOOTH MODULE IS CONNECTED TO THE RX AND TX PINS OF THE ARDUINO, THE MODULE SHOULD BE REMOVED WHILE UPLOADING THE CODE FROM PC TO THE ARDUINO. THE MODULE SHOULD BE CONNECTED ONCE THE UPLOAD IS COMPLETE. Upload the code to your arduino board , then follow step 5 […]

  • […] Restoring floorboards – step by step guide – Period HouseThe Eyebrow Guru idm.guru: Oracle Identity and Access Management Blog – Deploying the IAM Suite with the Deployment Wizard DIY Android Home Automation with free Smartphone Application – DIY Hacking […]

Leave a Comment

9 + 1 =

Start typing and press Enter to search