Arduino UNO-Based Smart Home Automation System with Flame and IR Sensors

 

Arduino UNO Smart Home Automation System with Flame & IR Sensors

The Arduino UNO-Based Smart Home Automation System is an intelligent DIY project designed to improve home safety, fire detection, and motion-based automation. Built using the reliable Arduino Uno, this system integrates flame detection, infrared motion sensing, temperature and humidity monitoring, and automated device control into a single smart solution.

This project is ideal for students, IoT beginners, electronics hobbyists, and engineering projects focused on smart home security and automation systems.


Project Overview

This smart home system integrates:

  • Arduino Uno for real-time processing

  • DHT11 Sensor for climate monitoring

  • Flame sensor module for fire detection

  • IR (Infrared) motion sensors for intrusion detection

  • SSD1306 OLED Display for real-time data visualization

  • Buzzer alarm system

  • LEDs and motor driver for appliance control

The system continuously monitors environmental and motion conditions and triggers alarms or automation responses instantly.


 How the Smart Home Automation System Works

1️⃣ Temperature & Humidity Monitoring

The DHT11 sensor measures:

  • Room temperature

  •  Relative humidity

Values are displayed on the OLED screen in real time.

2️⃣ Flame Detection (Fire Safety System)

  • The flame sensor detects infrared light emitted by fire.

  • When fire is detected, the Arduino activates a buzzer alarm.

  • Instant alert helps prevent fire accidents.

3️⃣ IR Motion Detection

  • IR sensors detect human movement.

  • LEDs or connected appliances turn ON automatically.

  • Can be configured for security alerts or lighting automation.

4️⃣ Output Control

The Arduino controls:

  • Buzzer for emergency alerts

  • LEDs for smart lighting

  • Motors/relays for appliance automation


Key Features

✅ Real-time flame detection and fire alert
✅ Dual IR motion sensor monitoring
✅ Temperature and humidity display
✅ OLED live data visualization
✅ Automatic appliance control
✅ Energy-efficient automation
✅ Expandable with GSM / WiFi / Bluetooth
✅ Beginner-friendly embedded system project


 Technical Concepts Demonstrated

  • Digital sensor interfacing

  • I2C OLED communication

  • Real-time environmental monitoring

  • Embedded system programming

  • Event-based automation logic

  • Alarm triggering mechanisms

  • Multi-sensor integration


 Applications

 Smart home security system
 Fire accident prevention system
 Automated lighting control
 Office & warehouse safety monitoring
 IoT-based home automation projects
 Industrial safety alert system
 Engineering and STEM lab demonstrations


 Future Upgrades & IoT Integration

This smart home system can be upgraded with:

 GSM module for SMS fire alerts
 WiFi module (ESP8266 / ESP32) for cloud monitoring
 Blynk or ThingSpeak dashboard integration
 CCTV camera module
 Mobile push notifications
 Solar-powered backup system
 AI-based anomaly detection


 Ideal For

  • Engineering mini & major projects

  • IoT beginners

  • Home automation enthusiasts

  • Robotics & embedded systems learners

  • Science exhibition demonstrations

  • Smart city prototype development


 Conclusion

The Arduino UNO Smart Home Automation System with Flame and IR Sensors is a complete embedded solution for modern home safety and automation. By combining:

  • Fire detection

  • Motion sensing

  • Climate monitoring

  • Alarm systems

  • Automated appliance control

This project offers a scalable and future-ready foundation for IoT-based smart home development.

It is a perfect blend of safety, automation, energy efficiency, and embedded intelligence.

Code:
}#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>// OLED display settings
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

// DHT11 settings
#define DHTPIN 10
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);


// Flame sensor pin
#define FLAME_SENSOR_PIN 9

// Buzzer pin
#define BUZZER_PIN 8

// LED pins
#define LED1_PIN 7
#define LED2_PIN 6

// L298N motor driver pins
#define IN1_PIN 2
#define IN2_PIN 3
#define IN3_PIN 4
#define IN4_PIN 5

// IR sensor pins
#define IR_SENSOR1_PIN 11
#define IR_SENSOR2_PIN 12

void setup() {
  // Initialize serial communication
  Serial.begin(9600);

  // Initialize OLED display
  if (!display.begin(SSD1306_I2C_ADDRESS, OLED_RESET)) {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;);
  \}
  display.display();
  delay(2000);
  display.clearDisplay();

  // Initialize DHT11 sensor
  dht.begin();

  // Initialize flame sensor pin
  pinMode(FLAME_SENSOR_PIN, INPUT);

  // Initialize buzzer pin
  pinMode(BUZZER_PIN, OUTPUT);

  // Initialize LED pins
  pinMode(LED1_PIN, OUTPUT);
  pinMode(LED2_PIN, OUTPUT);

  // Initialize motor driver pins
  pinMode(IN1_PIN, OUTPUT);
  pinMode(IN2_PIN, OUTPUT);
  pinMode(IN3_PIN, OUTPUT);
  pinMode(IN4_PIN, OUTPUT);

  // Initialize IR sensor pins
  pinMode(IR_SENSOR1_PIN, INPUT);
  pinMode(IR_SENSOR2_PIN, INPUT);
\}

void loop() {
  // Read DHT11 sensor data
  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();

  // Read flame sensor data
  int flameSensorValue = digitalRead(FLAME_SENSOR_PIN);

  // Read IR sensor data
  int irSensor1Value = digitalRead(IR_SENSOR1_PIN);
  int irSensor2Value = digitalRead(IR_SENSOR2_PIN);

  // Display data on OLED
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0, 0);
  display.print("Temp: ");
  display.print(temperature);
  display.print(" C");
  display.setCursor(0, 10);
  display.print("Humidity: ");
  display.print(humidity);
  display.print(" %");
  display.setCursor(0, 20);
  display.print("Flame: ");
  display.print(flameSensorValue ? "No" : "Yes");
  display.setCursor(0, 30);
  display.print("IR1: ");
  display.print(irSensor1Value ? "No" : "Yes");
  display.setCursor(0, 40);
  display.print("IR2: ");
  display.print(irSensor2Value ? "No" : "Yes");
  display.display();

  // Control buzzer based on flame sensor
  if (flameSensorValue == LOW) {
    digitalWrite(BUZZER_PIN, HIGH);
  \} else {
    digitalWrite(BUZZER_PIN, LOW);
  \}

  // Control LEDs based on IR sensors
  digitalWrite(LED1_PIN, irSensor1Value == LOW ? HIGH : LOW);
  digitalWrite(LED2_PIN, irSensor2Value == LOW ? HIGH : LOW);

  // Control motors (example: forward motion)
  digitalWrite(IN1_PIN, HIGH);
  digitalWrite(IN2_PIN, LOW);
  digitalWrite(IN3_PIN, HIGH);
  digitalWrite(IN4_PIN, LOW);

  delay(1000);
\}
This code initializes the components and reads data from the sensors. It displays the sensor data on the OLED screen, controls the buzzer based on the flame sensor, and controls the LEDs based on the IR sensors. The motors are set to move forward as an example. You can modify the motor control logic as needed for your application.

You
HOW TO UPLOAD CODE
Cirkit
To upload the code to your Arduino UNO, follow these steps:

Install the Arduino IDE:

If you haven't already, download and install the Arduino IDE from the official Arduino website.
Connect the Arduino UNO:

Connect your Arduino UNO to your computer using a USB cable.
Open the Arduino IDE:

Launch the Arduino IDE on your computer.
Create a New Sketch:

Go to File > New to create a new sketch.
Copy and Paste the Code:

Copy the provided code and paste it into the new sketch window in the Arduino IDE.
Install Required Libraries:

The code uses the Adafruit_GFX and Adafruit_SSD1306 libraries for the OLED display and the DHT library for the DHT11 sensor. You need to install these libraries if you haven't already.
Go to Sketch > Include Library > Manage Libraries...
In the Library Manager, search for Adafruit GFX and Adafruit SSD1306, then click Install for both.
Similarly, search for DHT sensor library and click Install.
Select the Board and Port:

Go to Tools > Board and select Arduino/Genuino UNO.
Go to Tools > Port and select the port to which your Arduino UNO is connected (e.g., COM3 on Windows or /dev/tty.usbmodem14101 on macOS).
Upload the Code:

Click the Upload button (right arrow icon) in the Arduino IDE toolbar.
The IDE will compile the code and upload it to the Arduino UNO. You should see the Done uploading message once the process is complete.
Monitor Serial Output (Optional):

If you want to monitor the serial output, open the Serial Monitor by clicking the magnifying glass icon in the top-right corner of the Arduino IDE or by going to Tools > Serial Monitor.
Set the baud rate to 9600 to match the Serial.begin(9600); line in the code.
Your Arduino UNO should now be running the uploaded code, controlling the connected components as specified.


Applications:

  • Smart home security system

  • Fire accident prevention system

  • Automated lighting system

  • Office and warehouse safety monitoring

  • IoT-based home automation projects

 

IOT & SMART SYSTEM PROJECTS

  1. IoT Weather Monitoring System (NodeMCU ESP8266 + DHT11 + Rain Sensor)
  2. ESP8266 NodeMCU Smart Health & Environment Monitoring System with Pulse, Temperature and Motion Sensors
  3. ESP32 Wi-Fi Weight Sensor with HX711
  4. Smart RFID Access Control System Using ESP32 Dev Board and UHF RFID Reader Module
  5. Smart IoT Motor Control System Using ESP32 Dev Board and L298N Motor Driver Module
  6. Smart Waste Management System Using Arduino Nano, Ultrasonic Sensor & GSM Module – Solar Powered IoT Solution
  7. Raspberry Pi Zero W and GSM SIM900 Based Ultrasonic Distance Measurement System
  8. Arduino UNO Smart Surveillance System with ESP8266 WiFi, PIR Motion Sensor & Camera Module
  9. Arduino UNO Environmental Monitoring System with OLED & 16x2 I2C LCD Display
  10. Arduino UNO-Based Smart Home Automation System with Flame and IR Sensors 
  11. Arduino Nano-Based Landslide Detection System with GSM Alerts – Smart Disaster Monitoring Project
  12. Arduino Nano Rain-Sensing Stepper Motor System
  13. Arduino Based Automatic Tire Inflator Using Pressure Sensor, Relay Module and LCD Display
  14. Arduino-Based Automatic Cooker Using Servo Motors, DC Stirrer Motor, Temperature Sensor and Relay-Controlled Heater
  15. Arduino Sketch for Plastic Bottle and Can Reverse Vending Machine

 TRAFFIC & SMART CITY PROJECTS
  1. RFID-Based Smart Traffic Control System (Arduino Mega)
  2. Arduino UNO Traffic Light Control System – Smart LED Signal Project
  3.  Arduino UNO Controlled Traffic Light System with Joystick Interface

ROBOTICS PROJECTS
  1. Arduino UNO Smart Obstacle Avoiding Robot (Ultrasonic + IR + GSM)
  2. Arduino-Powered Autonomous Obstacle Avoidance Robot with Servo Control
  3. Arduino Nano Bluetooth Controlled Line Follower Robot Using L298N Motor Driver
  4. Arduino UNO Bluetooth Controlled 4WD Robot Car Using L298N Motor Driver
  5. Arduino UNO Multi-Sensor Obstacle Avoidance & Bluetooth Controlled Robot Car Using L298N
  6. Raspberry Pi Motor Control Robot (L298N + Li-ion)
  7. RC Car Simulation with L298N Motor Driver and Joystick Control using Arduino (CirkitDesign Simulation)
  8. Raspberry Pi Robotic Arm Control System with Camera Module and Motor Driver – Smart Automation & Vision-Based Robotics Project
  9. ESP32-Based 4WD Robot Car Using Dual L298N Motor Drivers – Circuit Diagram and IoT Control Project

LORA & WIRELESS COMMUNICATION PROJECTS
  1. Arduino LoRa Communication Project Using Adafruit RFM95W LoRa RadioArduino Nano with RFM95 SX1276 LoRa
  2. Arduino Nano with RFM95 LoRa SX1276 Module – Long Range Wireless Communication Project
  3. Arduino Nano Digital Clock Using DS3231 RTC and TM1637 4-Digit Display – Circuit Diagram and Project Guide

 LED, LIGHTING & DISPLAY PROJECTS
  1. Arduino UNO Controlled NeoPixel Ring Light Show
  2. Wi-Fi Controlled NeoPixel Ring (ESP8266)
  3. Chained NeoPixel Rings with Arduino – Addressable RGB LED Control Project
  4. Arduino Nano-Controlled Lighting System with Gesture and Sound Interaction
  5. Raspberry Pi GPIO Multi-LED Control System – Beginner-Friendly Embedded Electronics Project
  6. 4 Channel Relay Module with Arduino UNO

 SENSOR & DETECTION PROJECTS
  1. Arduino UNO Color Sensor + Proximity System (TCS3200 + Inductive)
  2. Arduino Color Detection Project Using Adafruit TCS34725 RGB Color Sensor
  3. Arduino Gas Leakage Detection and Safety Alert System Using MQ-2 Gas Sensor
  4. MQ-135 Air Quality Detector Using Arduino | Cirkit Designer Simulation Project
  5. Pulse Sensor Using Arduino – Complete Guide with Simulation 
  6. HX711 Load Sensor Demo Using Arduino | Digital Weight Measurement Project
  7. Track Time with DS1307 RTC and Display on Arduino Uno with 16x2 LCD | Cirkit Designer Project
  8. Parking Sensor Simulator using Arduino Uno and HC-SR04 Ultrasonic Sensor

 FUN & INTERACTIVE PROJECTS
  1. Pong Game with Arduino UNO and OLED Display – Project Explanation
  2.   Arduino UNO Bluetooth-Controlled Servo Motor System
  3. Arduino UNO-Based Interactive Touch and Distance Sensing System with LED Indicators and Servo Control

 INDUSTRIAL / AUTOMATION PROJECTS

  1. Arduino UNO Smart Waste Sorting System Using Ultrasonic Sensor, Moisture Sensor, Servo, Stepper Motor and LCD
  2. Arduino-Based Smart Waste Segregation System Using Metal, Plastic and Moisture Sensors with Stepper and Servo Control
  3. ESP32-Based Digital Weighing Scale Using 50kg Load Cell, HX711 Module and 16x2 LCD Display
  4. Arduino-Based Smart Toll Gate Automation System with RFID, GSM, Ultrasonic Sensor and LCD Display

  5. Arduino-Based Automatic Pill Dispenser Machine with LCD Display, Servo Motor and Buzzer Reminder

  6. Arduino UNO Smart Water Quality Monitoring System with pH Sensor, Turbidity Sensor and LCD Display

  7. Arduino-Based Ocean Cleaning Boat Robot with Dual IBT-2 Motor Drivers and Conveyor Belt System

  8. IoT-Based Accident Detection and Health Monitoring System Using Raspberry Pi with GSM, GPS and Camera Integration

  9. Raspberry Pi RFID and Keypad Based Smart Door Lock System with LCD Display and L298N Motor Driver

  10. Smart Shopping Trolley Using Arduino UNO & RFID | Automatic Billing System

  11. Arduino UNO Based Automatic Liquid Hand Sanitizer & Soap Dispenser System

  12. Arduino Based Robotic Weeding Machine with Ultrasonic Obstacle Detection and L298N Motor Driver

  13. Arduino UNO Based Biometric Electronic Voting System with LCD Display and Fingerprint Authentication

  14. Arduino UNO Based Electronic Voting System with ILI9341 TFT Display

Comments