Escolar Documentos
Profissional Documentos
Cultura Documentos
SUBMITTED BY:
UBAID-UR-REHMAN (09-2323)
SYED MUHAMMAD UMAR(0-2360)
MESAM AKHTER(09-2381)
TABLE OF CONTENTS:
Contents
TABLE OF CONTENTS: ................................................................................................................................... 2
PROJECT OVERVIEW...................................................................................................................................... 3
CIRCUIT DIAGRAM ........................................................................................................................................ 4
1)USB Bit Whacker: ............................................................................................................................... 4
2)Fire Detection Circuit: ........................................................................................................................ 5
4)Obstacle Avoider Board: .................................................................................................................... 6
5)Motor Driver Board: .......................................................................................................................... 6
6)Linear Actuator triggers board: ......................................................................................................... 7
Working......................................................................................................................................................... 8
Program......................................................................................................................................................... 9
Future plans: ............................................................................................................................................... 11
Components and cost ................................................................................................................................. 12
References .................................................................................................................................................. 13
PROJECT OVERVIEW
AIM:
The aim of this project is to build a microcontroller interfaced robot that will navigate, detect
fire and extinguish it.
Project Design:
Fire-bot is based on five parts:
(i)
(ii)
(iii)
(iv)
(v)
CIRCUIT DIAGRAM
1)USB Bit Whacker:
6
4)Obstacle Avoider Board:
7
6)Linear Actuator triggers board:
Working
LDR
Photo Diode
Obstacle Avioder
Microcontroller
Yes
Obstacle?
Move Away
NO
NO
Search for
Fire
Navigate
Yes
NO
LDR Greater
than
threshold
Yes
Extinguish
Program
#include <p18f2550.h>
#include <delays.h>
#pragma udata
extern void _startup (void);
#pragma code _RESET_INTERRUPT_VECTOR = 0x000800
void _reset (void)
{
_asmgoto _startup _endasm
}
#pragma code
#pragma code _HIGH_INTERRUPT_VECTOR = 0x000808
void _high_ISR (void)
{
;
}
#pragma code _LOW_INTERRUPT_VECTOR = 0x000818
void _low_ISR (void)
{
;
}
#pragma code
#pragma code
/*****************************************************/
void main()
{
#define pd1 PORTAbits.RA0
#define pd2 PORTAbits.RA1
#define pd3 PORTAbits.RA2
#define ldr
PORTAbits.RA3
#define OB1 PORTAbits.RA4
#define OB2 PORTAbits.RA5
TRISB=0x00;
TRISA=0x3f;
10
PORTB=0x00;
ADCON1=0x0f;
while(1)
{
if(ldr==1)
{
if((pd1==1 && pd2==0 && pd3==1) || (pd1==0 && pd2==0 && pd3==0)
|| OB1)
{LATB= 0x09;}
else if (pd1==1 && pd2==1 && pd3==1)
{LATB= 0x05;}
else if ((pd1==0 && pd2==1 && pd3==1)||(pd1==0 && pd2==0 &&
pd3==1) || OB2)
{LATB= 0x08;}
else if ((pd1==1 && pd2==1 && pd3==0)||(pd1==1 && pd2==0 &&
pd3==0))
{LATB= 0x01;}
}
else if ((ldr==0)&&((pd1==1 && pd2==0 && pd3==1) || (pd1==0 && pd2==0 &&
pd3==0)))
{
while(pd1==0 || pd2==0 || pd3==0)
{LATB=
0x10;Delay10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Delay10K
TCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Dela
y10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);LATB=
0x00;Delay10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Delay10K
TCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);Dela
y10KTCYx(200);Delay10KTCYx(200);Delay10KTCYx(200);}
}
else if ((ldr==0)&&((pd1==0 && pd2==1 && pd3==1)||(pd1==0 && pd2==0 &&
pd3==1)))
{LATB= 0x08;}
else if ((ldr==0)&&((pd1==1 && pd2==1 && pd3==0)||(pd1==1 && pd2==0 &&
pd3==0)))
{LATB= 0x01;}
}
}
11
Future plans:
Using better sensors like UV Tron or using image processing to detect
fire. So that we have no interference of sunlight and irrelevant IR
source. So no false alarms.
Using better extinguishing system that can move all axis and
accurately acquire target.
12
Components
Pic18f2550
L293D
Dc Geared Motors x2
Linear Actuator x2
7.5V 2.5A Battery x2
LM339
Ir Photo Diodes x3
LDR
555 Timer
TSOP 1738 x2
7805 Regulator
TIP 122
Total
Price
Rs500.00
Rs100.00
Rs350.00
Rs500.00
Rs360.00
Rs25.00
Rs45.00
Rs20.00
Rs20.00
Rs70.00
Rs45.00
Rs25.00
Rs2,060.00
13
References