{"id":15477427,"url":"https://github.com/aagarwal1012/home-automation","last_synced_at":"2025-04-22T14:24:23.491Z","repository":{"id":54326788,"uuid":"129596370","full_name":"aagarwal1012/Home-Automation","owner":"aagarwal1012","description":"📱 Home Automation System using an Arduino board with Bluetooth being remotely controlled by any Android OS smartphone.","archived":false,"fork":false,"pushed_at":"2021-02-23T20:59:28.000Z","size":3015,"stargazers_count":13,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T03:03:38.087Z","etag":null,"topics":["android","app","arduino","bluetooth-controller","home-automation"],"latest_commit_sha":null,"homepage":"https://medium.com/@aagarwal1012/home-automation-using-arduino-and-bluetooth-module-dfb9d849aea5","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aagarwal1012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-15T09:42:30.000Z","updated_at":"2024-05-22T13:10:08.000Z","dependencies_parsed_at":"2022-08-13T12:10:11.364Z","dependency_job_id":null,"html_url":"https://github.com/aagarwal1012/Home-Automation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aagarwal1012%2FHome-Automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aagarwal1012%2FHome-Automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aagarwal1012%2FHome-Automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aagarwal1012%2FHome-Automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aagarwal1012","download_url":"https://codeload.github.com/aagarwal1012/Home-Automation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250256805,"owners_count":21400593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","app","arduino","bluetooth-controller","home-automation"],"created_at":"2024-10-02T04:00:54.756Z","updated_at":"2025-04-22T14:24:23.466Z","avatar_url":"https://github.com/aagarwal1012.png","language":"Java","funding_links":["https://www.paypal.me/aagarwal1012/"],"categories":[],"sub_categories":[],"readme":"Home-Automation\n=====\nThe main objective of this project is to develop a home automation system using an Arduino board with Bluetooth being remotely controlled by any Android OS smartphone. As technology is advancing so houses are also getting smarter. Modern houses are gradually shifting from conventional switches to centralized control system, involving remote controlled switches. Presently, conventional wall switches located in different parts of the house makes it difficult for the user to go near them to operate. Even more it becomes more difficult for the elderly or physically handicapped people to do so. Remote controlled home automation system provides a most modern solution with smartphones. \n\nIn order to achieve this, a Bluetooth module is interfaced to the Arduino board at the receiver end while on the transmitter end, a GUI application on the cell phone sends ON/OFF commands to the receiver where loads are connected. By touching the specified location on the GUI, the loads can be turned ON/OFF remotely through this technology.\n\nDemonstration of the project is in the below youtube video :  \n\n\u003ca href = \"https://www.youtube.com/watch?v=1ieyT6df8ec\" \u003e\u003cimg src=\"https://github.com/aagarwal1012/Home-Automation/blob/master/Images/youtube_image.png\" width=\"50%\" /\u003e\u003c/a\u003e  \n\nContents\n--------\nThis Readme is divided into several parts\n1. [Description](#description)\n2. [Components](#components)\n3. [Implementation](#implementation)\n\n\n\u003ca name=\"description\"\u003eDescription\u003c/a\u003e\n---------\nThis project is one of the important \u003ca href = \"https://www.projectsof8051.com/arduino-projects/\"\u003eArduino Projects\u003c/a\u003e. Arduino based home automation using Bluetooth project helps the user to control any electronic device using Device Control app on their Android Smartphone. The android app sends commands to the controller – Arduino, through wireless communication, namely, Bluetooth. The Arduino is connected to the main PCB which has five relays as shown in the block diagram. These relays can be connected to different electronic devices like lights, television, fan, etc.  \nWhen the user presses on the ‘On’ button displayed on the app for the device 1, the Buzzer is switched on. This Buzzer can be switched off, by pressing the same button again.  \nSimilarly, when the user presses on the ‘On’ button displayed on the app for the device 2, the fan is switched on. The fan can be switched off, by pressing the same button again.  \nThis project of home automation using Bluetooth and Arduino can be used for controlling any AC or DC devices.  \nGiven below is the flow diagram that explains the flow of the project.\n\n\u003cimg src = \"https://github.com/aagarwal1012/Home-Automation/blob/master/Images/diagram.jpg\" width = \"75%\"/\u003e  \n\n\n\u003ca name=\"components\"\u003eComponents\u003c/a\u003e\n---------\nThis section enlists various hardware and software componets used in the project.\n\n#### Hardware\nThe list of components mentioned here are specifically for controlling 4 different loads.\n\n- Arduino UNO\n- HC – 05 Bluetooth Module\n- 5 V Relay X 4\n- Prototyping board (Bread board)\n- Connecting wires\n- Smartphone or tablet (Bluetooth enabled)\n- 5V Power Source\n\n#### Software\n\n- Arduino 1.8.5 compiler\n- [Android application](#app)\n\n\n\n\u003ca name=\"implementation\"\u003eImplementation\u003c/a\u003e\n---------\n### Circuit Diagram  \n\n\u003cimg src = \"https://github.com/aagarwal1012/Home-Automation/blob/master/Images/ciruit_diagram.png\" width = \"75%\"/\u003e  \n\n### Arduino Code \n\n```\n//using ports 10, 11, 12, 13\nint relay1=10;\nint relay2=11;\nint relay3=12;\nint relay4=13;\nint val;\n\nvoid setup() {\n \n  Serial.begin(9600);\n  pinMode(relay1,OUTPUT);\n  pinMode(relay2,OUTPUT);\n  pinMode(relay3,OUTPUT);\n  pinMode(relay4,OUTPUT);\n  digitalWrite(relay1,HIGH);\n  digitalWrite(relay2,HIGH);\n  digitalWrite(relay3,HIGH);\n  digitalWrite(relay4,HIGH);\n\n}\nvoid loop() {\n \n  //check data serial from bluetooth android App\n  while (Serial.available() \u003e 0){\n    val = Serial.read();\n    Serial.println(val);\n  }\n \n  //Relay is on\n  if( val == 1 ) {\n    digitalWrite(relay1,HIGH); }\n  else if( val == 2 ) {\n    digitalWrite(relay2,HIGH); }  else if( val == 3 ) {\n    digitalWrite(relay3,HIGH); }\n  else if( val == 4 ) {\n    digitalWrite(relay4,HIGH); }\n    \n  //relay all on\n  else if( val == 0 ) {\n    digitalWrite(relay1,HIGH);\n    digitalWrite(relay2,HIGH);\n    digitalWrite(relay3,HIGH);\n    digitalWrite(relay4,HIGH);\n  }\n  //relay is off\n  else if( val == 5 ) {\n    digitalWrite(relay1,LOW); }\n  else if( val == 6 ) {\n    digitalWrite(relay2,LOW); }\n  else if( val == 7 ) {\n    digitalWrite(relay3,LOW); }\n  else if( val == 8 ) {\n    digitalWrite(relay4,LOW); }\n    \n  //relay all off\n  else if( val == 10 ) {\n    digitalWrite(relay1,LOW);\n    digitalWrite(relay2,LOW);\n    digitalWrite(relay3,LOW);\n    digitalWrite(relay4,LOW);\n  }\n}\n```\n\n\n### Android App  \n\n\u003cimg src = \"https://github.com/aagarwal1012/Home-Automation/blob/master/Images/app_screenshot.png\" width = \"300\"/\u003e\n\n\nFuture Develpment\n---------  \n\n- Arduino based device control using Bluetooth on Smartphone project can be enhanced to control the speed of the fan or volume of the buzzer etc.\n- Home automation and Device controlling can be done using Internet of Things – IOT technology.\n- We can replace Bluetooth by GSM modem so that we can achieve device controlling by sending SMS using GSM modem.  \n\n\nAny suggestion are welcomed and feel free to open an \u003ca href = \"https://github.com/aagarwal1012/Home-Automation/issues\"\u003eissue\u003c/a\u003e.\n\n# Donate\n\u003e If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of :coffee:\n\u003e\n\u003e - [PayPal](https://www.paypal.me/aagarwal1012/)\n\nLicense\n--------\n\n```\nMIT License\n\nCopyright (c) 2018 Ayush Agarwal\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faagarwal1012%2Fhome-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faagarwal1012%2Fhome-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faagarwal1012%2Fhome-automation/lists"}