https://github.com/ajeyverma/smartcontroller
An IoT-based smart system built with Arduino and MIT App Inventor that controls LEDs, fans, and alarms using sensors and Bluetooth connectivity.
https://github.com/ajeyverma/smartcontroller
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
Last synced: 26 days ago
JSON representation
An IoT-based smart system built with Arduino and MIT App Inventor that controls LEDs, fans, and alarms using sensors and Bluetooth connectivity.
- Host: GitHub
- URL: https://github.com/ajeyverma/smartcontroller
- Owner: ajeyverma
- Created: 2025-04-29T19:30:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-29T20:00:23.000Z (10 months ago)
- Last Synced: 2025-11-07T13:02:55.780Z (7 months ago)
- 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
- Language: C++
- Homepage:
- Size: 10.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Docs/README.md
Awesome Lists containing this project
README
# Smart Controller Overview
## Smart Bluetooth-Based Controller
**Introduction:**
A compact, smart system using Arduino Nano, controlled via Bluetooth using a custom MIT App Inventor interface.
**Key Features:**
- Dual mode: Automatic / Manual
- Real-time temperature monitoring
- Day-night detection via LDR
- Motion sensing with PIR sensor
- Control over LED, Fan, and Alarm using relays
- Live status indicators on mobile app
**Components Used:**
- Arduino Nano
- LDR, PIR, LM35 (Thermistor)
- Bluetooth Module (HC-05)
- Relay Module
- Solar panel with AC-DC converter backup
---
**App & Code Integration**
**App Functionality:**
- Bluetooth connection control
- Toggle between Auto and Manual modes
- Manual ON/OFF switches for LED, Fan, Alarm
- Live status LEDs for device states
- Real-time temperature display
**Arduino Code Logic Highlights:**
- Reads LDR, PIR, and temperature values
- Auto Mode:
- LED ON when dark + motion
- Fan ON when motion + temp > 27°C
- Alarm ON when temp > 100°C
- Manual Mode:
- App toggles each device
- Sends live status & temperature to app via Bluetooth
# ⚙️Setup
⚡ Power Supply Setup
If using solar power, connect the solar panel to a charge controller and use a voltage regulator (e.g., AMS1117 or 7805) to provide a stable 5V output for the Arduino and components.
For backup power, connect an AC-DC adapter (5V output) that automatically takes over when solar input is low or unavailable. Ensure proper power isolation if needed.
🧩 Wiring Notes
Ensure all components share a common ground with the Arduino. Here's how to wire each module:
🔆 LDR (Light Sensor)
Use a voltage divider with a 10kΩ resistor. Connect:
5V → LDR → JunctionJunction → 10kΩ Resistor → GNDJunction → D2 (LDR_PIN)
This setup lets D2 read LOW when dark and HIGH when bright.
🌡️ LM35 Temperature Sensor
LM35 VCC → 5VLM35 GND → GNDLM35 OUT → A3 (THERMISTOR_PIN)
LM35 outputs 10mV/°C. For example, 27°C = ~0.27V.
🚶 PIR Motion Sensor
PIR VCC → 5VPIR GND → GNDPIR OUT → D4 (PIR_PIN)
Use “H” jumper mode on the PIR for continuous signal while motion persists.
🔌 Relays (LED, Fan, Alarm)
Relay IN1 → D8 (LED_RELAY_PIN)Relay IN2 → D9 (FAN_RELAY_PIN)Relay IN3 → D10 (ALARM_RELAY_PIN)-
Relay VCC → 5V,GND → GND
Connect your high-voltage devices (e.g., bulb, fan, buzzer) to the NO (Normally Open) and COM terminals.
📶 HC-05 Bluetooth Module
HC-05 TX → D6 (Arduino RX via SoftwareSerial)HC-05 RX → Voltage Divider → D7 (Arduino TX)-
VCC → 5V,GND → GND
Voltage Divider for HC-05 RX (to drop 5V TX signal to ~3.3V):
Arduino TX --- 1kΩ ---+--- 2kΩ --- GND
|
HC-05 RX
This prevents damage to the HC-05's 3.3V logic input pin.
## 🔌 Pin Connections
Component
Arduino Pin
Notes
LDR
D2 (Digital)
Use with voltage divider; LOW when dark
LM35 Temperature Sensor
A3 (Analog)
Middle pin to A3; VCC & GND to 5V/GND
PIR Motion Sensor
D4 (Digital)
OUT to D4; requires 5V and GND
Relay (LED)
D8
IN pin of relay module
Relay (Fan)
D9
IN pin of relay module
Relay (Alarm)
D10
IN pin of relay module
Bluetooth HC-05
D6 (RX), D7 (TX)
Use voltage divider on HC-05 RX
Note: Connect all VCCs to 5V and all GNDs to common ground.