Design Of GSM Based Smoke Detection And Temperature Monitoring System

DOI : 10.17577/IJERTV2IS4152

Download Full-Text PDF Cite this Publication

Text Only Version

Design Of GSM Based Smoke Detection And Temperature Monitoring System

Teki. Naga. Padmaja, Tejavath. Renuka, Anantha. Sushmitha. Srilakshmi

Department of ECE, Andhra Loyola Institute of Engineering and Technology, Vijayawada-8,

A.P, INDIA.

AT89S52, in this AT is the ATMEL series,

Abstract In this paper, an advanced smoke detection and temperature monitoring system is designed. It detects smoke or its manifestations such as light, heat etc. and provides one or more of the following: alerting the occupants of the building and people around it, summoning the fire extinguishing service and controlling the fire alarm detectors installed in the affected premises.

AT89S52 microcontroller is the main controlling device which controls and synchronises all operations by receiving the signals from the sensors such as smoke sensor, LM35 (temperature sensor). The temperature is detected by the temperature sensor and smoke sensor senses the smoke. A LCD display is used to display the high temperature which is obtained from the signal conditioning unit. By using signals from the AT89S52 microcontroller, a GSM modem is used to send the appropriate alert message to the fire station as well as to the persons responsible for the fire safety of the premises.

This paper is embedded based, embedded means dumping of software in to the hardware. Here, software code is written by using Embedded-C and it is debugged with the help of micro vision Keil. Keil software generates asm file and converts it into hex file. And this software code is dumped into the microcontroller AT89s52 using dumping kit. As this project provides high performance, the speed of operation also increases because of microcontroller AT89S52. It is low cost, reliable and efficient system for fire and smoke alert.

Keywords: Microcontroller, Temperature Sensor, smoke sensor, LCD display, Embedded-C, GSM Modem, Keil software.

89 is the series number, S represents serial communication or

parallel communication and 52 is the series number. When compared to the other microcontrollers, AT89S52 has 8kB Flash memory, erasable read only memory (EROM) and 256 bytes of RAM. So this microcontroller is chosen for the interfacing purpose.

Power supply, it is either 5V power supply or 12V power supply. In order to provide 5V supply or 12V supply, it consists of bridge rectifier and regulators. The bridge rectifier has more efficiency and high stability than full wave rectifier. So it is used to operate the microcontroller. Normally, Microcontroller needs 5V power supply and other peripherals such as GSM needs 12V power supply. In this, it needs both 5V and 12V supply. For this, it uses two regulators namely LM7805 and LM7812 for maintaining the constant voltage.

Power Supply

  1. INTRODUCTION

    Generally, an embedded based project

    Input

    Section

    Microcontroller

    Output Section

    consists of microcontroller or any processor, input section and output section. In this project, in the input section, it contains peripherals such as sensors, switches and the output section consists of LCD, LEDs, and buzzers and GSM modem.

    Microcontroller is the heart of the present work. The microcontrollers used in any project are 8051, 8052, 80C51, 80C52, AT89C51, AT89S52 and so on.

    In this paper, AT89S52 is used. It acts as an interface between sensors and GSM.

    Figure-1.1: A block diagram of embedded system

    The input section is having sensors, switches. Switch is connected to the reset pin of microcontroller to reset the circuit. Sensors are temperature sensor, smoke sensor, humidity sensor etc. In this, sensors are used as input section i.e., temperature sensor (LM35), smoke sensor (MQ-2). Smoke sensor senses the smoke and the

    temperature sensor detects the temperature or fire.

    Coming to the output section, it is having LCD, LEDs, buzzers and GSM. LCD is used to display the high temperature. A simple buzzer is an audio signalling device used to alert the people in the vicinity. it produces sound when temperature is high. A status indicator LED indicates the state of the system. If LED glows red, it indicates occurrence of fire and if it glows green there is no fire. GSM is used to send the appropriate alert message to the fire station as well as to the persons responsible for the fire safety of the premises

  2. INTERFACING

    1. LCD Interfacing

      To interface with microcontroller, LCD requires 5V supply to activate. The ports of microcontroller i.e., port1, port2, port3 are having pull up resistors internally. But the port0 does not have pull up resistors internally. So it cant produce 5V supply. So in order to interface with the microcontroller, it

      requires external pull up resistors and these pull up resistors increases the voltage at port0 to nearly 5V and it activates the LCD.

      Figure2.1: LCD Interfacing

      This section is basically meant to show up the status of the project. This project makes use of

      Liquid Crystal Display to display / prompt for necessary information.

      To send any command from table 2 to the LCD, make pin RS=0.For data, make RS=1.Then send a high to- low pulse to the E pin to enable the internal latch of the LCD.

    2. Temperature sensor interfacing

      Figure2.2: Temperature sensor interfacing

      Temperature sensor senses the temperature. It is conditioned to particular value, if that value rises/drops to a certain level then the microcontroller gets that information. The LM35 produces output voltage which is linearly proportional to the temperature.

      In order to interface with the microcontroller, LM35 needs ADC0804 because the output of the LM35 is in the form of analog signals. But the microcontroller accepts digital signal .So ADC0804 is used to convert analog signal to the digital signal. Analog to digital (A/D, ADC) converters are electrical circuit devices that convert continuous signals, such as voltages or currents, from the analog domain to the digital domain where the signals are represented by numbers.

      The ADC 0804 shown in figure can be functionally divided into 2 basic sub circuits. These two sub circuits are an analog multiplexer and an A/D Converter. The multiplexer uses 8 standard CMOS analog switches to provide to up to 4 analog inputs. The switches are selectively turned on, depending on the data latched in to 3-bit multiplexer address register. The second functional block, the successive

      approximation A/D converter, transforms the analog output of the multiplexer to an 8-bit digital word.

    3. Smoke sensor interfacing

      The smoke sensor is used for detecting the smoke. The smoke sensor has 6 pins. Three of which are connected to Vcc, one is grounded and two are connected to microcontroller through amplification circuit. The amplification circuit uses BC547 transistor which has more withstanding capability.

      The smoke sensor is connected to port2 which act as input to the microcontroller. It produces zero output when there is no smoke and when there is smoke it produces an output signal according to intensity of smoke which is transmitted to the microcontroller. The smoke sensor consists of heater internally which ionises the smoke particles, they will act as charge carriers so a voltage will built up at output.

      Figure2.3: Smoke sensor interfacing

    4. GSM modem interfacing

      The modem will communicate with microcontroller using serial communication. The modem is interfaced to microcontroller using MAX 232, a serial driver. The microcontroller can communicate with theserial devices using its single Serial Port. The logic levels at which this serial port operates is TTL logics. But some of the serial devices operate at RS 232 Logic levels In order to avoid this mismatch, in other words to match the Logic levels, a

      Serial driver is used. And MAX 232 is a Serial Line Driver used to establish communication between microcontroller and GSM modem.

      .

      Figure2.4: Block diagram for GSM modem interfacing

      GSM modem interfacing with microcontroller for sms control of several applications. The SIM300 GSM module is a special type of modem which accepts a sim card and operates like a mobile phone subscribed to a cell phone operator.

      Figure2.5: GSM modem interfacing

      . Text message may be sent through the modem by interfacing only three signals of the serial interface of modem with microcontroller i.e., TxD, RxD and GND.

  3. CIRCUIT DESCRIPTION

    The supply to the circuit is obtained from the power supply circuit. The power supply circuit consists of two regulators LM7805 and LM7812. LM7812 produces 12V supply which is for GSM modem because GSM

    circuit requires 12V to activate. LM7805 produces 5V supply to the microcontroller AT89S52 and other remaining components. The main components in the circuit are microcontroller AT89S52, smoke sensor (MQ-2), temperature sensor (LM35) and GSM modem. The AT89S52 consists of four ports which can be used for both input and output. The circuit uses port1 as input, port2 as in-out, port3 and port0 as output ports. A switch is connected to pin9 to reset the circuit. The crystal oscillators which are present internally in the microcontroller produce frequency which is varying. So, to produce fixed frequency an external crystal oscillator is connected to pins 18 and 19.

    The smoke sensor is used for detecting the smoke. It is connected to port2 which act as input to the microcontroller. It produces zero output when there is no smoke and when there is smoke it produces an output signal which is transmitted to the microcontroller.

    The temperature sensor is

    used for sensing the temperature. LM35 is connected to port1 which also acts as input. It produces signal which is analog in nature but

    the microcontroller accepts the signals which are in digital form. So ADC0804 is used to convert the signal from the temperature sensor into digital form. GSM modem is connected to port3 which is the output. It is interfaced to the microcontroller using MAX232. It is used to transmit the alert message to the fire station. The communication between microcontroller and GSM circuit is done by using serial communication. For this it uses RS232 serial port. The RS232 logic levels and microcontroller logic levels are not equal. So to match the logic levels of microcontroller and RS232 logic levels MAX232 is used to interface GSM modem. The LCD is connected to port0 and port2 which is the output. It is used to display the temperature at the output. At the port0 there are no pull up resistors inbuilt in it to produce 5V supply for the LCD. So, to activate the LCD external pull up resistors are connected at port0 to produce 5V supply.

    Figure3.1: Circuit Diagram

    When the signals from smoke sensor and temperature sensor are high, the pin to which buzzer is connected becomes high and it produces sound. The pins 4, 5, 6 of LCD which are connected to the microcontroller port2 are enabled which are for performing and selecting the commands. So these signals are transmitted to the LCD and it displays the

    temperature. The signals from the microcontroller also to the GSM modem according to the software code dumped in the microcontroller. Then GSM modem then transmits the fire alert message to the fire station or authorised persons. When the signals are low, the normal condition is displayed on the LCD.

  4. SOFTWARE DESCRIPTION

    As this project is embedded based project, the software code is written in embedded c which is compiled debugged and tested. It is simulated with the help of micro vision keil which control the execution of embedded c programs.

    Software used is keil software for embedded c programming.

    About KEIL Software

    It is possible to create the source files in a text editor such as Notepad, run the Compiler on each C source file, specifying a list of controls, run the Assembler on each Assembler source file, specifying another list of controls, run either the Library Manager or Linker (again specifying a list of controls) and finally running the Object-HEX

    Converter to convert the Linker output file to an Intel Hex File. Once that has been completed the Hex File can be downloaded to the target hardware and debugged. Alternatively KEIL can be used to create source files; automatically compile, link and covert using options set with an easy to use user interface and finally simulate or perform debugging on the hardware with access to C variables and memory. Unless you have to use the tolls on the command line, the choice is clear. KEIL Greatly simplifies the process of creating and testing an embedded application.

    void send()

    {

    str("AT+CMGS="); tx(0X22); str("+919848714915");

    tx(0x22);

    tx(0X0d); delay(100); str("fire occured"); delay(100); tx(0X1a);

    delay(1000);

    lcdcmd(0x01); lcdcmd(0x80); strlcd("message sending.. "); strlcd("message sent");

    }

    Figure4.1: Software flow diagram

    The following are the AT commands and sequence of events performed for sending text message to a mobile phone through a GSM modem interfaced with microcontroller :

      • First select the text mode for sms by sending following

    AT command to GSM modem: AT+CMGF =

    1. This command configures the GSM modem in text mode.

      • Send the following AT command for sending sms

        message in text mode along with mobile number to the GSM modem: AT+CMGS =

        +919848714915. This command sends the mobile number of the recipient mobile to the GSM modem.

      • Send the text message string to the GSM modem.

    • Send ASCII code for CTRL+Z i.e.,GSM modem to

    transmit the message to the mobile phone.

    In the software flow diagram, first the microcontroller, LCD, ADC and GSM Modem are initialised by using the commands which are given in the program. Then the input signals from smoke sensor and temperature sensor are read. Next the A/D conversion takes place and the value is displayed on the LCD. Then compare this value with the threshold value. If the value is greater than the threshold value

    the buzzer is ON and sends SMS to the fire station and authorised persons. If it is less than threshold value, a normal condition is displayed on the LCD.

  5. CONCLUSION

    This paper deals with the design and development of smoke detection, temperature monitoring and alerting system for hotels and large commercial establishments to forewarn and initiate measures for accidental fires. The GSM modem provides the information in case a fire occurs. This is a reliable and efficient system for fire alert and intimation to the fire station through GSM mobile communication.

  6. REFERENCES

  1. Muhammad Ali Mazzidi The 8051 Microcontroller and Embedded systems2006.

  2. RAJ KAMAL EMBEDDED SYSTEMS

  3. SIMCOM SIM300 Command Set Hardware interface description

  4. The keil u Vision4 Integrated Development Environment (IDE), www.keil.com/uv4

  5. http://www.engineersgarage.com/electroniccomponents/at89s 52-microcontroller

  6. http://datasheetreference.com/atmel-89s52datasheet.html

Leave a Reply