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

RFID Based Door Lock System using Arduino UNO


 In today’s digital era, security is a major concern for homes, offices, and institutions. The RFID Based Door Lock System using Arduino UNO is a smart and efficient solution that replaces traditional keys with contactless RFID cards or tags. This system provides enhanced security, ease of use, and reliability at a low cost.

The core of the project is the Arduino UNO microcontroller, which controls the entire system. An RFID reader (such as MFRC522) scans the RFID card and reads its unique identification number (UID). When a user brings an authorized RFID card near the reader, the Arduino compares the scanned UID with the stored authorized UID. If the card is valid, the Arduino activates a servo motor or electronic lock to open the door. If the card is unauthorized, access is denied and a buzzer or alert can be triggered.

This system is widely used in modern access control applications because it is fast, secure, and does not require physical contact. It also reduces the risk of key duplication. The RFID door lock system can be further enhanced by adding features such as LCD displays, IoT connectivity, GSM alerts, or fingerprint verification. Overall, this project is an excellent example of how embedded systems can be used to create smart security solutions.


Components Required

ComponentQuantity
Arduino UNO1
RFID Reader (MFRC522)1
RFID Card / Tag1–2
Servo Motor (SG90)1
Buzzer (optional)1
LED (Green/Red – optional)2
Jumper WiresAs needed
Breadboard1

🔌 Pin Connections

RFID (MFRC522 → Arduino)

RFID PinArduino Pin
SDAD10
SCKD13
MOSID11
MISOD12
RSTD9
VCC3.3V
GNDGND

Servo Motor

Servo WireArduino
Red5V
BrownGND
YellowD3

Buzzer (Optional)

BuzzerArduino
+D4
GND

⚙️ Working Principle

  1. RFID reader scans the card.

  2. Arduino checks the card UID.

  3. ✅ If UID matches → door opens (servo rotates).

  4. ⛔ If UID doesn’t match → buzzer sounds.

  5. Door closes automatically after a delay.


💻 Arduino Code

#include <SPI.h> #include <MFRC522.h> #include <Servo.h> #define SS_PIN 10 #define RST_PIN 9 #define BUZZER 4 MFRC522 rfid(SS_PIN, RST_PIN); Servo door; byte authorizedUID[4] = {0xDE, 0xAD, 0xBE, 0xEF}; // Change to your card UID void setup() { Serial.begin(9600); SPI.begin(); rfid.PCD_Init(); door.attach(3); door.write(0); // Door closed pinMode(BUZZER, OUTPUT); Serial.println("RFID Door Lock Ready..."); } void loop() { if (!rfid.PICC_IsNewCardPresent()) return; if (!rfid.PICC_ReadCardSerial()) return; bool accessGranted = true; for (byte i = 0; i < 4; i++) { if (rfid.uid.uidByte[i] != authorizedUID[i]) { accessGranted = false; break; } } if (accessGranted) { Serial.println("Access Granted"); door.write(90); // Open door delay(3000); door.write(0); // Close door } else { Serial.println("Access Denied"); digitalWrite(BUZZER, HIGH); delay(1000); digitalWrite(BUZZER, LOW); } rfid.PICC_HaltA(); }

📐 Block Diagram (Text)

RFID Card ↓ RFID Reader (MFRC522) ↓ Arduino UNO ↓ ↓ Servo Buzzer (Door) (Alert)

🚪 Applications

  • Home security systems

  • Office access control

  • School/college labs

  • Hotel room locking

  • Smart door systems


Footstep Power Generation Project Using Arduino

 

Project Overview

Footstep Power Generation is a system that converts human walking energy into electrical power using piezoelectric sensors.
Each step produces a small voltage, which is collected, stored, and monitored using Arduino UNO.

🔋 Energy that is normally wasted → converted into usable electricity




🎯 Objectives


🧠 Working Principle (Simple)

When pressure is applied to a piezoelectric sensor, it generates an electrical voltage.

  1. Person steps on tile

  2. Piezo sensors generate AC voltage

  3. Rectifier converts AC → DC

  4. Capacitor smooths voltage

  5. Battery stores energy

  6. Arduino:

    • Measures voltage

    • Counts footsteps

    • Displays data on LCD


🧩 Components Required

🔌 Electronics

  • Arduino UNO

  • Piezoelectric sensors (6–12 pcs)

  • Bridge Rectifier (or 4 × 1N4007 diodes)

  • Capacitor (1000µF / 2200µF)

  • Rechargeable Battery (3.7V Li-ion)

  • TP4056 charging module (recommended)

  • Voltage Divider (10kΩ, 100kΩ)

  • 16×2 LCD (I2C preferred)

  • LEDs

  • Buzzer (optional)

🧱 Mechanical

  • Wooden / acrylic base

  • Rubber sheet / foam

  • Springs (optional)

  • Wires & solder


🔧 Block Diagram (Text)

Footstep Pressure ↓ Piezo Sensors ↓ Bridge Rectifier ↓ Capacitor ↓ Battery ↓ Arduino UNO ↓ ↓ LCD LED / Load

🔌 Circuit Connections

Piezo to Arduino

  • Piezo output → Bridge Rectifier

  • Rectifier + → Capacitor +

  • Capacitor − → GND

  • Voltage divider → A0 (Arduino)

LCD

  • VCC → 5V

  • GND → GND

  • SDA → A4

  • SCL → A5

LED

  • Anode → D8 (via 220Ω)

  • Cathode → GND


🧠 Arduino Code (Working Code)

#include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 16, 2); int piezoPin = A0; int ledPin = 8; int stepCount = 0; void setup() { pinMode(ledPin, OUTPUT); lcd.begin(); lcd.backlight(); lcd.setCursor(0,0); lcd.print("Footstep Power"); } void loop() { int sensorValue = analogRead(piezoPin); float voltage = sensorValue * (5.0 / 1023.0); if (voltage > 2.0) { // Footstep detected stepCount++; digitalWrite(ledPin, HIGH); delay(100); digitalWrite(ledPin, LOW); } lcd.setCursor(0,1); lcd.print("Steps:"); lcd.print(stepCount); lcd.print(" V:"); lcd.print(voltage); delay(200); }

🧱 Mechanical Setup (Very Important)


  • Piezo sensors placed under a flexible tile

  • Rubber sheet on top

  • Foam layer below sensors

  • Wooden base at bottom

This improves:
✅ Power output
✅ Sensor life
✅ Sensitivity


📊 Output Results

  • 1 step ≈ 2–8V (momentary)

  • 100 steps → LED ON

  • 500+ steps → small battery charging

  • LCD shows:

    • Step count

    • Generated voltage


Wireless Audio Transfer Using Laser Light (Arduino UNO)

 This project demonstrates wireless audio transmission using a laser beam.

Audio is converted into an electrical signal, modulated onto a laser, transmitted through air, and received using a light sensor. The Arduino processes the signal and outputs sound to a speaker.








How It Works (Simple Explanation)

Transmitter Side

  1. Audio signal (from phone / mic module) goes into Arduino.

  2. Arduino modulates the audio signal.

  3. Laser diode intensity varies according to the audio signal.

  4. Laser beam carries sound wirelessly.

Receiver Side

  1. LDR / Photodiode detects laser light.

  2. Light changes → electrical signal.

  3. Arduino processes signal.

  4. Amplifier boosts signal.

  5. Speaker outputs sound.


🧩 Components Required

🔴 Transmitter

  • Arduino UNO

  • Laser Diode Module (5V)

  • Audio input (AUX / Microphone module)

  • 10kΩ resistor

  • Breadboard

  • Jumper wires

  • Power supply / USB

🔵 Receiver

  • Arduino UNO

  • LDR or Photodiode

  • LM386 Audio Amplifier

  • 8Ω Speaker

  • 10kΩ resistor

  • Capacitors (10µF, 100nF)

  • Breadboard & wires


🔌 Circuit Diagram (Text Representation)

Transmitter Circuit

Audio Signal ----> A0 (Arduino) Laser + ----> D9 (PWM) Laser - ----> GND

Receiver Circuit

LDR One End ----> A0 (Arduino) LDR Other End ----> 5V 10kΩ Resistor ----> A0 to GND Arduino D9 ----> LM386 Input LM386 Output ----> Speaker

 Arduino Code

🔴 Transmitter Code

const int audioPin = A0; const int laserPin = 9; void setup() { pinMode(laserPin, OUTPUT); } void loop() { int audioValue = analogRead(audioPin); int pwmValue = map(audioValue, 0, 1023, 0, 255); analogWrite(laserPin, pwmValue); }

🔵 Receiver Code

const int ldrPin = A0; const int speakerPin = 9; void setup() { pinMode(speakerPin, OUTPUT); } void loop() { int lightValue = analogRead(ldrPin); int pwmValue = map(lightValue, 0, 1023, 0, 255); analogWrite(speakerPin, pwmValue); }

📈 Applications


 

🔷 Project Overview

This system allows an ambulance to send an emergency alert wirelessly using LoRa to nearby traffic junction control units, which then automatically clear the path by turning traffic lights green and displaying emergency messages.

LoRa is used because it supports:

  • Long-range communication (2–10 km)

  • Low power

  • No internet required





🔷 System Block Diagram (Concept)

[ Ambulance Unit ] Button → Arduino → LoRa TX ))))))) LoRa RX → Arduino → LCD ↓ Traffic Lights

🔧 Hardware Components

🚑 Ambulance Unit (Transmitter)

🚦 Traffic Control Unit (Receiver)

  • Arduino UNO

  • LoRa Module (SX1278 / RA-02)

  • 16x2 LCD (I2C or normal)

  • Red, Yellow, Green LEDs (Traffic lights)

  • Buzzer


🔌 LoRa Module Pin Connections (SX1278)

LoRa PinArduino UNO
VCC3.3V ⚠️
GNDGND
NSSD10
MOSID11
MISOD12
SCKD13
DIO0D2

⚠️ Do NOT connect LoRa to 5V


🚑 TRANSMITTER CODE (Ambulance Unit)

#include <SPI.h> #include <LoRa.h> #define BUTTON 4 #define BUZZER 5 void setup() { pinMode(BUTTON, INPUT_PULLUP); pinMode(BUZZER, OUTPUT); Serial.begin(9600); LoRa.setPins(10, 9, 2); // NSS, RESET, DIO0 if (!LoRa.begin(433E6)) { Serial.println("LoRa Failed!"); while (1); } Serial.println("Ambulance LoRa Ready"); } void loop() { if (digitalRead(BUTTON) == LOW) { digitalWrite(BUZZER, HIGH); LoRa.beginPacket(); LoRa.print("EMERGENCY_AMBULANCE"); LoRa.endPacket(); Serial.println("Emergency Sent"); delay(2000); digitalWrite(BUZZER, LOW); } }

🚦 RECEIVER CODE (Traffic Control Unit)

#include <SPI.h> #include <LoRa.h> #include <LiquidCrystal.h> LiquidCrystal lcd(7, 6, 5, 4, 3, 2); #define RED 8 #define YELLOW 9 #define GREEN 10 #define BUZZER 11 void setup() { pinMode(RED, OUTPUT); pinMode(YELLOW, OUTPUT); pinMode(GREEN, OUTPUT); pinMode(BUZZER, OUTPUT); lcd.begin(16, 2); lcd.print("Traffic System"); Serial.begin(9600); LoRa.setPins(10, 9, 2); if (!LoRa.begin(433E6)) { lcd.print("LoRa Failed"); while (1); } } void loop() { int packetSize = LoRa.parsePacket(); if (packetSize) { String message = ""; while (LoRa.available()) { message += (char)LoRa.read(); } Serial.println(message); if (message == "EMERGENCY_AMBULANCE") { lcd.clear(); lcd.print("EMERGENCY!"); lcd.setCursor(0, 1); lcd.print("CLEAR PATH"); digitalWrite(RED, LOW); digitalWrite(YELLOW, LOW); digitalWrite(GREEN, HIGH); digitalWrite(BUZZER, HIGH); delay(8000); // Path cleared time digitalWrite(GREEN, LOW); digitalWrite(RED, HIGH); digitalWrite(BUZZER, LOW); } } }

⚙️ Working Explanation (Step-by-Step)

  1. Ambulance driver presses emergency button

  2. Arduino sends EMERGENCY_AMBULANCE message via LoRa

  3. Receiver unit receives alert

  4. Traffic light turns GREEN

  5. LCD shows EMERGENCY – CLEAR PATH

  6. After ambulance passes, normal traffic resumes








🏥 Applications

  • Smart traffic systems

  • Emergency vehicle priority

  • Smart city projects

  • Highway emergency management


🌟 Advantages

✔ Long range (no internet)
✔ Fast response
✔ Low power
✔ Scalable to many junctions


📌 Future Enhancements

Smart Trash Bin Using Arduino UNO

 

Project Idea

A Smart Trash Bin automatically opens its lid when it detects a person’s hand using an ultrasonic sensor. This helps maintain hygiene and is useful in smart cities, homes, schools, and offices..







🔧 Components Required

  1. Arduino UNO

  2. Ultrasonic Sensor (HC-SR04)

  3. Servo Motor (SG90)

  4. Jumper Wires

  5. Breadboard

  6. Dustbin + Lid (mechanical setup)

  7. USB Cable / 5V Power Supply


⚙️ Working Principle

  1. Ultrasonic sensor continuously measures distance.

  2. When a hand/object comes within 15 cm, Arduino detects it.

  3. Arduino rotates the servo motor to open the dustbin lid.

  4. After 3 seconds, the lid closes automatically.


📐 Circuit Diagram (Connection)

HC-SR04 Ultrasonic Sensor ------------------------- VCC → 5V (Arduino) GND → GND TRIG → Digital Pin 9 ECHO → Digital Pin 10 Servo Motor ------------ Red → 5V Brown → GND Yellow → Digital Pin 6

💻 Arduino Code (With Comments)

#include <Servo.h> Servo myServo; // Ultrasonic sensor pins int trigPin = 9; int echoPin = 10; // Servo pin int servoPin = 6; long duration; int distance; void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); myServo.attach(servoPin); myServo.write(0); // Lid closed position Serial.begin(9600); } void loop() { // Send ultrasonic pulse digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // Read echo pulse duration = pulseIn(echoPin, HIGH); // Calculate distance in cm distance = duration * 0.034 / 2; Serial.print("Distance: "); Serial.println(distance); // If object detected within 15 cm if (distance > 0 && distance <= 15) { myServo.write(90); // Open lid delay(3000); // Keep open myServo.write(0); // Close lid } delay(500); }




📌 Applications


📈 Advantages

✔ Touchless operation
✔ Low cost
✔ Easy to build
✔ Hygienic solution

AI Smart Parking System with Number Plate Recognition

 

PROJECT TITLE

AI-Based Smart Parking System with Automatic Number Plate Recognition Using Arduino and OpenCV




2️⃣ ABSTRACT

The rapid growth of vehicles has created serious parking management problems in urban areas. This project proposes an AI-based Smart Parking System that automatically detects vehicle number plates, manages parking slots, and controls entry/exit gates. The system uses OpenCV and OCR for number plate recognition and Arduino with sensors for slot detection and gate automation. Parking data is stored on a cloud server for real-time monitoring. This system reduces human effort, prevents unauthorized parking, and supports smart city infrastructure.


3️⃣ OBJECTIVES

  • To automatically recognize vehicle number plates

  • To detect parking slot availability

  • To control parking gate automatically

  • To store entry and exit data in the cloud

  • To reduce traffic congestion and manual work


4️⃣ HARDWARE REQUIREMENTS

ComponentQuantity
Arduino UNO / ESP321
ESP32-CAM / USB Camera1
IR Sensors4
Servo Motor (Gate)1
16×2 LCD1
Buzzer1
Breadboard & Jumper WiresAs required
Power Supply (5V)1

5️⃣ SOFTWARE REQUIREMENTS

  • Arduino IDE

  • Python 3

  • OpenCV

  • Tesseract OCR

  • Firebase / ThingSpeak (optional)


6️⃣ SYSTEM BLOCK DIAGRAM (TEXT)

Vehicle ↓ Camera → OpenCV + OCR (AI) ↓ Recognized Number Plate ↓ Arduino Controller ↓ IR Sensors → Slot Status ↓ Servo Motor (Gate) ↓ LCD Display + Cloud Server

7️⃣ CIRCUIT CONNECTIONS

IR Sensors

  • IR1 → Arduino D2

  • IR2 → Arduino D3

  • IR3 → Arduino D4

  • IR4 → Arduino D5

Servo Motor

  • Signal → D9

  • VCC → 5V

  • GND → GND

LCD (16×2)

  • RS → D7

  • EN → D8

  • D4–D7 → D10–D13

Buzzer

  • Positive → D6

  • Negative → GND


8️⃣ WORKING PRINCIPLE

  1. Vehicle arrives at parking gate

  2. Camera captures vehicle image

  3. AI processes image using OpenCV

  4. OCR extracts number plate text

  5. Arduino checks parking slot availability

  6. If slot available → gate opens

  7. If full → buzzer alert + LCD message

  8. Entry data stored in cloud


9️⃣ AI NUMBER PLATE RECOGNITION STEPS

  • Image capture

  • Grayscale conversion

  • Noise removal

  • Edge detection

  • Contour detection

  • Character segmentation

  • OCR text extraction


🔟 ARDUINO CODE (GATE + SLOT CONTROL)

#include <Servo.h> #include <LiquidCrystal.h> Servo gate; LiquidCrystal lcd(7,8,10,11,12,13); int ir1 = 2; int ir2 = 3; int ir3 = 4; int ir4 = 5; int buzzer = 6; void setup() { gate.attach(9); lcd.begin(16,2); pinMode(ir1, INPUT); pinMode(ir2, INPUT); pinMode(ir3, INPUT); pinMode(ir4, INPUT); pinMode(buzzer, OUTPUT); gate.write(0); lcd.print("Smart Parking"); } void loop() { int slots = digitalRead(ir1)+digitalRead(ir2)+ digitalRead(ir3)+digitalRead(ir4); lcd.setCursor(0,1); lcd.print("Free Slots:"); lcd.print(slots); if(slots > 0) { gate.write(90); digitalWrite(buzzer, LOW); } else { gate.write(0); digitalWrite(buzzer, HIGH); lcd.clear(); lcd.print("Parking Full"); delay(2000); } }

🔟 PYTHON AI CODE (NUMBER PLATE RECOGNITION)

import cv2 import pytesseract pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe' img = cv2.imread("car.jpg") gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) plate_text = pytesseract.image_to_string(gray, config='--psm 8') print("Vehicle Number:", plate_text) cv2.imshow("Image", gray) cv2.waitKey(0)

11️⃣ FLOWCHART (TEXT)

Start

Vehicle Detected

Capture Image

Recognize Number Plate

Check Slot Availability

Slot Available?
→ Yes → Open Gate
→ No → Display FULL

Store Data

Stop


12️⃣ ADVANTAGES

  • Fully automatic system

  • Reduces manpower

  • Accurate parking management

  • Smart city compatible

  • Scalable and secure


13️⃣ APPLICATIONS

  • Shopping malls

  • Airports

  • Hospitals

  • Offices

  • Smart cities


14️⃣ FUTURE SCOPE

  • Mobile app integration

  • Payment gateway

  • Face recognition

  • EV charging slot detection

  • Cloud analytics


15️⃣ CONCLUSION

The AI Smart Parking System efficiently manages parking spaces using artificial intelligence and IoT technology. The system reduces traffic congestion, improves security, and provides a smart solution for modern parking problems.

Automatic Power Source Selector (Mains / Solar / Generator) using Arduino

 

🎯 Project Objective

To automatically switch the load to the available power source in the following priority order:

  1. Mains Power (Highest Priority)

  2. Solar Inverter

  3. Generator (Backup)

No manual switching required.


🧠 Working Principle (Simple)

  • Arduino continuously checks voltage availability of:

    • Mains

    • Solar Inverter

    • Generator

  • Based on priority:

    • If Mains ON → Load connects to Mains

    • Else if Solar ON → Load connects to Solar

    • Else if Generator ON → Load connects to Generator

  • Switching is done using relay modules







🧩 Required Components

ComponentQuantity
Arduino UNO / Nano1
5V Relay Module (3-Channel)1
AC Voltage Sensor / Optocoupler (PC817)3
Resistors (1k, 10k)As needed
Diodes (1N4007)3
LED Indicators3
Buzzer (Optional)1
AC Sources (Mains, Solar, Generator)
Load (Bulb/Fan)1

🔄 System Block Diagram

MAINS AC ──┐ │ SOLAR AC ──┼──> Voltage Sensors ──> Arduino UNO │ GENERATOR ─┘ Arduino Outputs │ ├── Relay 1 → Mains ├── Relay 2 → Solar └── Relay 3 → Generator Selected Source ──> LOAD

⚡ Circuit Diagram (Text Representation)

MAINS AC ----[Optocoupler]---- D2 (Arduino) SOLAR AC ----[Optocoupler]---- D3 (Arduino) GEN AC ----[Optocoupler]---- D4 (Arduino) Arduino D8 ---- Relay 1 (Mains) Arduino D9 ---- Relay 2 (Solar) Arduino D10 --- Relay 3 (Generator) Relay COM → Load Relay NO → Respective Power Source

Important:
Never connect AC directly to Arduino. Use Optocouplers / Voltage Sensors only.


🧑‍💻 Arduino Code (Working)

// Auto Power Source Switching System int mainsPin = 2; int solarPin = 3; int genPin = 4; int relayMains = 8; int relaySolar = 9; int relayGen = 10; void setup() { pinMode(mainsPin, INPUT); pinMode(solarPin, INPUT); pinMode(genPin, INPUT); pinMode(relayMains, OUTPUT); pinMode(relaySolar, OUTPUT); pinMode(relayGen, OUTPUT); digitalWrite(relayMains, LOW); digitalWrite(relaySolar, LOW); digitalWrite(relayGen, LOW); } void loop() { int mains = digitalRead(mainsPin); int solar = digitalRead(solarPin); int gen = digitalRead(genPin); if (mains == HIGH) { switchMains(); } else if (solar == HIGH) { switchSolar(); } else if (gen == HIGH) { switchGenerator(); } else { allOff(); } } void switchMains() { digitalWrite(relayMains, HIGH); digitalWrite(relaySolar, LOW); digitalWrite(relayGen, LOW); } void switchSolar() { digitalWrite(relayMains, LOW); digitalWrite(relaySolar, HIGH); digitalWrite(relayGen, LOW); } void switchGenerator() { digitalWrite(relayMains, LOW); digitalWrite(relaySolar, LOW); digitalWrite(relayGen, HIGH); } void allOff() { digitalWrite(relayMains, LOW); digitalWrite(relaySolar, LOW); digitalWrite(relayGen, LOW); }



 Example Scenario

MainsSolarGeneratorOutput
ONONONMains
OFFONONSolar
OFFOFFONGenerator
OFFOFFOFFPower OFF

📌 Applications

  • Home UPS systems

  • Solar power systems

  • Industries & factories

  • Hospitals

  • Rural electrification