. 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 TEMPERATURE & HUMIDITY MONITORING SYSTEM

LCD + IoT (ESP32) + SD Card + Buzzer Alert






🧠 Controller Used

ESP32 (Wi-Fi built-in, best choice)


🔧 COMPONENTS

  • ESP32 Dev Module

  • DHT22 (or DHT11)

  • 16×2 LCD with I2C module

  • SD Card Module + SD Card

  • Buzzer

  • 10kΩ resistor

  • Jumper wires


🔌 CONNECTION DIAGRAM (PIN MAPPING)

🌡️ DHT22

DHT22 ESP32 ------------------ VCC -----> 3.3V DATA -----> GPIO 4 GND -----> GND (10between VCC & DATA)

📟 LCD 16×2 (I2C)

LCD (I2C) ESP32 ------------------ VCC -----> 5V GND -----> GND SDA -----> GPIO 21 SCL -----> GPIO 22

📊 SD Card Module (SPI)

SD MODULE ESP32 ------------------ CS -----> GPIO 5 MOSI -----> GPIO 23 MISO -----> GPIO 19 SCK -----> GPIO 18 VCC -----> 5V GND -----> GND

🔔 BUZZER

Buzzer + ----> GPIO 15 Buzzer - ----> GND

⚙️ WORKING

  1. DHT reads temperature & humidity

  2. LCD displays live values

  3. Data stored in SD card (CSV file)

  4. ESP32 sends data to cloud (ThingSpeak)

  5. Buzzer alerts if limit crossed


🔔 ALERT LIMITS

  • Temperature > 35°C

  • Humidity > 80%


💻 FULL ESP32 CODE (READY TO UPLOAD)

#include <DHT.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> #include <SPI.h> #include <SD.h> #include <WiFi.h> #include <HTTPClient.h> // ----------- SETTINGS ------------- #define DHTPIN 4 #define DHTTYPE DHT22 #define BUZZER 15 #define SD_CS 5 LiquidCrystal_I2C lcd(0x27, 16, 2); DHT dht(DHTPIN, DHTTYPE); // WiFi details const char* ssid = "YOUR_WIFI_NAME"; const char* password = "YOUR_WIFI_PASSWORD"; // ThingSpeak String apiKey = "YOUR_THINGSPEAK_API_KEY"; void setup() { Serial.begin(9600); pinMode(BUZZER, OUTPUT); digitalWrite(BUZZER, LOW); lcd.init(); lcd.backlight(); dht.begin(); // SD Card if (!SD.begin(SD_CS)) { lcd.setCursor(0,0); lcd.print("SD Fail!"); } // WiFi WiFi.begin(ssid, password); lcd.setCursor(0,0); lcd.print("Connecting..."); while (WiFi.status() != WL_CONNECTED) { delay(500); } lcd.clear(); } void loop() { float humidity = dht.readHumidity(); float temperature = dht.readTemperature(); if (isnan(humidity) || isnan(temperature)) { return; } // LCD Display lcd.setCursor(0,0); lcd.print("Temp: "); lcd.print(temperature); lcd.print(" C"); lcd.setCursor(0,1); lcd.print("Hum : "); lcd.print(humidity); lcd.print(" %"); // Buzzer Alert if (temperature > 35 || humidity > 80) { digitalWrite(BUZZER, HIGH); } else { digitalWrite(BUZZER, LOW); } // SD Card Logging File dataFile = SD.open("/data.csv", FILE_APPEND); if (dataFile) { dataFile.print(temperature); dataFile.print(","); dataFile.println(humidity); dataFile.close(); } // ThingSpeak Upload if (WiFi.status() == WL_CONNECTED) { HTTPClient http; String url = "http://api.thingspeak.com/update?api_key=" + apiKey + "&field1=" + String(temperature) + "&field2=" + String(humidity); http.begin(url); http.GET(); http.end(); } delay(20000); }

📊 SD CARD FILE (data.csv)

Temperature,Humidity 30.5,60 31.2,62

(Open in Excel 📈)


📟 LCD OUTPUT

Temp: 30.5 C Hum : 60 %

🎓 PROJECT USE

  • Final year project

  • Smart weather station

  • Greenhouse monitoring

  • Server room alert system

ARDUINO-BASED AUTOMATIC WATERING SYSTEM

 An Arduino-based automatic watering system is a smart solution designed to provide water to plants automatically based on their actual needs. In traditional watering methods, plants are often overwatered or underwatered due to lack of monitoring and human error. This not only affects plant growth but also leads to unnecessary water wastage.




1. Block Diagram Explanation

Main Blocks:

  1. Soil Moisture Sensor

    • Measures the moisture level present in the soil

    • Sends analog signal to Arduino

  2. Arduino Uno/Nano

    • Acts as the brain of the system

    • Reads sensor data and makes decisions

  3. Relay Module

    • Works as an electronic switch

    • Turns the water pump ON or OFF safely

  4. Water Pump / Solenoid Valve

    • Supplies water to plants when activated

  5. Power Supply

    • Provides power to Arduino and pump

Signal Flow:
Soil Moisture Sensor → Arduino → Relay → Water Pump


2. Working Principle

  • The soil moisture sensor continuously checks the moisture level of the soil.

  • The sensor sends an analog value to the Arduino.

  • Arduino compares this value with a predefined threshold.

  • If soil is dry:
    → Arduino activates the relay
    → Relay turns ON the water pump

  • If soil is wet enough:
    → Arduino deactivates the relay
    → Water pump turns OFF

This process runs automatically without human intervention, ensuring optimal watering and water conservation.


3. Components List

No.Component NameQuantity
1Arduino Uno / Nano1
2Soil Moisture Sensor Module1
3Relay Module (5V)1
4DC Water Pump / Solenoid Valve1
5Connecting Wires (Jumper wires)As required
6Power Supply (5V & 12V)1
7Water PipeAs required

(Optional: LCD, LED indicator, buzzer)


4. Arduino Code (Automatic Watering System)

// Arduino Automatic Watering System int sensorPin = A0; // Soil moisture sensor pin int relayPin = 7; // Relay control pin int moistureValue = 0; int threshold = 500; // Adjust according to soil void setup() { pinMode(relayPin, OUTPUT); digitalWrite(relayPin, HIGH); // Relay OFF (active LOW) Serial.begin(9600); } void loop() { moistureValue = analogRead(sensorPin); Serial.print("Soil Moisture Value: "); Serial.println(moistureValue); if (moistureValue > threshold) { // Soil is dry digitalWrite(relayPin, LOW); // Pump ON Serial.println("Pump ON"); } else { // Soil is wet digitalWrite(relayPin, HIGH); // Pump OFF Serial.println("Pump OFF"); } delay(1000); // 1 second delay }

Arduino Human Following Robot Project

 

The Human Following Robot uses ultrasonic sensors to detect a person and automatically follows them while maintaining a safe distance. The robot moves forward, left, right, or stops based on human position.


🔧 Components Required

  • Arduino UNO

  • Ultrasonic Sensor HC-SR04 (1 or 2 sensors)

  • Motor Driver L298N

  • DC Motors × 2

  • Robot Chassis + Wheels

  • 12V Battery / Power Bank

  • Jumper Wires

  • Breadboard

(Optional: IR sensors for better accuracy)


⚙️ Working Principle

  1. Ultrasonic sensor emits ultrasonic waves.

  2. Waves reflect from the human body.

  3. Arduino calculates distance.

  4. Based on distance:

    • Too far → Move Forward

    • Too close → Stop

    • Left detected → Turn Left

    • Right detected → Turn Right


📐 Distance Formula

Distance (cm) = (Time × 0.034) / 2

🔌 Circuit Connections

HC-SR04 → Arduino

HC-SR04Arduino
VCC5V
TrigD9
EchoD10
GNDGND

L298N Motor Driver → Arduino

L298N PinArduino
IN1D2
IN2D3
IN3D4
IN4D5
ENA5V
ENB5V
GNDGND

💻 Arduino Code

#define trigPin 9 #define echoPin 10 #define IN1 2 #define IN2 3 #define IN3 4 #define IN4 5 long duration; int distance; void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); Serial.begin(9600); } void loop() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = duration * 0.034 / 2; Serial.println(distance); if (distance > 20 && distance < 60) { moveForward(); } else if (distance <= 20) { stopRobot(); } else { stopRobot(); } } void moveForward() { digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); } void stopRobot() { digitalWrite(IN1, LOW); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, LOW); }

📊 Output Behavior

DistanceRobot Action
> 60 cmStop
20–60 cmFollow Human
< 20 cmStop

🚀 Applications

  • Assistant robots

  • Service robots

  • Surveillance robots

  • Smart shopping carts

  • Robotics learning projects

Arduino Distance Measurement Using Ultrasonic Sensor (HC-SR04) and LCD

 This project measures the distance of an object using the HC-SR04 ultrasonic sensor and displays the distance in centimeters on a 16×2 LCD. It works on the principle of ultrasonic sound wave reflection.




🔧 Components Required

  • Arduino UNO

  • Ultrasonic Sensor HC-SR04

  • 16×2 LCD

  • 10kΩ Potentiometer (for LCD contrast)

  • Breadboard

  • Jumper wires

  • USB cable


⚙️ Working Principle

  1. The Trigger pin sends an ultrasonic pulse.

  2. The pulse hits an object and reflects back.

  3. The Echo pin receives the reflected signal.

  4. Arduino calculates distance using time delay.

  5. Distance is displayed on the LCD.

📐 Distance Formula:

Distance (cm) = (Time × Speed of Sound) / 2 Speed of sound = 0.034 cm/µs

🔌 Circuit Connections

HC-SR04 → Arduino

HC-SR04 PinArduino Pin
VCC5V
TrigD9
EchoD10
GNDGND

LCD → Arduino

LCD PinArduino Pin
RSD7
ED6
D4D5
D5D4
D6D3
D7D2
VSSGND
VDD5V
V0Potentiometer
RWGND

💻 Arduino Code

#include <LiquidCrystal.h> LiquidCrystal lcd(7, 6, 5, 4, 3, 2); const int trigPin = 9; const int echoPin = 10; long duration; int distance; void setup() { lcd.begin(16, 2); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); lcd.print("Distance Meter"); delay(2000); lcd.clear(); } void loop() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = duration * 0.034 / 2; lcd.setCursor(0, 0); lcd.print("Distance:"); lcd.setCursor(0, 1); lcd.print(distance); lcd.print(" cm "); delay(500); }

📊 Output

  • LCD displays real-time distance in centimeters

  • Measurement range: 2 cm to 400 cm

  • Accuracy: ±3 mm

Arduino-Based Morse Code (CW) Keyer for Ham Radio

 

 Project Description

This project implements an automatic Morse Code (CW) keyer using an Arduino UNO. The keyer generates precise Morse code timing and sends keying signals to a ham radio transmitter. It supports adjustable speed (WPM) and clean keying, which is difficult to achieve manually.

This is one of the most popular and practical ham radio microcontroller projects.



 




3. Why This Is a Good Final-Year Project

✔ Real-world ham radio application
✔ Combines embedded systems + communication
✔ Simple hardware, strong concept
✔ Easy to demonstrate in viva
✔ Expandable (LCD, memory, Bluetooth)


4. Applications

  • CW (Morse) transmission

  • Learning Morse code

  • Contesting and portable radio operations

  • Embedded timing control demonstration


5. Hardware Components Required

ComponentQuantity
Arduino UNO1
Push Button / Paddle1 or 2
10k Potentiometer (Speed Control)1
NPN Transistor (2N2222)1
1k Resistor1
Buzzer (Optional)1
5V Supply1
Connecting WiresAs needed

6. Circuit Connections

Input Section

  • Paddle / Button

    • One side → Arduino D2

    • Other side → GND

  • Speed Control Potentiometer

    • Middle pin → A0

    • Side pins → 5V & GND

Output (Keying Circuit)

  • Arduino D9 → 1kΩ resistor → Transistor base

  • Transistor emitter → GND

  • Transistor collector → Radio KEY input

  • Radio GND → Arduino GND

(This isolates Arduino from the radio safely)


7. Block Diagram (Text)

Paddle/Button ──► Arduino UNO ──► Transistor ──► Radio KEY Input │ Potentiometer (Speed)

8. Working Principle

  1. Operator presses the paddle/button

  2. Arduino reads the input signal

  3. Potentiometer sets Morse speed (WPM)

  4. Arduino generates DIT (.) and DAH (-) timing

  5. Output pin keys the transmitter via transistor

  6. Clean CW signal is transmitted


9. Arduino Code (Complete & Working)

#define KEY_INPUT 2 #define KEY_OUTPUT 9 #define SPEED_POT A0 int ditTime; void setup() { pinMode(KEY_INPUT, INPUT_PULLUP); pinMode(KEY_OUTPUT, OUTPUT); digitalWrite(KEY_OUTPUT, LOW); } void loop() { int potValue = analogRead(SPEED_POT); ditTime = map(potValue, 0, 1023, 50, 200); // Morse speed if (digitalRead(KEY_INPUT) == LOW) { sendDit(); } } void sendDit() { digitalWrite(KEY_OUTPUT, HIGH); delay(ditTime); // DIT duration digitalWrite(KEY_OUTPUT, LOW); delay(ditTime); // Inter-element gap } void sendDah() { digitalWrite(KEY_OUTPUT, HIGH); delay(ditTime * 3); // DAH duration digitalWrite(KEY_OUTPUT, LOW); delay(ditTime); }

10. Testing Procedure

  1. Upload code to Arduino

  2. Rotate potentiometer to change speed

  3. Press paddle/button

  4. Observe keying LED / buzzer

  5. Connect to radio KEY input (low power test)


11. Advantages

  • Accurate Morse timing

  • Easy speed adjustment

  • Low-cost and portable

  • Improves transmission quality


12. Limitations

  • Single paddle version

  • No LCD feedback

  • Manual character input


13. Future Enhancements

  • Iambic dual-paddle support

  • LCD showing WPM

  • Memory keyer (store messages)

  • Bluetooth control via mobile

  • USB keyboard Morse input


14. Conclusion

The Arduino-Based CW Keyer is a reliable and educational ham radio project that demonstrates real-time embedded control, making it ideal for final-year engineering projects and amateur radio applications.

Arduino-Based Automatic Writing Machine

 

1. Project Overview

The Arduino Writing Machine is an automated system capable of writing text or drawing shapes on paper using a pen. The machine uses stepper motors to move the pen along the X and Y axes and a servo motor to lift or place the pen on the paper. The entire system is controlled by an Arduino UNO, which receives predefined text or drawing instructions.

This project demonstrates the practical application of embedded systems, motion control, and automation.









2. Objectives

  • To design an automatic writing system using Arduino

  • To convert text or characters into motor movements

  • To achieve precise pen control using stepper motors

  • To reduce manual writing effort and improve accuracy

  • To understand CNC and plotter machine fundamentals


3. Applications

  • Automatic exam paper writing (demo purpose)

  • PCB drawing and sketching

  • CNC and plotter machine learning

  • Educational automation projects

  • Signature or form filling automation


4. Hardware Components Required

ComponentQuantity
Arduino UNO1
Stepper Motor (28BYJ-48 or NEMA 17)2
Stepper Motor Driver (ULN2003 / A4988)2
Servo Motor (SG90)1
Pen Holder1
Frame (Acrylic / Wood / Aluminum)1
Power Supply (12V / 5V)1
Connecting WiresAs required
Breadboard1

5. Software Requirements

  • Arduino IDE

  • Embedded C / C++

  • (Optional) Processing or Python for text input


6. Working Principle

  1. The Arduino UNO acts as the main controller.

  2. Stepper motors move the pen holder horizontally (X-axis) and vertically (Y-axis).

  3. The servo motor controls pen up/down motion.

  4. Characters are broken into line segments.

  5. Arduino sends step pulses to motors according to predefined coordinates.

  6. The pen writes characters on paper step by step.


7. Block Diagram (Text Representation)

Input Text | Arduino UNO | | | Stepper Stepper Servo Motor X Motor Y Motor | Pen Holder | Paper

8. Circuit Connections (Summary)

Stepper Motors

  • IN1–IN4 → Arduino Digital Pins (2–9)

  • VCC → 5V / 12V

  • GND → GND

Servo Motor

  • Signal → Digital Pin 10

  • VCC → 5V

  • GND → GND


9. Arduino Code (Basic Example)

#include <Servo.h> #include <Stepper.h> #define STEPS 2048 Stepper motorX(STEPS, 2, 4, 3, 5); Stepper motorY(STEPS, 6, 8, 7, 9); Servo pen; void setup() { pen.attach(10); motorX.setSpeed(10); motorY.setSpeed(10); } void penUp() { pen.write(90); delay(300); } void penDown() { pen.write(30); delay(300); } void loop() { penDown(); motorX.step(300); motorY.step(200); motorX.step(-300); motorY.step(-200); penUp(); delay(2000); }

(You can expand this code to write alphabets or words.)


10. Advantages

  • Fully automated writing system

  • High precision and repeatability

  • Low cost and easy to build

  • Good learning platform for CNC machines


11. Limitations

  • Writing speed is slow

  • Limited font styles

  • Requires proper calibration


12. Future Enhancements

  • Bluetooth/Wi-Fi text input

  • Mobile app control

  • Image-to-text writing

  • AI handwriting styles

  • Laser engraving module


13. Conclusion

The Arduino-Based Writing Machine is a practical automation project that demonstrates the integration of hardware control, programming, and mechanical systems. It is highly suitable for final-year engineering projects, offering scope for innovation and future upgrades.

Arduino Radar | Arduino Project

 

The Arduino Radar  is an interesting and educational electronics project that simulates the working principle of a real radar system using Arduino. This project detects objects in a specific area and displays their distance and angle, making it ideal for beginners and engineering students.

The project is built using an Arduino UNO, an ultrasonic sensor (HC-SR04), and a servo motor. The ultrasonic sensor is mounted on the servo motor, which rotates from 0° to 180°. As the servo rotates, the ultrasonic sensor continuously sends sound waves and receives the reflected signals from nearby objects. The Arduino calculates the distance based on the time taken for the echo to return.

The collected data is sent to a computer via serial communication and visualized using the Processing IDE, where it appears like a radar screen showing detected objects in real time. This makes the project both interactive and visually appealing.

Arduino Radar Kit projects are widely used for learning sensor interfacing, servo control, serial communication, and basic object detection concepts. It can be further enhanced by adding wireless modules, IoT connectivity, or multiple sensors.

Overall, this project is a great way to understand how radar-like systems work using simple and affordable components.


 Arduino Radar Project

🔧 Components Required

No.ComponentQuantity
1Arduino UNO1
2Ultrasonic Sensor (HC-SR04)1
3Servo Motor (SG90)1
4Breadboard1
5Jumper Wires (Male–Male)As required
6USB Cable (Arduino)1
7Computer / Laptop (Processing IDE)1

🔌 Pin Connections

HC-SR04 Ultrasonic Sensor

  • VCC → 5V (Arduino)

  • GND → GND

  • Trig → D9

  • Echo → D10

Servo Motor

  • Red → 5V

  • Brown/Black → GND

  • Yellow/Orange → D6


💻 Arduino Code (Upload to Arduino UNO)

#include <Servo.h> Servo radarServo; const int trigPin = 9; const int echoPin = 10; long duration; int distance; void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); Serial.begin(9600); radarServo.attach(6); } void loop() { for (int angle = 15; angle <= 165; angle++) { radarServo.write(angle); delay(20); distance = calculateDistance(); Serial.print(angle); Serial.print(","); Serial.print(distance); Serial.print("."); } for (int angle = 165; angle >= 15; angle--) { radarServo.write(angle); delay(20); distance = calculateDistance(); Serial.print(angle); Serial.print(","); Serial.print(distance); Serial.print("."); } } int calculateDistance() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); return duration * 0.034 / 2; }

🖥️ Processing Code (Radar Display on PC)

import processing.serial.*; Serial myPort; String data = ""; int angle = 0; int distance = 0; void setup() { size(800, 600); smooth(); myPort = new Serial(this, Serial.list()[0], 9600); myPort.bufferUntil('.'); } void draw() { background(0); translate(width / 2, height); stroke(0, 255, 0); noFill(); arc(0, 0, 600, 600, PI, TWO_PI); arc(0, 0, 400, 400, PI, TWO_PI); arc(0, 0, 200, 200, PI, TWO_PI); float radarAngle = radians(angle); line(0, 0, 300 * cos(radarAngle), -300 * sin(radarAngle)); if (distance < 200) { stroke(255, 0, 0); line(0, 0, distance * 3 * cos(radarAngle), -distance * 3 * sin(radarAngle)); } } void serialEvent(Serial myPort) { data = myPort.readStringUntil('.'); if (data != null) { data = trim(data); int[] values = int(split(data, ',')); angle = values[0]; distance = values[1]; } }

⚙️ Working Principle (Short)

  • Servo rotates ultrasonic sensor from 15° to 165°

  • Sensor detects object distance

  • Arduino sends angle + distance via serial

  • Processing displays real-time radar visualization