1. 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.
    Dismiss Notice

AUTOMATIC OBSTACLE DETECTION & FIRE FIGHTING ROBOT USING 89c2051 MICROCONTROLLER

Discussion in '8051/8951' started by salman915, Dec 27, 2010.

  1. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    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: Dec 27, 2010
  2. RMMM

    RMMM New Member

    Joined:
    Jan 22, 2010
    Messages:
    357
    Likes:
    3
    Location:
    Maryland
    You may want to post what you have, and explain your problem better.
     
  3. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    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....:)
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada

    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.
     
  6. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    sir could u suggest any programming expert if possible.........their telephone number or any site.....plz sir......
     
  7. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
    Your teacher should have some skills. When's it due?
     
  8. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    aftr 1month....meanz u cannot help me sir....:(
     
  9. Vikky

    Vikky New Member

    Joined:
    Jul 14, 2009
    Messages:
    97
    Likes:
    0
    Location:
    India
    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.
     
  10. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    no problem i wil do by myself......no need of your's.....worst suggestion site till now i hav seen......
     
  11. kingjain17

    kingjain17 New Member

    Joined:
    Jan 1, 2011
    Messages:
    1
    Likes:
    0
    hey dearrrr.... plz can u send me the aal materials related to the fire fighting robot... plz
     
  12. HarveyH42

    HarveyH42 Banned

    Joined:
    Feb 25, 2006
    Messages:
    3,442
    Likes:
    18
    Location:
    Not Here
    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...
     
  13. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    sorry for my rude behaviour sir....:(
    sir leave programming plz help me in circuit functioning & block diagram....
    wil mail u now.....:)
     
  14. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
  15. Vikky

    Vikky New Member

    Joined:
    Jul 14, 2009
    Messages:
    97
    Likes:
    0
    Location:
    India
    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.
     
  16. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    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
     
  17. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    sir i hav snd u d url of d page in which blockdiagram iz given.....explain me the block diagram..
     
  18. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    sir how to post the image here.....i m not getting it on how to post here.....
     
  19. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    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....:):)
     
  20. Vikky

    Vikky New Member

    Joined:
    Jul 14, 2009
    Messages:
    97
    Likes:
    0
    Location:
    India
    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.
     
  21. salman915

    salman915 New Member

    Joined:
    Dec 27, 2010
    Messages:
    18
    Likes:
    0
    k sir.....
     

Share This Page