Gas Leakage Detection And Information Display System


In this project we demonstrate the idea of gas leakage detection and information display system by using a MQ-6 sensor that used for gas leakage detection and in case of gas leakage system automatically check the status of gas leakage. in case of gas leakage system warn the condition and display all condition in LCD and system weep the buzzer and indicate red led and calling feature using gsm technology and system confirm the call on respective no.


  1. Microcontroller at89s52
  2. Crystal oscillator
  3. Ceramic capacitor
  4. Transformer
  5. Diode
  6. Led
  7. Electrolyte capacitor
  8. Regulator
  9. LCD
  10. Buzzer
  11. Relay
  12. Variable resistor
  13. NPN and PNP transistor
  14. PCB
  15. Iron
  16. Soldering wire
  17. Kit (1200)
  18. Dc motor: operated voltage 9v to 12v



The AT89S52 MICROCONTROLLER is family of 8051 Microcontrollers.

It is an 8-bit CMOS microcontroller with 8K as Flash memory and 256 bytes of RAM. Since it is a modified version of 8051 architecture. These microcontrollers are used as per industry standard. It has 32 I/O pins which consist of three 16-bit timers, external interrupts, full-duplex serial port, on-chip oscillator and clock circuitry.

Get quality help now
Doctor Jennifer
Doctor Jennifer
checked Verified writer

Proficient in: Electricity

star star star star 5 (893)

“ Thank you so much for accepting my assignment the night before it was due. I look forward to working with you moving forward ”

avatar avatar avatar
+84 relevant experts are online
Hire writer

The at89s52 Microcontroller consists of three modes: Operating mode, Idle Mode and Power-down mode which makes this controller suitable for battery operated applications. The main disadvantages of this microcontroller are that it does not have in-built Analog to digital converter and does not support SPI or I2C protocols. However, the external modules are required for the controller.

Programming AT89S52 Microcontroller

Atmel microcontroller can be programmed by using software like Arduino, Keil uVision.

Get to Know The Price Estimate For Your Paper
Number of pages
Email Invalid email

By clicking “Check Writers’ Offers”, you agree to our terms of service and privacy policy. We’ll occasionally send you promo and account related email

"You must agree to out terms of services and privacy policy"
Write my paper

You won’t be charged yet!

in this project, we have used Keil uVision software.

So for programming purpose, the Atmel microcontroller required the IDE stand for Integrated Development Environment, a compiler for converting the program into MCU readable form called HEX files and IPE stand for integrated Programming Environment which is required to upload the hex file into MCUs) are required.

IDE: Keil uVision IDE

Programming Hardware: USB In-circuit programmer (USBASP)

Programmer: USBASP

To upload the program into the Atmel IC and for simulation purpose, ISIS Proteus software is used.


The MQ-6 sensor is used to detect gases like LPG, iso-butane, propane. It is also used to avoid the noise of alcohol, smoke and cooking fumes as in industry or home. This module gives out the concentration of the gases as an analogue voltage which is equivalent to the concentration of the gases. The module also consists of an on-board comparator for comparing an adjustable preset value and give output as in digital form as high or low. It is af low-cost sensor for many of the applications like used in domestics, gas leakage alarm system, industrial flammable gas alarm and portable gas detector etc.

The sensor has a simple drive circuit shown in the figure. The sensor is applied the 5V supply between pin 2 and pin 5 with a resistance of 26 ± 3 ohms to heat the sensor temperature.

Interfacing of MQ-6 sensor to MCU


LCD (Liquid Crystal Display) is an electronic display module and is commonly used in various type of devices and circuits In the circuit, we have used 16*2 LCD for conveying the gas concentration status. An LCD displays alphanumeric characters such as letters, numbers and symbols and each character is displayed in the 5x7 pixel matrix. This module consist of 16 pins as shown in the figure:

Figure: LCD display

Pin description:


  1. VSS Ground pin
  2. VCC Power supply pin of 5 v
  3. VEE used for adjusting the contrast commonly attached to the potentiometer
  4. RS 0 = Instruction input 1 = Data input
  5. R/W 0 = Write to LCD module 1 = Read from LCD module
  6. EN Enable signal
  7. DB0 Data bus line 0 (LSB)
  8. DB1 Data bus line 1
  9. DB2 Data bus line 2
  10. DB3 Data bus line 3
  11. DB4 Data bus line 4
  12. DB5 Data bus line 5
  13. DB6 Data bus line 6
  14. DB7 Data bus line 7(MSB)
  15. LED+ LCD Backlight (Anode)
  16. LED- LCD Backlight (Cathode)

Interfacing of LCD to MCU

This LCD consist of two types of registers such as Command and Data.


The command register is used to store the command instructions like initializing it, clearing its screen, setting the cursor position, controlling display etc. so to send a command to the LCD: enable pin should be high(EN=1), register select should be low(RS=0), read/write pin should be low(RW=0).


The data register is used to store the data in the ASCII value of character on the LCD. So for displaying a character or data on the LCD: enable pin & register select should be high and read/write will be low.


The buzzer used is Piezoelectric Active Buzzer. It uses the inverse relationship of piezoelectricity. When an alternating current is applied to piezoelectric material than their stretch and compress depending on the frequency of the signal produced a sound. The active Buzzer has a built-in oscillator circuit and when applied with DC voltage will produce a consistent sound.



A rectifier is a used for conversion from an AC signal into DC signal. In the circuit, a diode (a diode is a device that allows current to pass only in one direction) is used for rectification i.e. when the anode of the diode is positive with respect to the cathode also called as forwarding biased condition & blocks current in the reversed biased condition.

The rectifier can be classified as follows:

Half wave rectifier

Half wave rectifier is the simplest type of rectifier which is used for transforming the Alternating voltage signal into the Direct voltage. It only consists the half of the input sine wave (either positive or negative) and rejects the other half of the sine wave. Hence, produced pulsating dc waveform. This rectifier consists of only one diode. During the positive half cycle, when an alternating signal is applied to the circuit, the diode acts as a forwarding biased and current starts flowing through it. Similarly, the diode acts as a reverse biased during the negative half cycle and no current flows through the circuit. Hence, only one half of the input reaches to its destination output which is very inefficient to be used in power supply.

Full wave rectifier

A Full Wave Rectifier is used to convert an ac voltage into a pulsating dc voltage by using both half cycles (positive or negative) of the applied alternating voltage.

During the positive half cycle of the circuit, diode D1 acts as forward biased and diode D2 acts as reverse biased. Hence D1 conducts and D2 remains OFF. Thus the load current will flow through diode D1 and the voltage drop across the load resistance will be equal to the input voltage. While during the negative half cycle of the circuit, diode D1 acts as reverse biased and diode D2 acts as forward biased. Hence D1 remains OFF and D2 conducts. Thus again load current will flow through diode D2 and the voltage drop across the load resistance will be equal to the input voltage.


In this circuit, we have used a full wave bridge rectifier that produces the same output waveform as produced by the full wave rectifier. This is a single-phase rectifier used for rectifying diodes connected in a closed loop "bridge" configuration to produce the specific output.

The biggest advantage of the bridge rectifier is that it does not require any special centre tapped rectifier for reducing its size and cost. One side of the diode is connected to the single secondary winding and the other side is connected to the load. D1 to D4 are the four diodes that are connected in series with respect to two diodes and then it conducts current during each half cycle of the bridge. Diodes D1 and D2 are connected in series during the positive half cycle of the circuit while diodes D3 and D4 are in reversed biased condition and the current start flowing through the load.


As half wave and full wave rectifier give constant DC output then also it does not provide a constant voltage output. For this, the waveform received from these rectifiers has to be smoothened by using a capacitor at the output of the rectifier. That capacitor is known as "FILTER CAPACITOR" or "SMOOTHING CAPACITOR". Then also a small amount of ripple effect will be left.

The capacitor will get charged to its peak value when the filter capacitor will be placed at the output of the rectifier then the stored energy will get discharged through the load and the rectified voltage will drop to zero to keep the voltage constant.

The ripple will be decreased and the costing will be increased if the value of the capacitor is increased. The value of the filter capacitor depends on three things:

  1. The current consumed by the circuit
  2. Waveform frequency
  3. Acceptance angle


A Voltage regulator is a device which converts the varying input voltage into a constant regulated output voltage. A voltage regulator can be of two types

Linear Voltage Regulator

The linear voltage regulator is also known as Resistive Voltage regulator because this regulator dissipates the excessive voltage resistively as heat.

Switching Regulators

Switching regulator is used to regulate the output voltage by switching the Current ON/OFF very rapidly. Since the output is either ON or OFF state. This regulator dissipates very low power and achieving higher efficiency as compared to linear voltage regulators. But they are more complex and generate high noise due to their switching action. For low level of output power, switching regulators tend to be costly but for higher output power they are much cheaper than linear regulators.

Linear Positive Voltage Regulators (78XX series) is the most commonly used voltage regulator where the XX stands for the output voltage. And 79XX series stands for Negative Voltage Regulators.

After filtering the output signal is given to a voltage regulator. The maximum input voltage that can be applied at the input is 35V. Normally there is a 2-3 Volts drop across the regulator so the input voltage should be at least 2-3 Volts higher than the output voltage. If the input voltage gets below the Vmin of the regulator due to the ripple voltage or due to any other reason the voltage regulator will not be able to produce the correct regulated voltage


Blinking of a red LED show there is gas leakage. The LED are interfaced to the microcontroller through a current limiting resistor.


It used to acknowledge the alarm and it is connected to the microcontroller through pin


From the above figure, we supply the 230v AC power to the circuit. But the system requires the 12v AC power supply. So, for converting the 2.12V output of stepdown transformer is an RMS value and its peak value is given by the product of square root of two with RMS value, approximately 17V.

But the require power is 5V DC . For converting the AC to DC

Updated: May 19, 2021
Cite this page

Gas Leakage Detection And Information Display System. (2019, Dec 20). Retrieved from

Gas Leakage Detection And Information Display System essay
Live chat  with support 24/7

👋 Hi! I’m your smart assistant Amy!

Don’t know where to start? Type your requirements and I’ll connect you to an academic expert within 3 minutes.

get help with your assignment