Skip to content

3.13. Industrial Safety Monitoring System

Description In this project, learners will build an Industrial Safety Monitoring System that monitors workplace conditions using a Temperature Sensor, Flame Sensor, LCD Display, LEDs, and a Buzzer. The system provides immediate warnings when dangerous temperatures or fire conditions are detected. This project simulates safety-monitoring systems commonly used in factories, warehouses, laboratories, and manufacturing plants.
Use case This project is connected to real-world uses such as: This project demonstrates industrial safety systems used to protect personnel, equipment, and facilities from hazardous conditions.

Components (Things You will need)

Arduino Uno Arduino USB Cable Bread Board Jumper Wires LCD Display Resistor LED Buzzer Flame Sensor Temperature Sensor

Building the circuit

Things Needed:

  • Arduino Uno
  • Flame Sensor Module
  • LM35 Temperature Sensor
  • I2C LCD Display
  • Red LED
  • Green LED
  • Buzzer
  • Breadboard
  • Jumper Wires
  • 220Ω Resistors
  • Arduino USB Cable

Mounting the component on the breadboard and wiring the circuit

Step 1: Identify each component listed in the Required Components table before assembling the circuit.

  • Place the Flame Sensor Module, LM35 Temperature Sensor, Red LED, Green LED, buzzer, and I²C LCD Display on the breadboard.

  • Connect the Flame Sensor Module by connecting the VCC pin to 5V, the GND pin to GND, and the Signal pin to Digital Pin 2 on the Arduino Uno.

  • Connect the LM35 Temperature Sensor by connecting the VCC pin to 5V, the GND pin to GND, and the VOUT pin to Analog Pin A0 on the Arduino Uno.

  • Connect the buzzer by connecting the positive (+) pin to Digital Pin 8 and the negative (–) pin to GND on the Arduino Uno.

  • Connect the Red LED by connecting the positive (anode) pin to Digital Pin 7 and the negative (cathode) pin to GND on the Arduino Uno.

  • Connect the Green LED by connecting the positive (anode) pin to Digital Pin 6 and the negative (cathode) pin to GND on the Arduino Uno.

  • Connect the I²C LCD Display by connecting the SDA pin to Analog Pin A4, the SCL pin to Analog Pin A5, the VCC pin to 5V, and the GND pin to GND on the Arduino Uno.

  • Ensure all components share a common 5V and GND connection, then carefully verify every connection before connecting the Arduino Uno to your computer using the USB cable.

Components on breadboard

Make sure to connect the Arduino USB cable to the Arduino board.

PROGRAMMING

Step 1: Open your Arduino IDE. See how to set up here: Getting Started.

Step 2: Write the complete program implementing the system logic with appropriate pin definitions, setup configuration, and the main control loop.


#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Create LCD object
LiquidCrystal_I2C lcd(0x27, 16, 2);

// Sensor pins
const int flamePin = 2;
const int tempPin = A0;

// Alert pins
const int greenLED = 6;
const int redLED = 7;
const int buzzerPin = 8;

void setup() {

  // Initialize LCD
  lcd.init();
  lcd.backlight();

  // Configure pin modes
  pinMode(flamePin, INPUT);
  pinMode(greenLED, OUTPUT);
  pinMode(redLED, OUTPUT);
  pinMode(buzzerPin, OUTPUT);

  // Initialize outputs
  digitalWrite(greenLED, LOW);
  digitalWrite(redLED, LOW);
  digitalWrite(buzzerPin, LOW);

  // Startup message
  lcd.setCursor(0, 0);
  lcd.print("Fire Monitor");
  lcd.setCursor(0, 1);
  lcd.print("Starting...");
  delay(1500);
  lcd.clear();
}

void loop() {

  // Read flame sensor
  int flameDetected = digitalRead(flamePin);

  // Read LM35 temperature sensor
  int sensorValue = analogRead(tempPin);

  // Convert analog reading to temperature
  float voltage = sensorValue * (5.0 / 1023.0);
  float temperature = voltage * 100.0;

  // Display temperature
  lcd.setCursor(0, 0);
  lcd.print("Temp:");
  lcd.print(temperature, 1);
  lcd.print((char)223);   // Degree symbol
  lcd.print("C ");

  // Determine alarm conditions
  bool fireDetected = (flameDetected == LOW);   // Change to HIGH if your flame sensor is active HIGH
  bool highTemperature = (temperature > 50.0);

  if (fireDetected || highTemperature) {

    digitalWrite(redLED, HIGH);
    digitalWrite(greenLED, LOW);
    digitalWrite(buzzerPin, HIGH);

    lcd.setCursor(0, 1);
    lcd.print("FIRE WARNING! ");

  }
  else {

    digitalWrite(redLED, LOW);
    digitalWrite(greenLED, HIGH);
    digitalWrite(buzzerPin, LOW);

    lcd.setCursor(0, 1);
    lcd.print("Area Safe     ");
  }

  delay(500);
}

Step 3: Save your code. See the Getting Started section

Step 4: Select the arduino board and port See the Getting Started section:Selecting Arduino Board Type and Uploading your code.

Step 5: Upload your code. See the Getting Started section:Selecting Arduino Board Type and Uploading your code

CONCLUSION

When the program is running, the Industrial Safety Monitoring System continuously monitors the surrounding area for flames and high temperatures. The LCD displays the current temperature, while the green LED indicates that the area is safe. If a flame is detected or the temperature exceeds the preset threshold, the red LED lights up, the buzzer sounds, and the LCD displays a "FIRE WARNING!" message, providing immediate visual and audible alerts to warn users of a potential fire hazard.