You are on page 1of 6

Automatic Fire Control System using GSM & Microcontroller

Sharmila.S,Swetha.S ECE Department,Anna University Easwari Engineering College

Bharathi Salai,Ramapuram,

Chennai-600089

login2sharmila@gmail.com

swethasankar91@gmail.com

Abstract

  • 8. Dc Motor

Aim.

Designing Automatic Fire Control System using GSM and Microcontroller.

Description.

This project is used for intimating and controlling fire in industries / offices/Home immediately after the fire break out without any delay. As soon as fire breaks out the sensor detects the fire and sends a message to the programmed number ( can be the control room of the industry,a nearby fire station , ambulance etc., ). It helps the fire service to arrive to the spot immediately without any delay thus saving lives and property. Then it moves to the fire sensed place and pumps water so that it can keep the fire under control till the fire service reachs the place.

Working Principle.

The device is placed in production units, canteens,

manufacturing units, inside the office rooms etc

When fire

.. breaks out the sensor senses the fire , automatically sends the message “ fire fire-location/address” to the control room or to the nearby fire station using GSM technology. For sending the message we use a GSM modem RS232 SERIAL COMMUNICATION, through microcontroller to perform these operations.Then it moves to the fire sensed place to pump the water.

Hardware Requirement.

  • 1. PIC 16F877A Micro Controller

  • 2. IC232CPE

  • 3. RS-232 Interface.

  • 4. A Modem

  • 5. +5V Power Supply Components

  • 6. FIRE SENSOR.

  • 7. Water Pump

Keywords.

Project is used for intimating and controlling fire Accident in industry / office/ Home immediately after the fire break out without any delay by sending SMS using GSM MODEM and pumping water. Fully Automated using Microcontroller.

GSM technique is employed.

Introduction.

The security of home, laboratory, office, factory and building is important to human life .Most of the accidents can be stopped from causing severe damage when the appropriate service is Sought without delay. Fire can be brought to control if the control room is intimated immediately about the break out without any delay. Manual work always take more time. Hence we use a system with light sensor which can sense the FIRE immediately once the fire breaks out and it spontaneously sends a SMS message to the control room of the industry or company and to the fire station using GSM technology.

Background Of the Project .

In this project the robot senses the FIRE with the help of light sensor placed in the device. +12V battery is used to supply voltage. Microcontroller can work only with +5V. Hence IC 7805 is used to convert +12V to +5V.Max 232CPE is used to convert the 5V to TTL. RS232 is used for serial communication and it is connected to the modem through which message is sent through the GSM modem.

Motor Driver IC L293D.

The L293 and L293D are quadruple high-current drivers. The L293 is designed to provide bidirectional drive

currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36v. The pin numbers 3 and 6 are connected to one motor while the pins 11 and 14 are connected to the other motor. The power supply to the motors is also given through the motor driver IC. The pins 1,2,5,7 are enable pin.

Fire Sensor.

Fire sensor comes with IR receiver. This IR receiver will give output based on the fire. The output of IR receiver is connected to instrumentation amplifier to amplify the signal. And the instrumentation amplifier output is given to comparator finally comparator output is connect to I/O port of PIC 16F877A micro controller. According to changes in the light intensity the fire sensor IR receiver will give analog voltage. The sensing range of the fire sensor is up to half meter. This IR Receiver output voltage is amplified through instrumentation amplifier and is compared. According to sensor voltage the comparator will give output. This final output is connected to micro controller.

Power Supply.

Voltage regulators comprise a class of widely used ICs. The series 78 regulators provide fixed positive regulated voltages from 5 to 24 volts. A fixed three-terminal voltage regulator has an unregulated dc input voltage, Vi, applied to one input terminal, a regulated dc output voltage, Vo, from a second terminal, with the third terminal connected to ground.

For ICs, microcontroller, LCD 5 DC volts For sensor, motors 12 DC volts

GSM Technology.

GSM (Global System for Mobile Communications:

originally from Group Special Mobile) is the world's most popular standard for mobile telephony systems. Subscribers can use their phones throughout the world, enabled by international roaming arrangements between mobile network operators. GSM differs from its predecessor technologies in that both signaling and speech channels are digital, and thus GSM is considered a second generation (2G) mobile phone system. This also facilitates the wide-spread implementation of data communication applications into the system.GSM also pioneered low-cost implementation of the short message service (SMS), also called text messaging, which has since been supported on other mobile phone standards as well.

Micro controller.

It is 8-bit Microcontroller

System is RISC Architecture

It has 35-Instructions only

Compatibility: avail 28/40 Pin ICs

Operating Speed Max 20 MHz, Voltage-(2-5.5V).

Features of Microcontroller.

It has 5 Ports for Internal and External usage

 

It has on chip Timers. 3 Timers are avail

It has in built Analog to Digital Converter

In built Multiplexer availability for signal Selection

It

has

serial

as

well

as

Parallel

Communication

facilities

 

In

built

Capture,

Compare

and

Pulse

width

modulation

 

Program.

void main() { trisc=0x00; // PORC OUTPUT FOR SMS TRANSMIT trisa=0x00; // PORTA AS OUTPUT FOR MOTOR DRIVE porta =0x20; //OPTION_REG =0x80; ccp1con = 0x00; trisc = 0x00; // SMS TRANSMIT TO GSM MODEM AS OUTPUT trisd = 0xFF; // PORTD AS INPUT FOR FIRE SENSOR trise = 0x00; // control for lcd trisb = 0x00; // data bits fOR LCD trisa = 0x00; // trise = 0x00; bit_clear(porte,2); // to select command register

delay_ms(150);

lcdcmd(0x38); // 2 lines and 5x7 matrix

delay_ms(150);

lcdcmd(0x0E); // display on cursor blinking

delay_ms(15);

lcdcmd(0x01); // clear display

delay_ms(15);

//lcdcmd(0x01);

//delay_ms(15);

lcdcmd(0x06); // increment cursor

delay_ms(15);

lcdcmd(0x80); // display first line FIRST COLUMN

delay_ms(15);

lcddata ('F');

delay_ms(15);

lcddata('I');

delay_ms(15);

lcddata ('R');

delay_ms(15);

lcddata ('E');

set_tris_c(0xC0); //SET TX_PIN & CLEAR

delay_ms(15);

RC_PIN;

lcddata ('R');

set_tris_b(0x00);

delay_ms(15);

printf("AT\r\n"); //CHECK WHETHER

lcddata('O');

COMMUNICATION IS ESTABLISHED

delay_ms(15);

delay_ms(1000);

lcddata ('B');

printf("ATE0\r\n"); //ECHO OFF

delay_ms(15);

delay_ms(1000);

lcddata ('O');

printf("AT+CMGF=1\r\n"); // SWITCH TO TEXT

delay_ms(15);

MODE

lcddata ('T');

delay_ms(1000);

delay_ms(15);

printf("AT+CMGS=\"+919841604007\"\r\n"); //SEND

trisd=0xFF;

SMS TO THE MOBILE NUMBER

x=portd; // X BECOME PORTD CONTENT

delay_ms(1000);

while(1)

printf("FIRE AT production fire \r\n",v);

{trisa = 0x00;

delay_ms(150);

delay_ms(1000);

porta = 0x20; trisd = 0xff;

//printf("AT\r\n"); printf(v);

x= portd;

putc(0x1A);

trisc = 0x00;

putc(0xE5);

portc = 0x00;

//delay_ms(500);

if ( x==0xFD)

// printf("%x",v);

{porta = 0x00;

putc(0X1A);

bit_clear(porte,2); // to select command register

trisa = 0x00; porta = 0x01; // ROBOT TURN RIGHT DIRECTION

lcdcmd(0x38); // 2 lines and 5x7 matrix

delay_ms(5000);

delay_ms(150);

porta = 0x00;

lcdcmd(0x0E); // display on cursor blinking

delay_ms(100);

delay_ms(15);

porta = 0x05; // BUZZER ON AND ROBOT MOVE

lcdcmd(0x01); // clear display

FORWARD DIRECTION

delay_ms(15);

delay_ms(2800);

//lcdcmd(0x01);

porta = 0x00;

//delay_ms(15);

delay_ms(300);

lcdcmd(0x06); // increment cursor

porta = 0x01;

delay_ms(15);

delay_ms(1000);

lcdcmd(0x80); // display first line

porta = 0x30; //WATER PUMP MOTOR ON BY

delay_ms(15);

SWITCHING THE RELAY

lcddata ('P');

delay_ms(5000);

delay_ms(15);

porta = 0x00; // WATER PUMP MOTOR WILL STOP

lcddata('R');

delay_ms(100);

delay_ms(15);

porta = 0x01;

lcddata ('O');

delay_ms(3500);

delay_ms(15);

porta = 0x05;

lcddata ('D');

delay_ms(2200);

delay_ms(15);

porta = 0x20; //ROBOT REACH THE STARTING

lcddata ('U');

PLACE

delay_ms(15);

x=0x00;}

lcddata('T');

else if( x==0xFE)

delay_ms(15);

{

lcddata ('I');

trisa = 0x00;

delay_ms(15);

porta = 0x00;

lcddata ('O');

v = 0x1A;

delay_ms(15);

i=5;

lcddata ('N');

set_tris_c(0xC0); //SET TX_PIN & CLEAR RC_PIN;

delay_ms(15);

set_tris_b(0x00);

v = 0x1A;

printf("AT\r\n");

i=5;

delay_ms(1000);

printf("ATE0\r\n");

porta = 0x05;

delay_ms(1000);

delay_ms(1800);

printf("AT+CMGF=1\r\n");

porta = 0x00;

delay_ms(1000);

delay_ms(100);

printf("AT+CMGS=\"+919841604007\"\r\n");

// porta = 0x2A;

delay_ms(1000);

// delay_ms(1700);

printf("FIRE AT OFFICE fire \r\n",v);

porta = 0x20;

delay_ms(1000);

x=0x00;

//printf("AT\r\n"); printf(v);

} }

putc(0x1A);

}

putc(0xE5);

Summary Of the Project.

//delay_ms(500);

// printf("%x",v);

The basic idea is to automatically intimate the control room

putc(0X1A);

about the break out of fire in their units without any delay.

delay_ms(150);

Fire sensor will give appropriate analog voltages to the

lcdcmd(0x38); // 2 lines and 5x7 matrix

microcontroller immediately after the fire is sensed. Then the

delay_ms(150);

microcontroller sends the message “Fire Fire-Address ” to the

lcdcmd(0x0E); // display on cursor blinking

preprogrammed mobile/phone number.

delay_ms(15);

lcdcmd(0x01); // clear display

delay_ms(15);

.

delay_ms(1000); delay_ms(1800); printf("AT+CMGF=1\r\n"); porta = 0x00; delay_ms(1000); delay_ms(100); printf("AT+CMGS=\"+919841604007\"\r\n"); // porta = 0x2A; delay_ms(1000); // delay_ms(1700);

//lcdcmd(0x01);

//delay_ms(15);

lcdcmd(0x06); // increment cursor

delay_ms(15);

lcdcmd(0x86); // display first line

delay_ms(15);

lcddata ('O');

delay_ms(15);

lcddata('F');

delay_ms(15);

lcddata ('F');

delay_ms(15);

Fig.1 Block diagram of Automatic Fire Control System

lcddata ('I');

delay_ms(15);

lcddata ('C');

delay_ms(15);

lcddata('E');

.

delay_ms(1000); delay_ms(1800); printf("AT+CMGF=1\r\n"); porta = 0x00; delay_ms(1000); delay_ms(100); printf("AT+CMGS=\"+919841604007\"\r\n"); // porta = 0x2A; delay_ms(1000); // delay_ms(1700);

delay_ms(15);

trisa = 0x00; porta = 0x01;

delay_ms(2350);

porta = 0x00;

delay_ms(100);

porta = 0x25;

delay_ms(1800);

porta = 0x00;

delay_ms(300);

porta = 0x30;

delay_ms(5000);

porta = 0x00;

delay_ms(100);

porta = 0x01;

Fig. 2 Circuit Diagram of Sensors

delay_ms(4500);

porta = 0x00;

delay_ms(100);

Fig 3 PIC16F877A Micro Controller Fig. 4. Pin Diagram of PIC16F877A Fig. 5. GSM Modem Fig

Fig 3 PIC16F877A Micro Controller

Fig 3 PIC16F877A Micro Controller Fig. 4. Pin Diagram of PIC16F877A Fig. 5. GSM Modem Fig

Fig. 4. Pin Diagram of PIC16F877A

Fig 3 PIC16F877A Micro Controller Fig. 4. Pin Diagram of PIC16F877A Fig. 5. GSM Modem Fig

Fig. 5. GSM Modem

Fig 3 PIC16F877A Micro Controller Fig. 4. Pin Diagram of PIC16F877A Fig. 5. GSM Modem Fig

Fig .6 Automatic Fire Control System using GSM & μC

Fig 3 PIC16F877A Micro Controller Fig. 4. Pin Diagram of PIC16F877A Fig. 5. GSM Modem Fig

Fig 7 Motor Driver L293D

TABLE 1. M emory

Flash Program

8Kx14 Words

RAM

  • 368 Bytes,

EEPROM Data

  • 256 Bytes

I take immense pleasure in thanking my institution for their guidance and support for my project on Automatic Fire Control System using GSM & Microcontroller”.

Thus this project is used for intimating and controlling fire in industry / office/Home immediately after the fire break out without any delay. Since manual work always take more time, automation is the smarter way of handling FIRE BREAK OUTS..

ACKNOWLEDGMENT

REFERENCES

  • 1. Douglas V Hall, “Microprocessor and interfacing, programming and hardware” TMH, 2006

  • 2. Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin D.MCKinlay The 8051

  • 3. Microcontroller and Embedded Systems, Second Edition, Pearson Education 2008.

  • 4. Kenneth J. Ayala, “The 8086 Microprocessor: Programming & Interfacing The PC”, Delmar Publishers, 2007.

  • 5. A K Ray, K M Bhurchandi, Advanced Microprocessors and Peripherals, TMH, 2007.