{"id":19324321,"url":"https://github.com/ayush8420/bluetooth-battery-manager","last_synced_at":"2026-05-19T09:07:24.957Z","repository":{"id":260960420,"uuid":"882823897","full_name":"Ayush8420/bluetooth-battery-manager","owner":"Ayush8420","description":"An Arduino-based Bluetooth project to control a relay switchboard via an Android app, optimizing power by auto-shutdown at 80% battery.","archived":false,"fork":false,"pushed_at":"2024-11-03T22:37:25.000Z","size":9979,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T06:15:31.060Z","etag":null,"topics":["arduino","bluetooth","bluetooth-low-energy","electronics","iot","mitappinventor"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ayush8420.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-03T21:08:57.000Z","updated_at":"2024-11-03T22:37:28.000Z","dependencies_parsed_at":"2025-02-24T06:15:24.730Z","dependency_job_id":"01c5955e-c4ec-496d-a4dc-7a8302c06298","html_url":"https://github.com/Ayush8420/bluetooth-battery-manager","commit_stats":null,"previous_names":["ayush8420/bluetooth-battery-manager-apk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ayush8420/bluetooth-battery-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush8420%2Fbluetooth-battery-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush8420%2Fbluetooth-battery-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush8420%2Fbluetooth-battery-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush8420%2Fbluetooth-battery-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ayush8420","download_url":"https://codeload.github.com/Ayush8420/bluetooth-battery-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush8420%2Fbluetooth-battery-manager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266553964,"owners_count":23947242,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["arduino","bluetooth","bluetooth-low-energy","electronics","iot","mitappinventor"],"created_at":"2024-11-10T02:04:42.794Z","updated_at":"2026-05-19T09:07:24.924Z","avatar_url":"https://github.com/Ayush8420.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔌 Bluetooth Integrated Power Control\n\nThis project, **Bluetooth Integrated Power Control**, is a smart home automation system that enables users to control an electrical switchboard via Bluetooth using a mobile app. The app automatically powers down the switchboard when the phone’s battery reaches a specified level, helping to save energy and prevent overcharging.\n\n## 📋 Table of Contents\n- [Project Overview](#project-overview)\n- [Project Features](#project-features)\n- [How It Works](#how-it-works)\n- [Components Required](#components-required)\n- [Installation](#installation)\n- [How to Use the App](#how-to-use-the-app)\n- [Arduino Code](#arduino-code)\n\n---\n\n## 📖 Project Overview\n\n**Bluetooth Integrated Power Control** uses an Arduino, Bluetooth module, and relay to control appliances based on the battery level of the Android device. This project creates a user-friendly IoT solution for optimizing power use and enhancing home automation.\n\n## ✨ Project Features\n- **Bluetooth Connectivity**: Wirelessly controls the switchboard via a mobile app.\n- **Battery-Based Control**: Turns off the switchboard when the phone reaches 80% battery.\n- **Manual Control**: Toggle the switchboard on/off manually from the app.\n- **Status Updates**: Provides real-time feedback on the switchboard’s status (ON/OFF).\n\n---\n\n## ⚙️ How It Works\n\n1. **Bluetooth Communication**: The Android app, developed with **MIT App Inventor**, connects to the HC-05 Bluetooth module attached to the Arduino.\n2. **Battery Monitoring**: The app monitors the battery level of the connected Android device.\n3. **Automatic Switching**: When the battery reaches the set threshold (e.g., 80%), the app sends a command to the Arduino to turn off the relay, powering down the switchboard.\n4. **Manual Override**: Users can control the relay manually using the app.\n\n---\n\n## 🔧 Components Required\n\n- **Arduino Uno/Nano** – Microcontroller board.\n- **HC-05 Bluetooth Module** – For Bluetooth communication.\n- **Relay Module** – To control the electrical switchboard.\n- **Android Device** – To install and run the app.\n- **Power Supply** – For Arduino and relay.\n- **Miscellaneous Components** – Jumper wires, resistors (for voltage divider on Bluetooth RX pin).\n\n---\n\n## 🛠️ Installation\n\n1. **Arduino Setup**:\n   - Install the Arduino IDE.\n   - Connect the Arduino, HC-05, and relay module as per the wiring guide in the `docs/` folder.\n   \n2. **Android Application**:\n   - Download the APK file from this repository and install it on an Android device.\n   - Grant the required permissions for full functionality.\n\n---\n\n## 📲 How to Use the App\n\n1. **Connect to Bluetooth**:\n   - Open the app and pair it with the HC-05 module (usually pairs with code **1234** or **0000**).\n\n2. **Automatic Mode**:\n   - After pairing, the app monitors the battery level. Once it reaches 80%, the app automatically sends a command to turn off the switchboard.\n\n3. **Manual Mode**:\n   - Use the app’s control buttons to manually toggle the switchboard.\n\n---\n\n## 🖥️ Arduino Code\n\nHere’s the code used on the Arduino to receive Bluetooth commands and control the relay.\n\n```cpp\n#include \"Arduino.h\"\n#include \u003cSoftwareSerial.h\u003e\n\nconst byte rxPin = 9;\nconst byte txPin = 8;\nconst byte relayPin = 7;\n\nSoftwareSerial BTSerial(rxPin, txPin);\n\nvoid setup() {\n  pinMode(LED_BUILTIN, OUTPUT);\n  pinMode(rxPin, INPUT);\n  pinMode(txPin, OUTPUT);\n  pinMode(relayPin, OUTPUT);\n  BTSerial.begin(9600);\n  Serial.begin(9600);\n}\n\nint dataByte;\n\nvoid loop() {\n  if (BTSerial.available() \u003e 0) {\n    dataByte = BTSerial.read();\n    Serial.println(dataByte);\n\n    if (dataByte == 'A') {\n      digitalWrite(LED_BUILTIN, HIGH);\n      digitalWrite(relayPin, HIGH);\n    }\n  \n    if (dataByte == 'B') {\n      digitalWrite(LED_BUILTIN, LOW);\n      digitalWrite(relayPin, LOW);\n    }\n  }\n}\n```\n\n### **Arduino Connections**\n\n- **HC-05 Bluetooth Module**:\n  - **TXD** → Arduino **RX (Pin 9)**\n  - **RXD** → Arduino **TX (Pin 8)** (use a 1KΩ and 2KΩ resistor for voltage divider)\n  - **VCC** → Arduino **5V**\n  - **GND** → Arduino **GND**\n\n- **Relay Module**:\n  - **IN** → Arduino **Pin 7**\n  - **VCC** → Arduino **5V**\n  - **GND** → Arduino **GND**\n\n---\n\n## 🌍 Applications\n\n- **Home Automation**: Remotely control appliances in your home.\n- **Power Management**: Efficiently save energy by controlling appliances based on battery level.\n- **Overcharge Prevention**: Helps prevent devices from overcharging by managing power usage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush8420%2Fbluetooth-battery-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayush8420%2Fbluetooth-battery-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush8420%2Fbluetooth-battery-manager/lists"}