. SmartElectronicsDIY

Automatic Fire Detection Suppression System(Arduino Uno | Embedded + Safety System)

This system automatically detects fire using flame and smoke sensors and activates a water pump to suppress it. At the same time, it triggers an alarm and can send alerts (optional GSM/IoT).

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

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

IoT Patient Health Monitoring System

 

Project Overview

This system continuously monitors a patient’s heart rate, body temperature, and blood oxygen level (SpO₂) and sends real-time data to a mobile app / web dashboard using IoT. Doctors or caretakers can monitor the patient remotely and receive alerts if values go abnormal.


🎯 Features

  • ✅ Real-time monitoring

  • ✅ Remote access via Internet

  • ✅ Emergency alert system

  • ✅ Low cost & scalable

  • ✅ Suitable for hospitals & home care


🧠 Parameters Monitored

ParameterSensor
Heart RateMAX30100 / MAX30102
SpO₂MAX30100 / MAX30102
Body TemperatureLM35 / DS18B20
Room Temp & Humidity (Optional)DHT11

🧩 Components Required

  • ESP8266 NodeMCU (Wi-Fi)

  • MAX30100 / MAX30102 Pulse Oximeter

  • LM35 Temperature Sensor

  • OLED Display (0.96” I2C) (optional)

  • Buzzer (alert)

  • Breadboard & Jumper Wires

  • USB Cable

  • Power Supply


🔌 Circuit Connections

MAX30100 → ESP8266

MAX30100ESP8266
VIN3.3V
GNDGND
SDAD2
SCLD1

LM35 → ESP8266

LM35ESP8266
VCC3.3V
OUTA0
GNDGND

Buzzer

    • → D5

  • − → GND


☁️ IoT Platform

You can use:

  • Blynk

  • ThingSpeak

  • Firebase

  • MQTT Dashboard

(Example below uses Blynk)


📱 Mobile App Output


🧾 Arduino Code (ESP8266 + MAX30100)

#include <Wire.h> #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> #include "MAX30100_PulseOximeter.h" #define BLYNK_PRINT Serial #define BUZZER D5 char auth[] = "Your_Blynk_Auth_Token"; char ssid[] = "WiFi_Name"; char pass[] = "WiFi_Password"; PulseOximeter pox; uint32_t tsLastReport = 0; void setup() { Serial.begin(9600); pinMode(BUZZER, OUTPUT); Blynk.begin(auth, ssid, pass); if (!pox.begin()) { Serial.println("MAX30100 Failed"); for(;;); } } void loop() { Blynk.run(); pox.update(); if (millis() - tsLastReport > 1000) { int heartRate = pox.getHeartRate(); int spo2 = pox.getSpO2(); Blynk.virtualWrite(V1, heartRate); Blynk.virtualWrite(V2, spo2); if (heartRate < 50 || spo2 < 90) { digitalWrite(BUZZER, HIGH); Blynk.notify("⚠ Patient Health Alert!"); } else { digitalWrite(BUZZER, LOW); } tsLastReport = millis(); } }

📊 Output Example


📘 Applications

Air Quality Monitoring System Using Arduino UNO

 

Project Title

Design and Implementation of an Air Quality Monitoring System Using Arduino UNO


🔷 Abstract

Air pollution is a major environmental issue affecting human health. This project monitors air quality in real time using gas sensors connected to an Arduino UNO. The system detects harmful gases and displays air quality levels. When pollution crosses a threshold, a buzzer/fan/LED is activated as an alert. The system is low-cost, portable, and suitable for smart home and smart city applications.


🔷 Objectives

  • Measure air pollution level

  • Detect harmful gases (CO, LPG, smoke)

  • Display real-time air quality

  • Trigger alert when pollution is high

  • Create awareness about air pollution


🔷 Block Diagram

Gas Sensor (MQ) → Arduino UNO → LCD / Serial Monitor ↓ Buzzer / Fan

🔷 Components Required

🔹 Hardware

ComponentQuantity
Arduino UNO1
MQ-135 / MQ-2 Gas Sensor1
16x2 LCD (I2C optional)1
Buzzer1
DC Fan / Relay Module1
220Ω Resistor1
Breadboard1
Jumper WiresAs required
USB Cable1

🔷 Sensor Selection

  • MQ-135 → CO₂, NH₃, Benzene, smoke (best for air quality)

  • MQ-2 → LPG, smoke, hydrogen

  • MQ-7 → Carbon Monoxide (CO)


🔷 Working Principle

  • Gas sensor detects pollutant gases

  • Sensor output voltage changes with pollution level

  • Arduino reads analog value

  • Air quality is classified (Good / Moderate / Poor)

  • Alert system activates when pollution is high


🔷 Circuit Connections

🔹 MQ-135 → Arduino

MQ SensorArduino
VCC5V
GNDGND
AOA0

🔹 LCD (I2C)

LCDArduino
SDAA4
SCLA5

🔹 Buzzer / Fan

  • Buzzer + → D8

  • Fan via relay → D9


🔷 Arduino Code

#include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2); int gasPin = A0; int buzzer = 8; int fan = 9; void setup() { lcd.init(); lcd.backlight(); pinMode(buzzer, OUTPUT); pinMode(fan, OUTPUT); Serial.begin(9600); } void loop() { int gasValue = analogRead(gasPin); lcd.setCursor(0,0); lcd.print("Air Quality:"); lcd.setCursor(0,1); lcd.print(gasValue); Serial.println(gasValue); if (gasValue > 400) { digitalWrite(buzzer, HIGH); digitalWrite(fan, HIGH); lcd.setCursor(12,1); lcd.print("BAD"); } else { digitalWrite(buzzer, LOW); digitalWrite(fan, LOW); lcd.setCursor(12,1); lcd.print("OK "); } delay(1000); }

🔷 Output

  • LCD displays air quality value

  • Buzzer sounds when pollution is high

  • Fan activates automatically

  • Serial monitor shows live readings


🔷 Advantages

✔ Low-cost system
✔ Real-time monitoring
✔ Easy to build
✔ Scalable to IoT

Arduino Two-Wheel Self-Balancing Robot

 Design and Implementation of an Arduino-Based Two-Wheel Self-Balancing Robot


🔷 Abstract

A two-wheel self-balancing robot is a robot that maintains its upright position using feedback from motion sensors. This project uses an Arduino UNO, an MPU6050 accelerometer & gyroscope, and DC motors to continuously measure the tilt angle and correct it using a PID control algorithm. The robot behaves like an inverted pendulum and balances itself in real time.


🔷 Objectives

  • To design a self-balancing robot using Arduino

  • To understand gyroscope & accelerometer sensors

  • To implement PID control

  • To control motors using motor driver

  • To study real-time feedback systems


🔷 Block Diagram

MPU6050 Sensor → Arduino UNO → PID Controller → Motor Driver → DC Motors

🔷 Components Required

🔹 Hardware

ComponentQuantity
Arduino UNO1
MPU6050 (Gyro + Accelerometer)1
L298N / L293D Motor Driver1
DC Gear Motors2
Robot Chassis + Wheels1 set
18650 Battery / 12V Battery1
Buck Converter (optional)1
Jumper WiresAs required
Power Switch1

🔷 Working Principle

  • The MPU6050 measures tilt angle (pitch).

  • Arduino calculates error between current angle and setpoint (0°).

  • PID algorithm calculates motor speed correction.

  • Motors rotate forward or backward to balance robot.

  • This loop runs hundreds of times per second.


🔷 Circuit Connections

🔹 MPU6050 → Arduino

MPU6050Arduino
VCC5V
GNDGND
SDAA4
SCLA5

🔹 Motor Driver (L298N) → Arduino

L298NArduino
IN1D5
IN2D6
IN3D9
IN4D10
ENAD3 (PWM)
ENBD11 (PWM)

🔷 Arduino Code (Basic Working)

#include <Wire.h> #include <MPU6050.h> MPU6050 mpu; float angle, error, lastError; float Kp = 18, Ki = 0.8, Kd = 0.9; float integral, derivative; float setPoint = 0; void setup() { Wire.begin(); mpu.initialize(); pinMode(3, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OUTPUT); } void loop() { angle = mpu.getAccelerationY() / 16384.0 * 90; error = setPoint - angle; integral += error; derivative = error - lastError; float output = Kp * error + Ki * integral + Kd * derivative; lastError = error; motorControl(output); } void motorControl(float speed) { speed = constrain(speed, -255, 255); if (speed > 0) { digitalWrite(5, HIGH); digitalWrite(6, LOW); } else { digitalWrite(5, LOW); digitalWrite(6, HIGH); } analogWrite(3, abs(speed)); }

🔷 Output

  • Robot stands upright automatically

  • Maintains balance when pushed slightly

  • Corrects tilt in real time


🔷 Advantages

✔ Real-time control system
✔ Educational (PID, sensors, robotics)
✔ Low cost
✔ Expandable (Bluetooth, obstacle avoidance)

Li-Fi Data Transfer System Project

 Design and Implementation of Li-Fi (Light Fidelity) Data Transfer System


Li-Fi (Light Fidelity) is a wireless communication technology that uses visible light instead of radio waves for data transmission. This project demonstrates a basic Li-Fi data transfer system using an LED as a transmitter and a photodiode as a receiver. Data is transmitted by rapidly switching the LED ON and OFF, and the receiver decodes this light signal back into digital data. This system is secure, fast, and suitable for RF-restricted environments.



🔷 Objectives

  • To understand Visible Light Communication (VLC)

  • To transmit digital data using LED light

  • To receive data using a photodiode/light sensor

  • To demonstrate an alternative to Wi-Fi

  • To build a low-cost, educational Li-Fi prototype


🔷 Block Diagram (Text Representation)

Data Source → Arduino (TX) → LED → Light Channel → Photodiode → Arduino (RX) → Output (PC/LCD)

🔷 Components Required

🔹 Hardware

ComponentQuantity
Arduino UNO (TX)1
Arduino UNO (RX)1
High Bright LED1
Photodiode / LDR1
10kΩ Resistor2
220Ω Resistor1
Breadboard2
Connecting WiresAs required
USB Cable2

🔷 Working Principle

  • The transmitter Arduino converts data into binary.

  • LED blinks at very high speed according to binary data.

  • Photodiode detects light variations.

  • Receiver Arduino converts received signal back into data.

  • Output is displayed on Serial Monitor or LCD.

Light ON = 1
Light OFF = 0


🔷 Circuit Connections

🔹 Transmitter Side

  • LED Anode → Arduino Pin 9

  • LED Cathode → 220Ω → GND

🔹 Receiver Side

  • Photodiode +ve → 5V

  • Photodiode −ve → A0 (Arduino)

  • 10kΩ resistor → A0 to GND


🔷 Arduino Code

✅ Transmitter Code

char data = 'A'; void setup() { pinMode(9, OUTPUT); } void loop() { for (int i = 0; i < 8; i++) { if (data & (1 << i)) { digitalWrite(9, HIGH); } else { digitalWrite(9, LOW); } delay(5); } digitalWrite(9, LOW); delay(100); }

✅ Receiver Code

void setup() { Serial.begin(9600); } void loop() { int value = analogRead(A0); if (value > 500) { Serial.print("1"); } else { Serial.print("0"); } delay(5); }

🔷 Output

  • Binary data visible on Serial Monitor

  • Text can be decoded using software logic

  • LED blinks rapidly (invisible to human eye)


🔷 Advantages

✔ Very high data speed
✔ High security (light doesn’t pass walls)
✔ No RF interference
✔ Safe for hospitals & aircraft
✔ Low power consumption


Arduino-Based Night Security Light System

     

Project Title:
👉 Arduino-Based Automatic Night Security Light

Objective:
To automatically turn ON a security light at night when motion is detected, and turn it OFF when there is no motion or daylight.

Concept Used:

  • LDR → Day/Night detection

  • PIR Sensor → Motion detection

  • Arduino → Decision making

  • Relay/LED → Light control


2️⃣ Working Principle (Simple)

  1. LDR checks light condition

    • Day → Light OFF

    • Night → System active

  2. PIR sensor detects motion

    • Motion detected → Light ON

    • No motion → Light OFF (after delay)


3️⃣ Block Diagram 




4️⃣ Required Components (Parts Name)

No.Component NameQuantity
1Arduino UNO1
2PIR Motion Sensor (HC-SR501)1
3LDR (Light Dependent Resistor)1
410kΩ Resistor1
5Relay Module (5V) / LED1
6Bulb / Night Light1
7Jumper WiresAs needed
8Breadboard1
9Power Supply / USB Cable1

5️⃣ Pin Connections

🔌 PIR Sensor

PIRArduino
VCC5V
GNDGND
OUTD2

🔌 LDR

  • One end → 5V

  • Other end → A0

  • 10kΩ resistor from A0 → GND

🔌 Relay / LED

RelayArduino
IND8
VCC5V
GNDGND

6️⃣ Arduino Code (FULL & TESTED)

int pirPin = 2; // PIR sensor int ldrPin = A0; // LDR sensor int relayPin = 8; // Relay or LED int ldrValue = 0; int motionState = 0; void setup() { pinMode(pirPin, INPUT); pinMode(relayPin, OUTPUT); Serial.begin(9600); } void loop() { ldrValue = analogRead(ldrPin); motionState = digitalRead(pirPin); Serial.print("LDR Value: "); Serial.println(ldrValue); // Night condition (adjust value if needed) if (ldrValue < 500) { if (motionState == HIGH) { digitalWrite(relayPin, HIGH); // Light ON Serial.println("Motion Detected - Light ON"); } else { digitalWrite(relayPin, LOW); // Light OFF Serial.println("No Motion - Light OFF"); } } else { digitalWrite(relayPin, LOW); // Daytime Serial.println("Daytime - Light OFF"); } delay(500); }

7️⃣ Output & Result

✅ Light turns ON only at night
✅ Light turns ON only when motion is detected
✅ Saves electricity
✅ Fully automatic security system

Miniature IoT Water TDS & Level Monitor Cum Controller (Arduino / ESP8266 | IoT | Smart Water Management))

 Title:

👉 IoT Based Water TDS and Level Monitoring with Automatic Pump Controller

Objective:
To continuously monitor water quality (TDS) and water level, display values locally and on mobile/cloud, and automatically control a water pump based on level & quality thresholds.

Why this project matters:


2️⃣ SYSTEM FEATURES

✅ Real-time TDS (ppm) monitoring
✅ Water level sensing (Low / Medium / High)
Automatic motor ON/OFF
IoT dashboard (Blynk / ThingSpeak)
✅ Mobile alerts
✅ Compact miniature working model


3️⃣ BLOCK DIAGRAM 



4️⃣ HARDWARE REQUIREMENTS

ComponentQuantity
ESP8266 NodeMCU (recommended)1
TDS Sensor Module1
Water Level Sensor (or Float Switch)1
Relay Module (5V)1
Mini Water Pump1
16x2 LCD (I2C)1
Jumper WiresAs needed
5V Power Supply1
Mini Tank / Bottle1

5️⃣ PIN CONNECTIONS (NodeMCU)

🔌 TDS Sensor

TDS ModuleNodeMCU
AOA0
VCC3.3V
GNDGND

🔌 Water Level Sensor

SensorNodeMCU
SignalD5
VCC3.3V
GNDGND

🔌 Relay Module

RelayNodeMCU
IND6
VCCVIN
GNDGND

🔌 LCD (I2C)

LCDNodeMCU
SDAD2
SCLD1

6️⃣ WORKING LOGIC

  • If Water Level LOW → Pump ON

  • If Water Level HIGH → Pump OFF

  • If TDS > Limit (e.g. 500 ppm) → Alert

  • Data sent to IoT App


7️⃣ ARDUINO / ESP8266 CODE (FULL)

#define BLYNK_PRINT Serial #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> #include <LiquidCrystal_I2C.h> char auth[] = "Your_Blynk_Auth"; char ssid[] = "WiFi_Name"; char pass[] = "WiFi_Password"; LiquidCrystal_I2C lcd(0x27, 16, 2); #define TDS_PIN A0 #define LEVEL_PIN D5 #define RELAY_PIN D6 int tdsValue = 0; void setup() { Serial.begin(9600); pinMode(LEVEL_PIN, INPUT); pinMode(RELAY_PIN, OUTPUT); digitalWrite(RELAY_PIN, HIGH); lcd.init(); lcd.backlight(); Blynk.begin(auth, ssid, pass); } void loop() { Blynk.run(); int level = digitalRead(LEVEL_PIN); tdsValue = analogRead(TDS_PIN); int ppm = map(tdsValue, 0, 1023, 0, 1000); lcd.setCursor(0,0); lcd.print("TDS:"); lcd.print(ppm); lcd.print(" ppm "); lcd.setCursor(0,1); if(level == LOW){ lcd.print("Tank: LOW "); digitalWrite(RELAY_PIN, LOW); } else { lcd.print("Tank: FULL "); digitalWrite(RELAY_PIN, HIGH); } Blynk.virtualWrite(V0, ppm); Blynk.virtualWrite(V1, level); delay(1000); }

8️⃣ IoT MOBILE APP (BLYNK)

Widgets:

  • Gauge → TDS Value (V0)

  • LED → Water Level (V1)

  • Button → Manual Pump Control (optional)