Stage 2: Extinguishing fire
Constant feedback from sensors is fed to the main module through CON4, and hence position of the fire with respect to the robot is determined. The main module includes an ATmega16 microcontroller, two L293D motor driver ICs to drive motors, a water pump and RF receiver RX1. The circuit diagram of the main module is shown in Fig. 4.


The basic function of the algorithm is to orient the front sensor in front of the fire so that the nozzle of the pump comes directly above the fire source. When this is achieved, the pump starts and extinguishes the fire.
The robot moves with the help of two motors, whose sense of rotation is controlled by the controller, depending on the feedback from the sensor.
Stage 3: RF communication and manual control (manual mode)
The robot is controlled by the operator with the help of a wireless remote (circuit diagram is shown in Fig. 5) that uses an RF module for communicating with the robot.
Switches, push buttons and joysticks are provided on the remote that controls various tasks such as autonomous mode selection, reset and starting the pump. For each command, the remote sends a specific character that is received by the robot and the corresponding operation is performed.
Specimen code for autonomous mode is given as below:
[stextbox id=”grey”]For remote (transmitter):
if(check_bit(&PIND,4)==0)
{
i=’h’; //auto mode
printf(“%c”,i);
}
For robot (receiver):
while(1)
{
scanf(“%c”,&ii);
_delay_ms(10);
switch(ii)
{
case ‘h’: //auto mode
autonomous();
break;[/stextbox]
Software program
Programming of the AVR is done using embedded C language. It is similar to C language but includes all functionalities of C as well as access to AVR pins, peripherals and controls. C code is converted to hex code using WinAVR.
Hex codes generated are burnt into MCUs for the main module (robot) and the remote module. Working of the program is explained as comments in the main module (robot) and remote module source codes.




The program jumps to the main function where the object code actually starts. At remote module, a DIP (DIP1) switch is interfaced using which you can select operating mode (autonomous or manual), switching of the water pump, reset all settings or LED indicators test mode as given in Table I.
Tools used are described below:
WinAVR
WinAVR is a suite of executable, open source software development tools for Atmel AVR series. It includes GNU GCC compiler for C and C++, Programmer’s Notepad, Makefile, etc.
Programmer’s Notepad (PN)
This is a source editor with some IDE features. PN can call any command-line tool and capture its output. It is ideal for calling make utility, which executes make file, which, in turn, calls the compiler, linker and other utilities used to build your software.
Makefile
WinAVR now includes MFile utility, an automatic make file generator for AVR GCC, which can run on various platforms including Windows, FreeBSD and Linux. You can use this utility to quickly generate make files for your project based on some simple menu input.
What is the fire detection range of the robot if we use IR photodiode for detection of the fire ?
During testing the range was about 10-15cm range.
how water pump will work
canu give me the working of the robot sir it is urgent I have a exhibition can u pls help me by following the working or HW it work I have exhibition on 3 November
Sir how can we increase the range of the detection .???
Sir If u dont mind ,can i know the total cost of the project.
send a program
The source folder is present within the article.
Very nice
sir pleease send the source code
It is already available at the end of the article.
Hi, may I know what simulator app is used in making the circuit diagrams? thank you. Looking forward to your response.