• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

AUTOMATIC OBSTACLE DETECTION & FIRE FIGHTING ROBOT USING 89c2051 MICROCONTROLLER

Status
Not open for further replies.

salman915

New Member
Hello sir...
sir i m making a project on OBSTACLE DETECTION & FIREFIGHTING ROBOT USING 89c2051 MICROCONTROLLER.....i have everything with me including circuit,flowchart,block diagram,component layout,pcb layout,& microcontroller programs also....i m stuck because m havin problem with program understanding.....if u say i can giv u d program having with me....if u cannot help me out in programming then plz suggest some person or online site....

Yours faithfully,
SALMAN....:)
 
Last edited:

salman915

New Member
SMART BUGGY ROBOT USING 89c2051 MICROCONTROLLER
(AUTOMATIC OBSTACLE DETECTION & FIRE FIGHTING PURPOSE)

PROGRAMMING:

RM0 EQU P1.4 ;
RM1 EQU P1.3 ;
LM1 EQU P1.6
LM0 EQU P1.7
PWMPULSE EQU P1.5
RIGHT EQU P3.5
LEFT EQU P3.4
OBSTICLE EQU P3.1
LED EQU P3.0
FIRE EQU P3.2
FAN EQU P3.7
OFF EQU R1
ON EQU R2
ONCOUNT EQU 32H
OFFCOUNT EQU 33H
ONVALUE EQU 34H
OFFVALUE EQU 35H
MSCONS EQU 200
DELCNTR EQU 30H
RELOAD EQU 0E8H
ORG 00
AJMP START
ORG 100H
ORG 01BH
TMR1INT: PUSH ACC
MOV TH1,#RELOAD
MOV TL1,#RELOAD
MOV A,OFFCOUNT
JNZ PWMOFF
PWMON: SETB PWMPULSE
DJNZ ONCOUNT,INTEND
MOV ONCOUNT,ONVALUE
MOV OFFCOUNT,OFFVALUE
SJMP INTEND
PWMOFF: CLR PWMPULSE
MOV A, OFFCOUNT
JZ ,INTEND
DJNZ OFFCOUNT,INTEND
MOV ONCOUNT,ONVALUE
INTEND: POP ACC
RETI
START:
MOV OFFVALUE,#2
MOV OFFCOUNT,#2
MOV ONCOUNT,#14
MOV ONVALUE,#14
MOV TMOD,#20H
MOV TH1,#RELOAD
MOV TL1,#RELOAD
SETB ET1
SETB EA
SETB TR1
SETB LED
CLR FAN
SS: JNB FIRE,EXTIN
MOV A,#0FFH
MOV C,LEFT
MOV ACC.0,C
MOV C,RIGHT
MOV ACC.1,C
ANL A,#03H
CJNE A ,#3H ,KK
FWD:
SETB LM1
SETB RM1
CLR LM0
CLR RM0
SETB LED
CLR FAN
JNB OBSTICLE,STOP
SJMP SS
EXTIN: CLR LED
CLR RM0 ; BOTH THE MOTORS STOP
CLR RM1
CLR LM0
CLR LM1
SETB FAN
SJMP SS
KK: CJNE A,#01,LM
SETB LM0
CLR LM1
; CLR RM0
CLR RM0
SJMP SS
LM: CJNE A,#02 ,LL
SETB RM0 ; BOTH THE MOTORS STOP
CLR RM1
SETB LM1 ; CLR LM0
CLR LM0
LL: SJMP SS
STOP:
CLR LED
CLR RM0 ; BOTH THE MOTORS STOP
CLR RM1
CLR LM0
CLR LM1
CLR LM1 ; REVERSE
CLR RM1
SETB LM0
SETB RM0
SETB LED
JNB LEFT,GORIGHT
SETB RM1 ;
CLR RM0
CLR LM0
CLR LM1
AJMP SS
GORIGHT: JNB RIGHT,KS
CLR RM0
CLR RM1
SETB LM1
CLR LM0
SETB LED
KS: AJMP SS
end
sir this is the program for my project......can u plz explain this....or giv algorithm & hex code sheet for this program......plz sir help me out....:)
 

blueroomelectronics

Well-Known Member
Who writes assembly code and doesn't comment it. Put comments in your code else nobody's going to bother trying to decipher it. Also use the code tags and learning how proper capitalization works would be a bonus.
 

salman915

New Member
sir could u suggest any programming expert if possible.........their telephone number or any site.....plz sir......
 

Vikky

New Member
sir i m making a project on OBSTACLE DETECTION & FIREFIGHTING ROBOT USING 89c2051 MICROCONTROLLER.....i have everything with me including circuit,flowchart,block diagram,component layout,pcb layout,& microcontroller programs also....
literally saying i am confused with your statement. You said building project and then have everything. So the code writing should have been under you and you have written it after some calculation. So this line makes clear that your project is complete unless you have copied from some where else.
 

HarveyH42

Banned
Who writes assembly code and doesn't comment it. Put comments in your code else nobody's going to bother trying to decipher it. Also use the code tags and learning how proper capitalization works would be a bonus.
Yeah, I don't use comments either... But I do use useful names for variables, and routines. I'm not doing university projects, and seldom have people looking at my programs either. Guess it's kind of a sloppy habit, that I picked up many years ago, with the 6502 I learned on. The assembler didn't have labels, comments, or much of any convenience...
 

salman915

New Member
sorry for my rude behaviour sir....:(
sir leave programming plz help me in circuit functioning & block diagram....
wil mail u now.....:)
 

Vikky

New Member
Since we can't able to see your imagae,i can think that your ckt would be working as

For the obstacle detection, the most and common practice is to send the IR waves in the path in the moving robot. When these ir waves hit some obstacle they will reflect back and will be captured by the IR recevier. This singal from the IR receiver is processed further to get the distance of the object and accordingly will change the rotation of the motor attached to deflect your robot path so that i will escape or hit the obstacle. This can see be seen in your code by refering to functions of Move Left, Move Right and so on.(For futher, see the proximity sensor).

About fire fighting no idea which you have no idea unless you post your block diagram or the circuit.
 

salman915

New Member
thnku sir 4 ur help...:)
about fire fighting i woiuld like to tell you that v hav used a flame sensor & a motor with fan because it's used for demonstration purpose...when flame is detected by the flame sensor then it wil automatically start the high speed fan & blow it off....since this is used for only demonstration we have used a fan....else if same kind of big project is made den it could b chngd to fire extinguisher or water pump,etc
sir wil post u circuit & block diagram asap....plz let me understand the circuit & block diagram simply as u explained above d working principle...
your's faithfully
salman
 

salman915

New Member
sir could you suggest me your site in which i can send the attachments having with me....
so that i can send u my my details asap....:):)
 

Vikky

New Member
Their is no particular ckt for the obstacle detection. You can refer to any of the proxomity sensor. Also if possible take the IR transmitter and reciver pair, provide the supply to them and check the voltage at the collector at the ir receiver by keeping some object so that the ir reflects and keeping away the object. You would surely find the result.

For the flame sensor go through its datasheet and study how it works and generate the signal when the flame is detected and not detected.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top