Arduino Gas Detecting Alarm System

1,926

3

2

Introduction: Arduino Gas Detecting Alarm System

Hello, everyone! Right now, I'll be explaining how to build an Arduino gas detecting alarm system in tinkercad. This circuit uses the gas sensor to detect if there is fire, smoke, or gas leakage nearby. Using the LCD and the alarm, this circuit also can display its “Gas Leakage Alert” message, while alerting people nearby.

Supplies

  • 1 Arduino uno
  • 1 MQ2 gas sensor
  • 4 1k ohms resistors
  • 1 4.7k ohms resistor
  • 1 Piezo buzzer
  • 2 different color LEDs(I'll be using the red and green LEDs in this case)
  • 1 LCD(16x2)
  • 1 breadboard
  • Many wires of different colors

Step 1: About Project and Schematic Drawing

We have used a gas sensor module to detect gases. If a gas leakage occurs, the sensor gives a HIGH pulse and when the Arduino gets a HIGH pulse from the sensor, it sends a signal to the LCD and the piezo buzzer. Then the LCD would show the “Evacuate" message and activates the piezo buzzer which beeps again and again until the gas detector doesn't sense the gas in the environment. Else, the gas sensor gives LOW pulse to the Arduino, then LCD would then show the “All Clear” message.

Step 2: Gather All the Supplies

Step 3: Setup(Part 1)

Steps

  1. Connect Arduino 5V to positive power rail
  2. Connect Arduino GND to negative power rail
  3. Connect Arduino A0 to gas sensor B1
  4. Connect gas sensor A1, H2, A2 to positive power rail
  5. Connect gas sensor H2 to ground
  6. Connect gas sensor B2 to 4.7k ohms resistor, then to ground
  7. Connect piezo positive terminal to Arduino pin 4
  8. Connect piezo negative terminal to 1k ohms resistor, then to ground
  9. Connect the cathodes of the two LEDs to 1k ohms resistor, then to ground
  10. Connect the anode of the red LED to Arduino pin 2
  11. Connect the anode of the green LED to Arduino pin 3

Step 4: Setup(Part 2)

  1. Connect LCD ground, contrast, and LED cathode to ground
  2. Connect LCD anode to 1k ohms resistor, then to the positive power rail
  3. Connect LCD power to the positive power rail
  4. Connect LCD register select to Arduino pin 5
  5. Connect LCD read/write to ground
  6. Connect LCD enable to Arduino pin 6
  7. Connect LCD terminal 4,5,6,7 to Arduino pin 8,9,10,11

Step 5: Code

Here is the Arduino Code for Gas Detecting Alarm System.

https://gist.github.com/AZ979/8e344619862e4a76c3c2...

Step 6: Run the Simulation

When you run the simulation, the LCD should be able to display both safe and evaluate messages, while the piezo buzzer should be able to beep if the gas sensor detect any gas leaks. If anything works just like you thought, then congratulation to you for making it to the end.

Be the First to Share

    Recommendations

    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge
    • Fashion Challenge

      Fashion Challenge
    • Space Contest

      Space Contest

    2 Comments

    0
    AndreeaE1
    AndreeaE1

    1 year ago

    awesome! love the idea