SoS — Smell oll Smell

Smit Dharaiya
4 min readOct 10, 2020

Gas alarm device

At least 20 people were hospitalized after the valve of a chlorine gas cylinder in a drinking water tank in Gujarat’s Por village developed a leak on April 13, 2017.

At least 25 people were reportedly hospitalized after inhaling chlorine gas that leaked from a water treatment plant on the outskirts of Belur on May 16, 2017.

Over 40 workers of a glass manufacturing factory in Gujarat’s Valsad district were hospitalized following the leakage of chlorine gas in an adjacent chemical company on December 20, 2018.

10 people dead and at least 5000 injured due to a gas leak at LG polymers factory in Vishakhapatnam 2020.

Looking at all these incidents we are making a device that will be able to sense any unsafe amounts of harmful gas and will notify the customer on his mobile. The customer can set the safe amounts of gas and also he’ll be able to set the gas he wants to monitor with the help of our SoS app.

Here we are using an Arduino Mega as the microcontroller and esp8266 wifi module for communication over the internet and an MQ2 sensor to sense the amounts of gas in the air where it is installed. We are using AWS cloud for storing our data.

Arduino Mega 2560 :

Esp8266 Wi-fi Module :

ESP8266 is Wi-Fi enabled system on chip (SoC) module developed by Espressif system. It is mostly used for development of IoT (Internet of Things) embedded applications.

3V3: — 3.3 V Power Pin.
GND: — Ground Pin.
RST: — Active Low Reset Pin.
EN: — Active High Enable Pin.
TX: — Serial Transmit Pin of UART.
RX: — Serial Receive Pin of UART.

MQ2 Gas Sensor :

The Grove — Gas Sensor(MQ2) module is useful for gas leakage detection (home and industry). It is suitable for detecting H2, LPG, CH4, CO, Alcohol, Smoke or Propane. Due to its high sensitivity and fast response time, measurement can be taken as soon as possible. The sensitivity of the sensor can be adjusted by potentiometer.

Now Let’s have a look at the pinout

  1. VCC : supplies power for the module. You can connect it to 5V output from your Arduino.
  2. Ground : is the Ground Pin and needs to be connected to GND pin on the Arduino.
  3. Analog Out : provides a digital representation of the presence of combustible gases.
  4. Digital Out : provides analog output voltage in proportional to the concentration of smoke/gas.

Mosquitto MQTT Server :

MQTT is a publish/subscribe model based, “lightweight” messaging protocol over TCP/IP for communication between “Internet of Things” devices such as ESP8266, Raspberry Pi, etc. It is very popular with low resources and battery powered applications such as home automation, security alarm systems and battery-powered sensor networks.

Mosquitto is an open source message broker (or server) that implements MQTT protocols. With its good community support, documentation, and ease of installation it has become one of the most popular MQTT brokers.

Amazon EC2 :

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable computing capacity — literally, servers in Amazon’s data centers — that you use to build and host your software systems.

How to Create Ec2 Instance :

  • First login to AWS console.
  • Search for services known as EC-2.
  • In the EC-2 dashboard click on “Launch Instance”.
  • Choose an AMI according to your configuration.
  • Choose the Instance type and configure it according to your requirement.
  • Configure the storage according to your usage.
  • Leave the “add tags” as default for this only.
  • In Security group click Add Rule. after this in Type field add Http,SSH and Https and leave everything as else it is.
  • Click review your EC-2 instance and then click launch.
  • After launch, it will ask for key-value pair. Add your key name and download the key pair.

Circuit Diagram :

--

--