Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO R4 WiFi Fire Detection System with Solar Power and Buzzer Alert

View and Edit Project In Cirkit DesignerImage of Arduino UNO R4 WiFi Fire Detection System with Solar Power and Buzzer Alert

Circuit Documentation

Summary

The circuit is designed to monitor for the presence of flames using an array of IR Flame sensors interfaced with an Arduino UNO R4 WiFi microcontroller. When a flame is detected by any of the sensors, a buzzer is activated to alert the presence of fire. The system is powered by a UPS module, which is charged by a solar panel through a solar charge controller. The UPS module also provides power to an inverter connected to an AC source for additional power requirements.

Component List

Arduino UNO R4 WiFi

IR FLAME

Buzzer

DHT22

ADXL345

Solar Panel

Solar Charge Controller

12v 7ah Battery

UPS Module

AC Source

Inverter

Wiring Details

Arduino UNO R4 WiFi

IR FLAME

Buzzer

DHT22

Solar Panel

Solar Charge Controller

12v 7ah Battery

UPS Module

Inverter

AC Source

Documented Code

#define FLAME_SENSOR_PIN1 2  // D1A1
#define FLAME_SENSOR_PIN2 3  // D2A2
#define FLAME_SENSOR_PIN3 4  // D3A3
#define FLAME_SENSOR_PIN4 5  // D4A4
#define FLAME_SENSOR_PIN5 6  // D5A5
#define BUZZER_PIN 7         // Buzzer pin

void setup() {
  pinMode(FLAME_SENSOR_PIN1, INPUT);
  pinMode(FLAME_SENSOR_PIN2, INPUT);
  pinMode(FLAME_SENSOR_PIN3, INPUT);
  pinMode(FLAME_SENSOR_PIN4, INPUT);
  pinMode(FLAME_SENSOR_PIN5, INPUT);
  pinMode(BUZZER_PIN, OUTPUT);

  Serial.begin(9600);
}

void loop() {
  if (digitalRead(FLAME_SENSOR_PIN1) == LOW ||
      digitalRead(FLAME_SENSOR_PIN2) == LOW ||
      digitalRead(FLAME_SENSOR_PIN3) == LOW ||
      digitalRead(FLAME_SENSOR_PIN4) == LOW ||
      digitalRead(FLAME_SENSOR_PIN5) == LOW) {
    
    Serial.println("Fire detected!");
    digitalWrite(BUZZER_PIN, HIGH); // Turn on the buzzer
    delay(200);                     // Delay to keep the buzzer on briefly
    digitalWrite(BUZZER_PIN, LOW);  // Turn off the buzzer
  } else {
    Serial.println("No fire detected.");
    digitalWrite(BUZZER_PIN, LOW);  // Ensure buzzer is off
  }

  delay(500); // Adjust delay as needed
}

This code is designed to run on the Arduino UNO R4 WiFi microcontroller. It initializes the flame sensor pins and the buzzer pin, then continuously checks the flame sensor pins for a LOW signal, indicating the detection of a flame. If a flame is detected, it activates the buzzer and prints a message to the serial monitor. If no flame is detected, it ensures the buzzer is off and prints a different message to the serial monitor.