Skip to content

4.1.35. Master Safety Monitoring Station

| Description In Project 90, learners will engineer an advanced 'Master Safety Monitoring Station' multi-component system. This design integrates BME280 + Flame Sensor + Water Test Module + IIC 1602 LCD + Buzzer + Relay Module into a cohesive industrial automation unit.|------------------|----------------------------------------------------------------| | Use case |This project connects to real-world industrial and IoT applications such as: Project 90 provides essential master-level engineering skills for real-world IoT, safety, and control systems.|

Components (Things You will need)

Arduino Uno Arduino USB Cable Bread Board Jumper Wires BME Sensor LCD Display Buzzer Relay Module Flame Sensor Water Sensor Temperature Sensor

Building the circuit

Things Needed:

  • Arduino Uno Core Board = 1
  • BME280 = 1
  • Flame Sensor = 1
  • Water Test Module = 1
  • USB Cable & Jumper Wires = 1
  • Bread Board
  • LCD Display
  • Buzzer
  • Relay Module
  • Temperature Sensor

Mounting the component on the breadboard and wiring the circuit

Step 1: Inventory all modules listed in the Required Components table.

Step 2: Connect the BME280 and LCD SDA to A4, and SCL to A5 (I2C Shared Bus).

Step 3: Connect the Flame Sensor to A0 and the Water Test Module to A1.

Step 4: Wire the Buzzer to Digital Pin 9 and the Relay Module to Digital Pin 8.

Step 5: Connect all VCC pins to the 5V rail and all GND pins to the common GND rail.

Step 6: Double-check all VCC, 5V, 3.3V, and GND polarities to prevent electrical shorts.

Step 7: Connect USB programming cable only after verifying all signal path wiring.

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.

// Project 90: Master Safety Monitoring Station
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_BME280.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);
Adafruit_BME280 bme;

const int flamePin = A0;
const int waterPin = A1;
const int buzzerPin = 9;
const int relayPin = 8;

void setup() {
  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  if (!bme.begin(0x76)) {
    Serial.println("Could not find a valid BME280 sensor!");
  }
  pinMode(flamePin, INPUT);
  pinMode(waterPin, INPUT);
  pinMode(buzzerPin, OUTPUT);
  pinMode(relayPin, OUTPUT);
  Serial.println("Project 90: Master Safety Monitoring Station Initialized...");
}

void loop() {
  // Read sensor values
  float temperature = bme.readTemperature();
  int flameValue = analogRead(flamePin);
  int waterValue = analogRead(waterPin);

  // Display on LCD
  lcd.setCursor(0, 0);
  lcd.print("T: ");
  lcd.print(temperature);
  lcd.print("C");

  // Logic: Trigger alarm if flame detected or water level high
  if (flameValue < 500 || waterValue > 500) {
    digitalWrite(buzzerPin, HIGH);
    digitalWrite(relayPin, HIGH);
    lcd.setCursor(0, 1);
    lcd.print("ALERT!          ");
  } else {
    digitalWrite(buzzerPin, LOW);
    digitalWrite(relayPin, LOW);
    lcd.setCursor(0, 1);
    lcd.print("Normal          ");
  }
  delay(500);
}

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

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

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

CONCLUSION

The system responds dynamically when physical conditions cross pre-programmed setpoints, driving output devices reliably.