. Smart Building Using Arduino (IoT Based Project) ~ SmartElectronicsDIY

Smart Building Using Arduino (IoT Based Project)

 

📌 Project Overview

A Smart Building uses Arduino + sensors + IoT to automatically monitor and control building systems such as lighting, temperature, security, air quality, and energy usage.
The goal is to save energy, increase safety, and improve comfort.


🎯 Objectives

  • Automatic light control based on occupancy

  • Temperature & humidity monitoring

  • Gas & fire detection

  • Remote control using mobile app or web

  • Energy-efficient building automation







🧠 System Block Diagram (Text)

Sensors → Arduino → WiFi Module → Mobile App / Cloud ↓ Relays ↓ Lights / Fan / Alarm

🔧 Components Required

🔹 Hardware

ComponentQuantity
Arduino Uno1
ESP8266 WiFi Module1
PIR Motion Sensor1
LDR Sensor1
DHT11 (Temp & Humidity)1
MQ-2 Gas Sensor1
Relay Module (4-Channel)1
Buzzer1
LED / BulbAs required
Breadboard1
Jumper WiresAs required
Power Supply5V

🔹 Software

  • Arduino IDE

  • Blynk App / ThingSpeak / Firebase

  • Embedded C


⚙️ Working Principle

1️⃣ Smart Lighting

2️⃣ Temperature Control

3️⃣ Gas & Fire Safety

  • MQ-2 detects gas leakage

  • Buzzer + mobile alert activated

4️⃣ IoT Control

  • ESP8266 sends data to cloud

  • User can control devices via mobile app





🔌 Pin Connections

DeviceArduino Pin
PIR SensorD2
LDRA0
DHT11D4
MQ-2A1
Relay 1 (Light)D5
Relay 2 (Fan)D6
BuzzerD7
ESP8266 TXD9
ESP8266 RXD10

💻 Arduino Code (Basic Example)

#include <DHT.h> #define DHTPIN 4 #define DHTTYPE DHT11 #define PIR 2 #define RELAY_LIGHT 5 #define RELAY_FAN 6 DHT dht(DHTPIN, DHTTYPE); void setup() { pinMode(PIR, INPUT); pinMode(RELAY_LIGHT, OUTPUT); pinMode(RELAY_FAN, OUTPUT); dht.begin(); Serial.begin(9600); } void loop() { int motion = digitalRead(PIR); float temp = dht.readTemperature(); if (motion == HIGH) { digitalWrite(RELAY_LIGHT, HIGH); } else { digitalWrite(RELAY_LIGHT, LOW); } if (temp > 30) { digitalWrite(RELAY_FAN, HIGH); } else { digitalWrite(RELAY_FAN, LOW); } delay(1000); }

📱 IoT Platform Options

  • Blynk (Easy mobile control)

  • ThingSpeak (Graphs & analytics)

  • Firebase (Real-time database)

  • MQTT (Advanced IoT systems)


📊 Applications

  • Smart homes

  • Offices & malls

  • Hospitals

  • Colleges

  • Hotels


🌟 Advantages

✔ Energy saving
✔ Remote monitoring
✔ Increased safety
✔ Scalable & low cost

0 comments:

Post a Comment