This is an old revision of the document!


Fire Detection and Suppression System

Introduction

The project consists of the development of an active protection mechatronic system based on the ATmega324PB microcontroller. The system utilizes a periodic scanning algorithm to monitor a 180° sector, processing analog signals from an optical sensor to identify the infrared signature of a flame.

General Description

The proposed system offers diverse applicability, primarily targeted at monitoring industrial environments with a high fire risk, where a rapid reaction is critical to limit damages before high-capacity sprinkler systems are activated. Due to the architecture of the ATmega324PB microcontroller, which provides dual USART, SPI, and TWI interfaces, the device can be easily integrated into redundant security systems, functioning as an independent node within a larger sensor network. From a technical and educational perspective, the project serves as an ideal case study for deepening the understanding of closed-loop control systems and managing hardware interrupts in real-time.

Hardware Design

1.Components

Component Type / Model Role
Microcontroller ATmega324PB Xplained Mini Central Processing Unit (CPU); manages ADC and PWM signals.
Flame Sensor Optical IR Sensor (Analog) Detects infrared radiation emitted by a flame.
Servo Motor 1 SG90 / MG90 Rotates the scanning assembly on the horizontal axis (180°).
Servo Motor 2 SG90 / MG90 Controls the vertical orientation of the extinguishing nozzle.
MiniWater Pump 3V - 6V DC Delivers the extinguishing agent toward the fire.
Relay Module 5V Optocoupled Switches the pump on/off and isolates the power circuit from the MCU.
Power Supply 5V / 2A (External) Provides the necessary current for the motors and the pump.
Connectivity Breadboard & Jumpers Used for making electrical connections between modules.

2.Electrical Schematic

Design Explanations:

  • Power Isolation: The water pump is powered directly from the 12V rail via the relay. This prevents the high current draw and electrical noise of the motor from affecting the ATmega328P stability.
  • Voltage Regulation: The LM2596 Buck Converter is tuned to exactly 5.0V. It powers the MCU and the servos, which require more current than a standard PC USB port can provide.
  • Safety Features: A flyback diode (D1) is placed at the input to prevent damage from reverse polarity. The relay provides galvanic isolation between the water pump circuit and the microcontroller.

3. Pin Configuration and Rationale

To ensure efficient operation and hardware-level precision, the following pins were selected:

  • PD2 (INT0): Connected to the Digital Output (DO) of the Flame Sensor.
    • Rationale: PD2 supports External Interrupts. This allows the system to react instantly to a fire detection without waiting for the main code loop to finish other tasks.
  • PB1 (OC1A) & PB2 (OC1B): Connected to the PWM pins of Servo 1 and Servo 2.
    • Rationale: These pins are linked to Timer 1 (16-bit). Since we are not using Arduino libraries, Timer 1 provides the high resolution necessary for smooth 50Hz servo pulses (20ms period).
  • PD4: Connected to the Relay Input (IN).
    • Rationale: A standard GPIO used to toggle the pump. It is kept on Port D to group it with other digital control signals.
  • VCC (5V) & GND: All logic components (MCU, Sensor, Servos) share the 5V rail from the Buck Converter to ensure common ground reference for signals.

4. Hardware Implementation and Testing

Physical Assembly

The images above show the final wiring on the breadboard, with the Buck Converter supplying power to the flame sensor and the Xplained Mini board.

Proof of Functionality: Flame Detection

To verify the system, the Flame Sensor and the integrated LED (PB5) were tested.

  • Test Procedure: A flame was introduced near the sensor.
  • Result: The sensor's onboard LED triggered, and the ATmega328P successfully pulled the PD2 pin low, subsequently powering up the PB5 BUZZER on the Xplained Mini board.
  • Conclusion: The interrupt logic is functional, and the sensor is correctly calibrated via its onboard potentiometer.

Image with the process

pm/prj2026/alexandru.predescu/patricia.bratu.1778935719.txt.gz · Last modified: 2026/05/16 15:48 by patricia.bratu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0