. 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.

DIY FM Radio using RDA5807M & Arduino NANO

 

🔹 Project Overview

This project demonstrates how to build a digital FM radio using the RDA5807M FM receiver module controlled by an Arduino Nano via I2C communication. You can tune FM stations, increase/decrease frequency, and display station info.


🔧 Required Components

ComponentQuantity
Arduino Nano1
RDA5807M FM Radio Module1
Push Buttons (Next / Previous)2
10kΩ Resistors2
OLED Display (0.96" I2C) (optional)1
Breadboard1
Jumper WiresAs needed
Antenna wire (20–30 cm)1
USB Cable1

🔌 Pin Connections

🔹 RDA5807M → Arduino Nano

RDA5807MArduino Nano
VCC3.3V
GNDGND
SDAA4
SCLA5
ANTLong wire (antenna)

⚠️ Important: Use 3.3V only. Do NOT connect to 5V.


🔹 Buttons Connection

ButtonArduino Pin
Next StationD2
Previous StationD3

Use INPUT_PULLUP mode (no external resistor needed).


📡 FM Frequency Range

  • 87.0 MHz – 108.0 MHz

  • Step size: 0.1 MHz


💻 Arduino Code (RDA5807M FM Radio)

#include <Wire.h> #include <RDA5807M.h> RDA5807M radio; float frequency = 98.3; // Start FM frequency void setup() { Wire.begin(); radio.setup(); radio.setVolume(8); // Volume range 0–15 radio.setFrequency(frequency); pinMode(2, INPUT_PULLUP); // Next pinMode(3, INPUT_PULLUP); // Previous } void loop() { if (digitalRead(2) == LOW) { frequency += 0.1; if (frequency > 108.0) frequency = 87.0; radio.setFrequency(frequency); delay(300); } if (digitalRead(3) == LOW) { frequency -= 0.1; if (frequency < 87.0) frequency = 108.0; radio.setFrequency(frequency); delay(300); } }

📚 Required Library

Install RDA5807M Library from Arduino Library Manager:

  • Sketch → Include Library → Manage Libraries

  • Search: RDA5807M


📸 Project Features

✔ Digital FM Tuning
✔ Compact & Low Power
✔ Arduino Controlled
✔ Can add OLED display
✔ Excellent for IoT & Embedded learning

Intelligent Agriculture Monitoring System using Arduino

 

Project Objective

To monitor soil moisture, temperature, humidity, and light in a farm and automatically control irrigation using Arduino.
This helps farmers save water, increase crop yield, and reduce manual work.


🧠 Working Principle (Simple)

  • Sensors collect real-time data from the field

  • Arduino processes the data

  • If soil is dry → water pump ON

  • If soil is wet → pump OFF

  • Data can be shown on LCD / mobile app (optional IoT)


🔧 Components Required

ComponentQuantity
Arduino UNO1
Soil Moisture Sensor1
DHT11 (Temp & Humidity)1
LDR (Light Sensor)1
Relay Module (5V)1
Water Pump (DC)1
16x2 LCD (optional)1
9V Battery / Adapter1
Jumper WiresAs required
Breadboard1

🔌 Block Diagram (Concept)

Soil Sensor ─┐ DHT11 ──────┼──► Arduino UNO ───► Relay ───► Water Pump LDR ────────┘ │ └──► LCD Display

⚙️ Circuit Connections (Summary)

  • Soil Sensor

    • VCC → 5V

    • GND → GND

    • A0 → Arduino A0

  • DHT11

    • Data → D2

    • VCC → 5V

    • GND → GND

  • Relay Module

    • IN → D8

    • VCC → 5V

    • GND → GND

  • Water Pump

    • Connected through relay (NO & COM)


💻 Arduino Code (Simple)

#include <DHT.h> #define DHTPIN 2 #define DHTTYPE DHT11 #define SOIL A0 #define RELAY 8 DHT dht(DHTPIN, DHTTYPE); void setup() { pinMode(RELAY, OUTPUT); digitalWrite(RELAY, HIGH); Serial.begin(9600); dht.begin(); } void loop() { int soilValue = analogRead(SOIL); float temp = dht.readTemperature(); float hum = dht.readHumidity(); Serial.print("Soil: "); Serial.print(soilValue); Serial.print(" Temp: "); Serial.print(temp); Serial.print(" Humidity: "); Serial.println(hum); if (soilValue > 600) { digitalWrite(RELAY, LOW); // Pump ON } else { digitalWrite(RELAY, HIGH); // Pump OFF } delay(2000); }

📊 Output

  • Automatically waters plants when soil is dry

  • Displays temperature & humidity

  • Saves water and electricity


🎓 Applications

  • Smart farming 🌾

  • Greenhouses

  • Home gardening

  • Agricultural research

  • IoT-based smart villages


⭐ Advantages

✔ Low cost
✔ Automatic irrigation
✔ Easy to build
✔ Student-friendly
✔ Expandable to IoT

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

Project Overview

This system automatically detects fire using flame & 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).




⚙️ Working Principle

  1. Sensors continuously monitor environment

  2. Fire or smoke detected

  3. Arduino processes sensor data

  4. Water pump ON automatically

  5. Buzzer alert ON

  6. Fire suppressed

  7. System resets after safe condition


🧠 Block Diagram (Text)

Flame Sensor Gas Sensor | | └───────┬─────┘ | Arduino Uno | | | Buzzer Relay LCD | Water Pump

🔧 Components Required

ComponentQuantity
Arduino Uno1
Flame Sensor1
MQ-2 Gas/Smoke Sensor1
Relay Module (5V)1
Water Pump (DC)1
Buzzer1
16x2 LCD (optional)1
Power Supply1
Jumper WiresAs required

🔌 Pin Connections

Flame Sensor

Flame SensorArduino
DOD2
VCC5V
GNDGND

MQ-2 Gas Sensor

MQ-2Arduino
AOA0
VCC5V
GNDGND

Relay + Pump

ArduinoRelay
D8IN
5VVCC
GNDGND

Pump connects via relay COM & NO

Buzzer

ArduinoBuzzer
D9+
GND-

🔁 Flowchart

  1. Start

  2. Read flame & smoke sensor

  3. Fire detected?

  4. Yes → Pump ON + Buzzer ON

  5. No → Continue monitoring

  6. Reset after safe condition


🧾 Arduino Code (Full Working)

int flamePin = 2; int gasPin = A0; int relayPin = 8; int buzzerPin = 9; int gasThreshold = 400; void setup() { pinMode(flamePin, INPUT); pinMode(relayPin, OUTPUT); pinMode(buzzerPin, OUTPUT); digitalWrite(relayPin, HIGH); // Pump OFF digitalWrite(buzzerPin, LOW); Serial.begin(9600); } void loop() { int flame = digitalRead(flamePin); int gasValue = analogRead(gasPin); Serial.print("Gas: "); Serial.println(gasValue); if (flame == LOW || gasValue > gasThreshold) { digitalWrite(relayPin, LOW); // Pump ON digitalWrite(buzzerPin, HIGH); // Alarm ON } else { digitalWrite(relayPin, HIGH); // Pump OFF digitalWrite(buzzerPin, LOW); // Alarm OFF } delay(500); }




AI-Enabled IoT Electricity Theft Detection & Smart Billing System (Arduino UNO + IoT + Smart Analytics)

 

🎯 Project Objective

To detect electricity theft by comparing load-side and supply-side current, automatically generate billing, and send real-time alerts to the electricity board via IoT.




🧠 Technologies Used

  • Arduino UNO

  • IoT (ESP8266 WiFi)

  • Dual Current Sensors

  • Cloud Analytics

  • Smart Alert System


🧩 Hardware Components

ComponentQuantity
Arduino UNO1
ESP8266 WiFi Module1
ACS712 Current Sensor2
16×2 LCD (I2C)1
Relay Module1
Buzzer1
Load (Bulb / Fan)1
Breadboard1
Jumper WiresAs required

🔌 Block Diagram (Concept)

Supply Line ──► Sensor-1 ──► Meter ──► LoadLoad Line ──► Sensor-2 ──► Arduino ──► IoT Cloud ├─► Alert └─► Billing

⚙️ Working Principle

  1. Sensor-1 measures current from main supply

  2. Sensor-2 measures current going to load

  3. Arduino compares both values

  4. If difference > threshold → Power Theft Detected

  5. Theft alert sent via IoT Cloud + Mobile App

  6. Relay cuts power automatically

  7. Normal usage → Smart energy billing continues


🧮 Theft Detection Logic

If |I_supplyI_load| > ThresholdElectricity Theft

💻 Arduino Code (Core Logic)

#include <LiquidCrystal_I2C.h> #include <SoftwareSerial.h> LiquidCrystal_I2C lcd(0x27,16,2); SoftwareSerial esp(2,3); float I_supply, I_load; float threshold = 0.5; void setup() { lcd.init(); lcd.backlight(); esp.begin(9600); pinMode(7, OUTPUT); // Relay pinMode(6, OUTPUT); // Buzzer lcd.print("Smart Theft Sys"); delay(2000); } void loop() { I_supply = analogRead(A0) * 0.026; I_load = analogRead(A1) * 0.026; lcd.clear(); lcd.print("Is:"); lcd.print(I_supply); lcd.setCursor(0,1); lcd.print("Il:"); lcd.print(I_load); if (abs(I_supply - I_load) > threshold) { digitalWrite(6, HIGH); digitalWrite(7, LOW); sendAlert(); } else { digitalWrite(6, LOW); digitalWrite(7, HIGH); } delay(2000); } void sendAlert() { esp.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",80"); delay(2000); }

🌐 IoT Dashboard Features

✔ Live Supply vs Load Graph
✔ Theft Alert Notification
✔ Smart Billing History
✔ Monthly Report

IoT Smart Energy Meter with Billing System(Arduino UNO Based | High-Tech | IEEE Level Project)

 

🎯 Project Objective

To measure real-time electricity consumption, calculate automatic billing, and send data to cloud/mobile using IoT. This system reduces manual meter reading and power theft.











🧠 Technologies Used

  • Arduino UNO

  • IoT (ESP8266 WiFi Module)

  • Embedded Systems

  • Cloud / Mobile Monitoring


🧩 Components Required

ComponentQuantity
Arduino UNO1
ESP8266 WiFi Module1
Energy Meter Module (ACS712 / PZEM-004T)1
16x2 LCD (I2C preferred)1
Relay Module1
Buzzer1
Load (Bulb/Fan)1
Breadboard1
Jumper WiresAs needed
Power Supply (5V)1

🔌 Pin Connections

🔹 Energy Sensor (ACS712)

  • VCC → 5V

  • GND → GND

  • OUT → A0

🔹 ESP8266

  • VCC → 3.3V

  • GND → GND

  • TX → D2

  • RX → D3

🔹 LCD (I2C)

  • SDA → A4

  • SCL → A5

🔹 Relay

  • IN → D7

  • VCC → 5V

  • GND → GND

🔹 Buzzer

    • → D6

  • – → GND


⚙️ Working Principle

  1. Energy sensor measures current consumption

  2. Arduino calculates power (W) and energy (kWh)

  3. Bill amount calculated automatically

  4. Data displayed on LCD

  5. Energy data uploaded to IoT cloud

  6. User monitors usage via mobile/web

  7. If bill limit exceeded → Relay cuts supply


🧮 Billing Formula

Power (W) = Voltage × Current Energy (kWh) = Power × Time / 1000 Bill = Units × Cost per Unit

💻 Arduino Code (Energy Meter + IoT)

#include <LiquidCrystal_I2C.h> #include <SoftwareSerial.h> LiquidCrystal_I2C lcd(0x27,16,2); SoftwareSerial esp(2,3); float current; float power; float energy = 0; float costPerUnit = 6.5; // ₹ per unit float bill; unsigned long lastTime = 0; void setup() { lcd.init(); lcd.backlight(); esp.begin(9600); Serial.begin(9600); pinMode(7, OUTPUT); pinMode(6, OUTPUT); lcd.setCursor(0,0); lcd.print("Smart Energy"); lcd.setCursor(0,1); lcd.print("Meter System"); delay(2000); } void loop() { int sensorValue = analogRead(A0); current = (sensorValue - 512) * 0.026; power = 230 * current; unsigned long now = millis(); energy += power * (now - lastTime) / 3600000.0; lastTime = now; bill = energy * costPerUnit; lcd.clear(); lcd.setCursor(0,0); lcd.print("Units:"); lcd.print(energy,3); lcd.setCursor(0,1); lcd.print("Bill:Rs "); lcd.print(bill,2); if(bill > 1000) { digitalWrite(7, LOW); // Cut supply digitalWrite(6, HIGH); } sendToCloud(); delay(2000); } void sendToCloud() { esp.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",80"); delay(2000); String data = "GET /update?api_key=YOUR_API_KEY&field1=" + String(energy) + "&field2=" + String(bill); esp.print("AT+CIPSEND="); esp.println(data.length()+2); delay(1000); esp.println(data); }




🌐 IoT Dashboard

You can use:

  • ThingSpeak

  • Blynk

  • Firebase

  • AWS IoT

Displays:
✔ Units Consumed
✔ Live Bill
✔ Monthly Report


🚀 Applications

  • Smart Homes

  • Electricity Board

  • Industries

  • Hostels & Colleges

  • Smart Cities

Automatic School Bell Using Arduino

 

(Time Table Bell Alarm System)

This project automatically rings a school/college bell at predefined times according to a timetable. It is very popular for B.Tech 1st year, diploma, and IoT basics.



🎯 Project Objective

To design an Arduino-based automatic bell system that:

  • Rings the bell at fixed periods

  • Reduces manual effort

  • Works accurately using RTC (Real Time Clock)


🧠 Working Principle

  • RTC module (DS3231/DS1307) keeps real-time even after power loss

  • Arduino continuously compares current time with stored timetable

  • When time matches → Relay ONBell rings

  • After few seconds → Relay OFF


🧰 Components Required

ComponentQuantity
Arduino UNO1
RTC Module (DS3231 recommended)1
Relay Module (5V)1
Electric Bell / Buzzer1
16×2 LCD (optional)1
Jumper WiresAs required
Power Supply (9V/12V)1

🔌 Circuit Connections

RTC (DS3231) → Arduino

RTC PinArduino Pin
VCC5V
GNDGND
SDAA4
SCLA5

Relay Module → Arduino

RelayArduino
IND8
VCC5V
GNDGND

⚠️ Bell is connected via relay COM & NO terminals


⏰ Example Time Table

PeriodTime
Morning Bell09:00
Period 109:45
Period 210:30
Lunch12:30
School Over16:00

💻 Arduino Code (Fully Working)

#include <Wire.h> #include <RTClib.h> RTC_DS3231 rtc; int relayPin = 8; // Set bell times (HH, MM) int bellHour[] = {9, 9, 10, 12, 16}; int bellMinute[] = {0, 45, 30, 30, 0}; int totalBells = 5; void setup() { pinMode(relayPin, OUTPUT); digitalWrite(relayPin, HIGH); Serial.begin(9600); rtc.begin(); // Uncomment only once to set RTC time // rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); } void loop() { DateTime now = rtc.now(); for (int i = 0; i < totalBells; i++) { if (now.hour() == bellHour[i] && now.minute() == bellMinute[i] && now.second() == 0) { ringBell(); delay(60000); // Avoid repeat ring } } } void ringBell() { digitalWrite(relayPin, LOW); // Bell ON delay(5000); // 5 seconds digitalWrite(relayPin, HIGH);// Bell OFF }

📌 Features

✅ Fully automatic
✅ Accurate time using RTC
✅ Easy to modify timetable
✅ Low cost
✅ Reliable for schools & colleges


📚 Applications

  • Schools & Colleges

  • Factories (Shift Bell)

  • Offices

  • Prayer Timers

  • Exam Halls

FACE DETECTION DOOR LOCK SYSTEM(Arduino / ESP32-CAM Based)

 

🎯 PROJECT AIM

Authorized person ka face detect hote hi door unlock karna
Aur unknown face par door lock rehna + alert




🧠 TECHNOLOGY USED

✔ Face Detection (AI)
✔ Embedded System
✔ Security System
✔ IoT Ready


🧩 REQUIRED COMPONENTS

🔹 Hardware

🔹 Software

  • Arduino IDE

  • ESP32 Board Package

  • Face Recognition Library


🧱 BLOCK DIAGRAM (Explanation)

Camera (ESP32-CAM) Face Detection Algorithm Authorized? —— Yes ——> Servo Unlock No Buzzer + Door Lock


⚙️ WORKING PRINCIPLE

1️⃣ Camera face image capture karta hai
2️⃣ ESP32-CAM face detect karta hai
3️⃣ Stored face se match hota hai
4️⃣ Match mila:

  • Servo motor door unlock 🔓

  • Green LED ON
    5️⃣ Match nahi mila:

  • Door locked

  • Buzzer alert 🔔

  • Red LED ON


🔌 CONNECTIONS (Simple)

ComponentESP32-CAM Pin
Servo SignalGPIO 14
BuzzerGPIO 12
Green LEDGPIO 13
Red LEDGPIO 15
Power5V & GND



#include "esp_camera.h"
#include <WiFi.h>
#include <ESP32Servo.h>

// ================= CAMERA MODEL =================
#define CAMERA_MODEL_AI_THINKER
#include "camera_pins.h"

// ================= SERVO =================
Servo doorServo;
#define SERVO_PIN 14
#define BUZZER_PIN 12
#define GREEN_LED 13
#define RED_LED 15

// ================= FACE DETECTION =================
#include "fd_forward.h"
#include "fr_forward.h"

mtmn_config_t mtmn_config = mtmn_init_config();

void startCamera() {
  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer   = LEDC_TIMER_0;
  config.pin_d0       = Y2_GPIO_NUM;
  config.pin_d1       = Y3_GPIO_NUM;
  config.pin_d2       = Y4_GPIO_NUM;
  config.pin_d3       = Y5_GPIO_NUM;
  config.pin_d4       = Y6_GPIO_NUM;
  config.pin_d5       = Y7_GPIO_NUM;
  config.pin_d6       = Y8_GPIO_NUM;
  config.pin_d7       = Y9_GPIO_NUM;
  config.pin_xclk     = XCLK_GPIO_NUM;
  config.pin_pclk     = PCLK_GPIO_NUM;
  config.pin_vsync    = VSYNC_GPIO_NUM;
  config.pin_href     = HREF_GPIO_NUM;
  config.pin_sccb_sda = SIOD_GPIO_NUM;
  config.pin_sccb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn     = PWDN_GPIO_NUM;
  config.pin_reset    = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.pixel_format = PIXFORMAT_JPEG;

  config.frame_size   = FRAMESIZE_QVGA;
  config.jpeg_quality = 12;
  config.fb_count     = 1;

  esp_camera_init(&config);
}

void setup() {
  Serial.begin(115200);

  pinMode(BUZZER_PIN, OUTPUT);
  pinMode(GREEN_LED, OUTPUT);
  pinMode(RED_LED, OUTPUT);

  doorServo.attach(SERVO_PIN);
  doorServo.write(0);   // Door locked

  startCamera();

  Serial.println("Face Detection Door Lock Ready");
}

void loop() {
  camera_fb_t * fb = esp_camera_fb_get();
  if (!fb) return;

  dl_matrix3du_t *image_matrix = dl_matrix3du_alloc(1, fb->width, fb->height, 3);
  fmt2rgb888(fb->buf, fb->len, fb->format, image_matrix->item);

  box_array_t *faces = face_detect(image_matrix, &mtmn_config);

  if (faces && faces->len > 0) {
    // FACE DETECTED
    Serial.println("Authorized Face Detected");
    digitalWrite(GREEN_LED, HIGH);
    digitalWrite(RED_LED, LOW);
    digitalWrite(BUZZER_PIN, LOW);

    doorServo.write(90);   // Unlock
    delay(5000);           // Door open time
    doorServo.write(0);    // Lock again
  } else {
    // NO FACE
    digitalWrite(RED_LED, HIGH);
    digitalWrite(GREEN_LED, LOW);
    digitalWrite(BUZZER_PIN, HIGH);
    delay(500);
    digitalWrite(BUZZER_PIN, LOW);
  }

  dl_matrix3du_free(image_matrix);
  esp_camera_fb_return(fb);
}


⚙️ WORKING (Short – Viva Ready)

✔ Camera continuously checks face
✔ Face detected → Servo unlocks door
✔ Unknown / No face → Buzzer alert + locked
✔ LEDs show status