{"id":27857340,"url":"https://github.com/ajeyverma/smartcontroller","last_synced_at":"2026-05-17T19:05:57.803Z","repository":{"id":290637501,"uuid":"975100449","full_name":"ajeyverma/SmartController","owner":"ajeyverma","description":"An IoT-based smart system built with Arduino and MIT App Inventor that controls LEDs, fans, and alarms using sensors and Bluetooth connectivity.","archived":false,"fork":false,"pushed_at":"2025-08-29T20:00:23.000Z","size":10735,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-07T13:02:55.780Z","etag":null,"topics":["3-channels-relay","ajeyverma","alarm-control","arduino","arduino-nano","arduino-uno","bluetooth","convertor","fan-controller","ldr-sensor","led-controller","live-status","mitapp","mitappinventor","mobile-app","pir-sensor","relay","smartcontroller","temperature-monitoring","thermistor"],"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/ajeyverma.png","metadata":{"files":{"readme":"Docs/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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-29T19:30:31.000Z","updated_at":"2025-10-11T22:01:13.000Z","dependencies_parsed_at":"2025-08-29T21:34:17.371Z","dependency_job_id":null,"html_url":"https://github.com/ajeyverma/SmartController","commit_stats":null,"previous_names":["ajeyverma/smartcontroller"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ajeyverma/SmartController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajeyverma%2FSmartController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajeyverma%2FSmartController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajeyverma%2FSmartController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajeyverma%2FSmartController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajeyverma","download_url":"https://codeload.github.com/ajeyverma/SmartController/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajeyverma%2FSmartController/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33151625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["3-channels-relay","ajeyverma","alarm-control","arduino","arduino-nano","arduino-uno","bluetooth","convertor","fan-controller","ldr-sensor","led-controller","live-status","mitapp","mitappinventor","mobile-app","pir-sensor","relay","smartcontroller","temperature-monitoring","thermistor"],"created_at":"2025-05-04T13:18:13.783Z","updated_at":"2026-05-17T19:05:57.778Z","avatar_url":"https://github.com/ajeyverma.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart Controller Overview\n\n## Smart Bluetooth-Based Controller\n\n**Introduction:**\nA compact, smart system using Arduino Nano, controlled via Bluetooth using a custom MIT App Inventor interface.\n\n**Key Features:**\n- Dual mode: Automatic / Manual\n- Real-time temperature monitoring\n- Day-night detection via LDR\n- Motion sensing with PIR sensor\n- Control over LED, Fan, and Alarm using relays\n- Live status indicators on mobile app\n\n**Components Used:**\n- Arduino Nano\n- LDR, PIR, LM35 (Thermistor)\n- Bluetooth Module (HC-05)\n- Relay Module\n- Solar panel with AC-DC converter backup\n\n---\n\n**App \u0026 Code Integration**\n\n\n**App Functionality:**\n- Bluetooth connection control\n- Toggle between Auto and Manual modes\n- Manual ON/OFF switches for LED, Fan, Alarm\n- Live status LEDs for device states\n- Real-time temperature display\n\n**Arduino Code Logic Highlights:**\n- Reads LDR, PIR, and temperature values\n- Auto Mode:\n  - LED ON when dark + motion\n  - Fan ON when motion + temp \u003e 27°C\n  - Alarm ON when temp \u003e 100°C\n- Manual Mode:\n  - App toggles each device\n- Sends live status \u0026 temperature to app via Bluetooth\n\n# ⚙️Setup\n\n\n\u003ch3\u003e⚡ Power Supply Setup\u003c/h3\u003e\n\u003cp\u003e\n  If using \u003cstrong\u003esolar power\u003c/strong\u003e, connect the solar panel to a \u003cstrong\u003echarge controller\u003c/strong\u003e and use a \u003cstrong\u003evoltage regulator\u003c/strong\u003e (e.g., AMS1117 or 7805) to provide a stable 5V output for the Arduino and components.\n\u003c/p\u003e\n\u003cp\u003e\n  For \u003cstrong\u003ebackup power\u003c/strong\u003e, connect an \u003cstrong\u003eAC-DC adapter\u003c/strong\u003e (5V output) that automatically takes over when solar input is low or unavailable. Ensure proper power isolation if needed.\n\u003c/p\u003e\n\n\u003ch3\u003e🧩 Wiring Notes\u003c/h3\u003e\n\u003cp\u003eEnsure all components share a \u003cstrong\u003ecommon ground\u003c/strong\u003e with the Arduino. Here's how to wire each module:\u003c/p\u003e\n\n\u003ch4\u003e🔆 LDR (Light Sensor)\u003c/h4\u003e\n\u003cp\u003e\n  Use a voltage divider with a 10kΩ resistor. Connect:\n\u003c/p\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003e5V → LDR → Junction\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eJunction → 10kΩ Resistor → GND\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eJunction → D2 (LDR_PIN)\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\n  This setup lets D2 read \u003cstrong\u003eLOW when dark\u003c/strong\u003e and \u003cstrong\u003eHIGH when bright\u003c/strong\u003e.\n\u003c/p\u003e\n\n\u003ch4\u003e🌡️ LM35 Temperature Sensor\u003c/h4\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003eLM35 VCC → 5V\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eLM35 GND → GND\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eLM35 OUT → A3 (THERMISTOR_PIN)\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\n  LM35 outputs 10mV/°C. For example, 27°C = ~0.27V.\n\u003c/p\u003e\n\n\u003ch4\u003e🚶 PIR Motion Sensor\u003c/h4\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003ePIR VCC → 5V\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ePIR GND → GND\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ePIR OUT → D4 (PIR_PIN)\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\n  Use “H” jumper mode on the PIR for continuous signal while motion persists.\n\u003c/p\u003e\n\n\u003ch4\u003e🔌 Relays (LED, Fan, Alarm)\u003c/h4\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003eRelay IN1 → D8 (LED_RELAY_PIN)\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eRelay IN2 → D9 (FAN_RELAY_PIN)\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eRelay IN3 → D10 (ALARM_RELAY_PIN)\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eRelay VCC → 5V\u003c/code\u003e, \u003ccode\u003eGND → GND\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\n  Connect your high-voltage devices (e.g., bulb, fan, buzzer) to the \u003cstrong\u003eNO (Normally Open)\u003c/strong\u003e and \u003cstrong\u003eCOM\u003c/strong\u003e terminals.\n\u003c/p\u003e\n\n\u003ch4\u003e📶 HC-05 Bluetooth Module\u003c/h4\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003eHC-05 TX → D6 (Arduino RX via SoftwareSerial)\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eHC-05 RX → Voltage Divider → D7 (Arduino TX)\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003eVCC → 5V\u003c/code\u003e, \u003ccode\u003eGND → GND\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eVoltage Divider for HC-05 RX (to drop 5V TX signal to ~3.3V):\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\nArduino TX --- 1kΩ ---+--- 2kΩ --- GND\n                      |\n                   HC-05 RX\n\u003c/pre\u003e\n\n\u003cp\u003e\n  This prevents damage to the HC-05's 3.3V logic input pin.\n\u003c/p\u003e\n\n## 🔌 Pin Connections\n\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"8\"\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eComponent\u003c/th\u003e\n      \u003cth\u003eArduino Pin\u003c/th\u003e\n      \u003cth\u003eNotes\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eLDR\u003c/td\u003e\n      \u003ctd\u003eD2 (Digital)\u003c/td\u003e\n      \u003ctd\u003eUse with voltage divider; LOW when dark\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eLM35 Temperature Sensor\u003c/td\u003e\n      \u003ctd\u003eA3 (Analog)\u003c/td\u003e\n      \u003ctd\u003eMiddle pin to A3; VCC \u0026 GND to 5V/GND\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ePIR Motion Sensor\u003c/td\u003e\n      \u003ctd\u003eD4 (Digital)\u003c/td\u003e\n      \u003ctd\u003eOUT to D4; requires 5V and GND\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eRelay (LED)\u003c/td\u003e\n      \u003ctd\u003eD8\u003c/td\u003e\n      \u003ctd\u003eIN pin of relay module\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eRelay (Fan)\u003c/td\u003e\n      \u003ctd\u003eD9\u003c/td\u003e\n      \u003ctd\u003eIN pin of relay module\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eRelay (Alarm)\u003c/td\u003e\n      \u003ctd\u003eD10\u003c/td\u003e\n      \u003ctd\u003eIN pin of relay module\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eBluetooth HC-05\u003c/td\u003e\n      \u003ctd\u003eD6 (RX), D7 (TX)\u003c/td\u003e\n      \u003ctd\u003eUse voltage divider on HC-05 RX\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003cp\u003e\u003cstrong\u003eNote:\u003c/strong\u003e Connect all VCCs to 5V and all GNDs to common ground.\u003c/p\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajeyverma%2Fsmartcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajeyverma%2Fsmartcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajeyverma%2Fsmartcontroller/lists"}