heavy explosive removing robot

Embed Size (px)

Citation preview

  • 7/31/2019 heavy explosive removing robot

    1/35

    Chapter 1 INTRODUCTION

    1.1 NEED FOR A HEAVY EXPLOSIVE ROBOT

    Today, explosive removing robot is an interesting area of robotics mainly because this

    technology is ripening and the price of the robot has been accepted. Dangerous explosives can be

    anywhere and can cause serious damage wherever it is present. They can be in the open field or in the

    closed house. It can explode at anytime and can cause death or serious injury to numerous people

    depending upon its intensity and the place where it is set up. So to avoid this, we go in for a robot

    which is programmed to move, search, grasp, lift and put the explosive at a safer point. The earlier

    methods employed people to move closer to the explosive and diffuse it by hand. This method was

    quite risky as they werent assured of their life while carrying out this job. And moreover this process

    usually required people to wear explosion resistant dresses which were quite and hefty. So to

    overcome all these problems and for the safety of people we go in for a robot which does all the work

    of people with a precise and reliable manner.

    1.2 EXISTING ROBOTS IN THE WORLD

    There are a host of explosive removing robots across the world. Some of them are listed below:

    1.2.1 MK8 made by the British AB Electronic products company. 1.2.2

    ANDROS F6A made by America REMOTEC company.

    1.2.3 Defender made by British ALLEN company.

    1.2.4 RMI-9WT made by Canada PEDSCO company.

    1.2.5 TEODOR made by German TELEROB company.

    1.2.6 Lingxi-B made in China.

    1.2.7 Versatrax made by Canada INUKTUN company.

    1

  • 7/31/2019 heavy explosive removing robot

    2/35

    Chapter 2 LITERATURE REVIEW

    2.1 BACKGROUND

    The use of remote controlled vehicles in various fields prompted engineers and

    scientists to discover one such vehicle for bomb disposal purposes. There are various kinds of

    explosives such as chemical, biological, nuclear etc. The robots developed helped in the disposal of a

    particular kind of explosive. The Heavy explosive robot research control technique aids in disposing

    heavy explosives which are quite difficult to lift manually.

    2.2 INTERPRETATION

    The robots were fitted with cameras, microphones, and sensors for chemical, biological, or

    nuclear agents. Many of these robots even have hand-like manipulators in case a door needs to be

    opened, or a bomb requires diffusion without moving. Then there are projectile water disrupters which

    fires an explosively-propelled jet of water to disrupt the circuitry of a bomb and thereby disable it with

    a low risk of detonation. The robots are generally controlled from a remote location to avoid

    unpredictable explosion. Certain robots have specialized abilities such as image mapping, accurate

    vehicle positioning, multi terrain vehicles.

    The heavy explosive robot research control technique is used to lift particularly heavy

    explosives. The robot weighs 450kgs and has a lift weight of 50kgs. It has a 7 joint arm for pickingexplosive. It has 5 cameras for control from remote location. It is powered by means of a battery. Since

    the majority composition of heavy explosives constitute metals it is also fitted with a metal sensor.

    The prototype is powered by 230V mains stepped down to 12V DC by means of a step down

    transformer. Zigbee protocol is used for communication between the transmitter and receiver stations.

    The robot can be controlled at a distance of 100m from the transmitter station. The position of the

    robot is adjusted by trial and error. The robot weighs 2kgs and can lift 300gms. The robot has a camera

    for controlling from a remote location. The movement of the wheels, the spinning of the robotic arm

    and the picking of mine is controlled individually by respective relay drives.

    2

  • 7/31/2019 heavy explosive removing robot

    3/35

    Chapter - 3 HARDWARE SPECIFICATIONS

    An embedded system is a special-purpose computer system designed to perform a dedicated

    function. Since the system is dedicated to specific tasks, design engineers can optimize it, reducing the

    size and cost of the product. Embedded system comprises of both hardware and software. Embedded

    system is fast growing technology in various fields like industrial automation, home appliances,

    automobiles, aeronautics etc. Embedded technology uses PC or a controller to do the specified task

    and the programming is done using assembly language programming or embedded C.

    The various hardware specifications that come in place in this robot are as follows:

    3.1 8051 MICROCONTROLLER

    A microcontroller (also microcontroller unit, MCU or C) is a small computer on a single

    integrated circuit consisting of a relatively simple CPU combined with support functions such as a

    crystal oscillator, timers, etc. The reason for choosing a microcontroller over other control units is

    because they are easily available and widely used.

    3.2 KEYPAD

    Keypads and LCDs are the most widely used input/output devices of the 8051. The keyboard

    fundamentals, along with key press and key detection mechanisms, and a keyboard interfacing to an

    8051 are necessary to understand the keypad working. The advantage of this input device is that it is

    easy to handle and work upon.

    3.3 ZIGBEE

    ZigBee is a wireless technology developed as an open global standard to address the unique

    needs of low-cost, low-power, wireless sensor networks. The standard takes full advantage of the IEEE

    802.15.4 physical radio specification.

    3.4 LCD LIQUID CRYSTAL DISPLAY

    LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical power

    consumption enables it to be used in battery-powered electronic equipment. This is mainly used at the

    transmitting end to view the commands given to the robot.

    3

  • 7/31/2019 heavy explosive removing robot

    4/35

    3.5 RELAY

    A relay is an electrically operated switch. Electric current through the coil of the relay creates

    a magnetic field which attracts a lever and changes the switch contacts. This is the most common

    method used for driving the robot mechanism.

    3.6 DC MOTOR

    The advantages of a DC motor over other motors and the reason why we are going for this in

    our heavy explosive removing robot mechanism is its low initial cost, high reliability, and simple

    control of motor speed.

    4

    http://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Electric_current
  • 7/31/2019 heavy explosive removing robot

    5/35

  • 7/31/2019 heavy explosive removing robot

    6/35

    Bit-addressable data objects

    Built-in interface for the RTX51 real-time operating system

    Support for dual data pointers on Atmel, AMD, Cypress, Dallas Semiconductor, Infineon,

    Philips, and Triscend microcontrollers

    Support for the Philips 8xC750, 8xC751, and 8xC752 limited instruction sets

    Support for the Infineon 80C517 arithmetic unit

    4.2.2 Macro Assembler

    The A51 Assembler is a macro assembler for the 8051 family of microcontrollers. It

    supports all 8051 derivatives. It translates symbolic assembly language mnemonics into relocatable

    object code where the utmost speed, small code size, and hardware control are critical. The macro

    facility speeds development and conserves maintenance time since common sequences need only be

    developed once. The A51 assembler supports symbolic access to all features of the 8051 architecture.

    The A51 assembler translates assembler source files into a relocatable object modules. The DEBUG

    control adds full symbolic information to the object module and supports debugging with the Vision3

    Debugger or an in-circuit emulator. In addition to object files, the A51 assembler generates list files

    which optionally may include symbol table and cross reference information.

    4.2.3 Vision 3 IDE

    The Vision3 IDE from Keil Software combines project management, make facilities, source

    code editing, program debugging, and complete simulation in one powerful environment. Vision3

    helps you get programs working faster than ever while providing an easy-to-use development platform.

    The editor and debugger are integrated into a single application and provide a seamless embedded

    project development environment.

    6

  • 7/31/2019 heavy explosive removing robot

    7/35

    Chapter - 5 PROJECT DESCRIPTION

    5.1 PROBLEM DEFINITION

    The main problem that has been arising in the military battlefield in the current year is the

    correct searching of explosive and either detonating it or placing it in a safer place without any loss of

    life. This is quite possible with the usage of this robot as it does all the operation of a human. The

    current robot used for this case can only move a lesser distance that too without any obstacle in front

    of it. This hinders a great problem to the people as the area should be first free of any obstacle in front

    of the robot and then the pick and place of the explosive will be carried out. This problem is solved by

    using zigbee communication protocol as the latter will allow to control the robot with some minimum

    specification with the obstacle in between the robot and the controller. Zigbee, thereby tends to give

    you great support where we have an explosive in the middle of heavily populated area. The heavy

    explosive robot can lift heavier explosives and can dispose it at a safer location.

    7

  • 7/31/2019 heavy explosive removing robot

    8/35

    5.2 OVERVIEW OF THE PROJECT

    The robot has two units which make the final output. They are the transmitting end and the

    receiving end. The block diagram of these are as given below:

    5.2.1 Pictorial representation

    Fig.5.1 General view of the robot

    8

  • 7/31/2019 heavy explosive removing robot

    9/35

    5.2.2 Block diagram

    9

    Power Supply

    KEYPAD8051

    Micro

    Controller

    LCD

    ZIGBEE

    RELAY

    Driver

    8051

    Micro

    Controller

    Power

    Supply

    Mine Detection

    Sensor

    RELAY

    DriverSignal

    conditioning

    Circuit

    R

    O

    B

    O

    T

    ZIGBEE

    Buzzer

  • 7/31/2019 heavy explosive removing robot

    10/35

    5.3 INTERFACING DIAGRAM

    5.3.1 Transmitter station

    The transmitter end consists of an microcontroller to get inputs from the keypad and transmit them

    through the Zigbee transceiver. The power supply converts 230VAC power to 5V DC and gives it to

    the microcontroller. The LCD is interfaced to the microcontroller to verify the commands given to the

    robot. We also have a CCTV to monitor the robot from a remote location

    Fig 5.2 Interfacing of the transmitter components

    10

  • 7/31/2019 heavy explosive removing robot

    11/35

    5.3.1.1 Flow Chart

    11

  • 7/31/2019 heavy explosive removing robot

    12/35

    5.3.2 Receiver station

    The receiver station receives signals from transmitter through the Zigbee transceiver and the

    movement of the robot is controlled. The microcontroller identifies the signals received from the

    Zigbee transceiver and gives the output to the appropriate relay driver. The relay driver controls the

    motor to propel the robot forward, backward and in either directions. The movement of the robotic

    arm is also controlled in similar manner.

    Fig. 5.3 Interfacing of the receiver components

    5.3.2.1 Flow Chart

    12

  • 7/31/2019 heavy explosive removing robot

    13/35

    13

  • 7/31/2019 heavy explosive removing robot

    14/35

    14

  • 7/31/2019 heavy explosive removing robot

    15/35

    5.4 MODULES

    There are a total of six modules that control the whole working of the robot. These modules are

    given as below:

    8051 Microcontroller

    Keypad

    LCD Liquid crystal display

    Zigbee

    Relay

    DC Motor

    5.5 MODULES DESCRIPTION

    5.5.1 8051 Microcontroller

    A microcontroller (also microcontroller unit, MCU or C) is a small computer on a

    single integrated circuit consisting of a relatively simple CPU combined with support functions such as

    a crystal oscillator, timers and etc.

    5.5.1.1 Schematic

    Fig. 5.4 Pin diagram of 8051 micro-controller

    15

  • 7/31/2019 heavy explosive removing robot

    16/35

    5.5.1.2 Power supply unit for the microcontroller

    The power supply section is the important one. It should deliver constant output

    regulated power supply for successful working of the project. A 0-12V/1 mA transformer is used for

    this purpose. The primary of this transformer is connected in to main supply through on/off switch&

    fuse for protecting from overload and short circuit protection. The secondary is connected to the diodes

    to convert 12V AC to 12V DC voltage. And filtered by the capacitors, which is further regulated to

    +5v, by using IC 7805.

    Fig. 5.5 Power supply

    5.5.2 Keypad

    Keyboards and LCDs are the most widely used input/output devices of the 8051, and a

    basic understanding of them is essential. In this section, we first discuss keyboard fundamentals, along

    with key press and key detection mechanisms, Then we show how a keyboard is interfaced to an 8051.

    5.5.2.1 Interfacing the keyboard to the 8051

    At the lowest level, keyboards are organized in a matrix of rows and columns. The

    CPU accesses both rows and column through ports; therefore, with two 8-bit ports, an 8*8 matrix of

    keys can be connected to a microprocessor. When a key pressed, a row and column make a

    connect; otherwise, there is no connection between row and column. In IBM PC keyboards, a single

    microcontroller (consisting of microprocessor, RAM and EPROM, and several ports all on a single

    16

  • 7/31/2019 heavy explosive removing robot

    17/35

    chip) takes care of software and hardware interfacing of keyboard. In such systems it is the function of

    programs stored in the EPROM of microcontroller to scan the keys continuously, identify which one

    has been activated, and present it to the motherboard. In this section we look at the mechanism

    by which the 8051 scans and identifies the key.

    5.5.2.2 Scanning and identifying the key

    The figure shows a 4*4 matrix connected to two ports. The rows are connected to

    an output port and the columns are connected to an input port. If no key has been pressed, reading

    the input port will yield 1s for all columns since they are all connected to high (Vcc) If all the rows are

    grounded and a key is pressed, one of the columns will have 0 since the key pressed provides the path

    to ground. It is the function of the microcontroller to scan the keyboard continuously to detect and

    identify the key pressed. How it is done is explained next.

    Fig. 5.6 Matrix representation of kerpad

    5.5.2.3 Grounding rows and reading columns

    To detect a pressed key, the microcontroller grounds all rows by providing 0 to the

    output latch, and then it reads the columns. If the data read from the columns is D3-D0=1111, no key

    has been pressed and the process continues until a key press is detected. However, if one of the column

    bits has a zero, this means that a key press has occurred. For example, if D3-D0=1101, this means that

    a key in the D1 column has been pressed. After a key press is detected, the microcontroller will go

    through the process of identifying the key. Starting with the top row, the microcontroller grounds it by

    providing a low to row D0 only; then it reads the columns. If the data read is all1s, no key in that row

    is activated and the process is moved to the next row. It grounds the next row, reads the columns,

    17

  • 7/31/2019 heavy explosive removing robot

    18/35

    and checks for any zero. This process continues until the row is identified. After identification of the

    row in which the key has been pressed, the next task is to find out which column the pressed key

    belongs to. This should be easy since the microcontroller knows at any time which row and

    column are being accessed.

    5.5.3 LCD Liquid crystal display

    It is an electronically-modulated optical device made up of any number of pixels filled with

    liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in color

    or monochrome. The earliest discovery leading to the development of LCD technology, the discovery

    of liquid crystals, dates from 1888. By 2008, worldwide sales of televisions with LCD screeEach pixel

    of an LCD typically consists of a layer of molecules aligned between two transparent electrodes, and

    two polarizing filters, the axes of transmission of which are (in most of the cases) perpendicular to

    each other. With no actual liquid crystal between the polarizing filters, light passing through the first

    filter would be blocked by the second (crossed) polarizer. In most of the cases the liquid crystal has

    double refraction.The LCD standard requires 3 control lines and 8 I/O lines for the data bus.

    8 data pins D7:D0

    Bi-directional data/command pins.

    Alphanumeric characters are sent in ASCII format.

    RS: Register Select

    RS = 0 -> Command Register is selected

    RS = 1 -> Data Register is selected

    R/W: Read or Write

    0 -> Write, 1 -> Read

    E: Enable (Latch data)

    Used to latch the data present on the data pins.

    A high-to-low edge is needed to latch the data.

    The 8 data lines are connected to PORT 1 of 8051 microcontroller. The three control

    lines( RS,RW and EN ) are connected to PORT 3.5,3.6 and 3.7 respectively.

    18

  • 7/31/2019 heavy explosive removing robot

    19/35

    5.5.3.1 Interfacing diagram

    Fig. 5.7 Interfacing of LCD

    5.5.4 Zigbee

    ZigBee is a wireless technology developed as an open global standard to address the unique

    needs of low-cost, low-power, wireless sensor networks. The standard takes full advantage of the IEEE

    802.15.4 physical radio specification and operates in unlicensed bands worldwide at the following

    frequencies: 2.4002.484 GHz, 902-928 MHz and 868.0868.6 MHz. The power levels (down from

    5v to 3.3v) to power the zigbee module. The communication lines (TX, RX, DIN and DOUT) to the

    appropriate voltages.

    19

  • 7/31/2019 heavy explosive removing robot

    20/35

    5.5.4.1 Interfacing Diagram

    Fig. 5.8 Interfacing of Zigbee

    5.5.5 Relay

    A relay is an electrically operated switch. Electric current through the coil of the

    relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current

    can be on or off so relays have two switch positions and there are double-throw (changeover)

    switches. It consists of a coil of wire surrounding a soft iron core, an iron yoke, which provides a low

    reluctancepath for magnetic flux, a movable ironarmature, and a set, or sets, of contacts. In this

    condition, one of the two sets of contacts in the relay pictured is closed, and the other set is open. The

    P0_0, P0_1, P0_2 and P0_3 pin of controller is assumed as data transmit pins to the relay through

    relay driver ULN 2003. ULN 2003 is just like a current driver.

    20

    http://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Coilhttp://en.wikipedia.org/wiki/Magnetic_corehttp://en.wikipedia.org/wiki/Magnetic_reluctancehttp://en.wikipedia.org/wiki/Magnetic_reluctancehttp://en.wikipedia.org/wiki/Armature_(electrical_engineering)http://en.wikipedia.org/wiki/Armature_(electrical_engineering)http://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Coilhttp://en.wikipedia.org/wiki/Magnetic_corehttp://en.wikipedia.org/wiki/Magnetic_reluctancehttp://en.wikipedia.org/wiki/Armature_(electrical_engineering)
  • 7/31/2019 heavy explosive removing robot

    21/35

    5.5.5.1 Interfacing Diagram

    Fig. 5.9 Interfacing of relay

    5.5.5.2 Logic Diagram

    Fig. 5.10 Relay logic

    21

  • 7/31/2019 heavy explosive removing robot

    22/35

    5.5.6 DC Motor

    A DC motor is designed to run on DC electric power. Two examples of pure DC

    designs are Michael Faraday's homopolar motor (which is uncommon), and the ball bearing motor,

    which is (so far) a novelty. By far the most common DC motor types are the brushed and brushless

    types, which use internal and external commutation respectively to create an oscillating AC current

    from the DC sourceso they are not purely DC machines in a strict sense. We in our project are using

    brushed DC Motor, which will operate in the ratings of 12v DC 0.6A which will drive the flywheels in

    order to make the robot move.

    5.5.6.1 Schematic

    Fig. 5.11 DC Motor connections

    22

  • 7/31/2019 heavy explosive removing robot

    23/35

    Chapter - 6 PROTOTYPE ANALYSIS AND TESTING

    6.1 Dimensions

    Length of the robot 36 cm

    Breadth of the robot 25 cm

    Height with arm straightened 62 cm

    Height below the arm 27 cm

    Diameter of the back wheel 9.25 cm

    Diameter of the front wheel 4.25 cm

    6.2 Movement of the robot

    Forward movement for one step 11 cm

    Backward movement for a step 11 cm

    Angular base wheel rotation for each step 30

    Angular arm rotation for each step 51.5

    Angular displacement of the vertical arm 3.75

    6.3 Keypad details

    S/w 1 Forward movement of the robot

    S/w 2 Backward movement of the robot

    S/w 3 Angular right movement of the robot

    S/w 4 Angular left movement of the robot

    S/w 5 Angular right movement of the robotic arm

    S/w 6 Angular left movement of the robotic arm

    S/w 7 Angular movement of the arm upwards

    S/w 8 Angular movement of the arm downwardsS/w 9 Closes the width of the robotic finger.

    S/w 10 Opens up the width of the robotic finger.

    23

  • 7/31/2019 heavy explosive removing robot

    24/35

    6.4 Snapshots

    Fig. 6.1 Picking of an object by the arm

    Fig. 6.2 Transmitting station

    24

  • 7/31/2019 heavy explosive removing robot

    25/35

    Fig. 6.3 Robot at work

    Fig. 6.4 Robot when powered down

    25

  • 7/31/2019 heavy explosive removing robot

    26/35

    Chapter - 7 CONCLUSION & FUTURE ENHANCEMENTS

    7.1 CONCLUSION

    The heavy explosive robot is made for the safety of the people from harmful explosives

    that tend to end the lives of millions. The robot can thus tend to help in this noble cause. The searching

    and picking up of the explosive and transporting it to a safer place where the human race is less

    populated is attained through this project. With the use of zigbee communication protocol we have an

    added advantage. With obstacle in front of the robot, it can still carry out the whole process of

    searching, picking and placing without the need of people interfering it. Thus, this robot is of extensive

    use in the military field where explosive removing is quite often.

    7.2 FUTURE ENHANCEMENTS

    The heavy explosive removing robot finds numerous applications which can be used in

    the mere future as well. The number of cameras can be increased for improved control from a remote

    location to get a multi-dimensional view. Using the recent and advantageous Zigbee technology we

    can use multiple robots which can be controlled from a single transmitter. This can be extremely useful

    in disposing multiple explosives in a very short period of time. Stepper motors can thereby be used for

    accurately positioning the arm. The lifting capacity of the robot can be increased. The robotic wheels

    can be improvised to make the robot mobile on various terrains.

    26

  • 7/31/2019 heavy explosive removing robot

    27/35

    REFERENCES

    [1] Ward, C.C.; Iagnemma, K.; A Dynamic-Model-Based Wheel Slip Detector for Mobile Robots on

    Outdoor Terrain. Robotics, IEEE Transactions on Volume 24, Issue 4, Aug. 2008 Page(s):821 831

    [2] Antonelli, G.; Chiaverini, S. Kinematic Control of Flatoons of Autonomous Vehicles Robotics,

    IEEE Transactions on , Volume 22, Issue 6, Dec. 2006 Page(s):1285 1292.

    [3] Mariottini, G. L.; Oriolo, G.; Prattichizzo, D, Image-Based Visual Servoing for Nonholonomic

    Mobile Robots Using Epipolar Geometry. Robotics, IEEE Transactions on. Volume 23, Issue 1, Feb.

    2007 Page(s): 87 100

    [4] Pei-chun lin,Haldun Komsuoglu,Daniel E.koditschek. A Leg configuration measurement sys for

    fuu-body pose estimate in a hexapod robot, IEEE TRAN ON ROBOTICS, 2005, 21(3),pp.411~422.

    [5] Bhattacharya, S, Murrieta-Cid, R, Hutchinson, S. Optimal Paths for Landmark-Based Navigation

    by Differential-Drive Vehicles With Fieldof- View Constraints. Robotics, IEEE Transactions on,Volume 23, Issue 1, Feb. 2007 Page(s): 47 59

    [6] Daigle M. J.; Koutsoukos, X. D; Biswas, G.;Robotics. Distributed Diagnosis in Formations of

    Mobile Robots, Robotics, IEEE Transactions on. Volume 23, Issue 2, April 2007 Page(s): 353 369.

    [7] Wolf, D.F.; Sukhatme, G.S.; Semantic Mapping Using Mobile Robots, Robotics, IEEE

    Transactions on. Volume 24, Issue 2, April 2008 Page(s):245 258

    [8] Danwei Wang; Chang Boon Low; Modeling and Analysis of Skidding and Slipping in Wheeled

    Mobile Robots: Control Design Perspective. Robotics, IEEE Transactions on. Volume 24, Issue 3,June 2008 Page(s):676 687

    [9] Daigle, M.J.; Koutsoukos, X.D.; Biswas, G.; Distributed Diagnosis in Formations of MobileRobots. Robotics, IEEE Transactions on. Volume 23, Issue 2, April 2007 Page(s):353 369

    [10] McCarthy, C.; Barnes, N.; Mahony, R.; A Robust Docking Strategy for a Mobile Robot Using

    Flow Field Divergence, Robotics, IEEE Transactions on Volume 24, Issue 4, Aug. 2008 Page(s):832 842

    [11] Ji, M.; Sarkar, N, Supervisory Fault Adaptive Control of a Mobile Robot and Its Application inSensor-Fault Accommodation, Robotics, IEEE Transactions on , Volume 23, Issue 1, Feb. 2007

    Page(s):174 178

    [12] Gabriely, Y.; Rimon , E.; CBUG: A Quadratically Competitive Mobile Robot NavigationAlgorithm. Robotics, IEEE Transactions on Volume 24, Issue 6, Dec. 2008 Page(s):1451 1457.

    APPENDIX A

    27

  • 7/31/2019 heavy explosive removing robot

    28/35

    Transmitting side:

    #include

    sbit RS = P3^7; //potr 2.0sbit RW = P3^6; //potr 2.1

    sbit EN = P3^5; //potr 2.2

    sbit buzzer = P0^0;

    unsigned int m;

    void delay(unsigned int value){

    unsigned int i, j;for(i=0;i

  • 7/31/2019 heavy explosive removing robot

    29/35

    EN = 1;

    delay(1);EN = 0;

    }

    void lcddatastr(unsigned char *value){

    unsigned int i=0;

    while(value[i] != '\0'){

    P1 = value[i];i++;

    RS = 1;

    RW = 0;EN = 1;

    delay(1);

    EN = 0;}

    }

    void lcddata(unsigned char value){

    P1 = value;RS = 1;

    RW = 0;EN = 1;

    delay(1);

    EN = 0;}

    void lcd_init(){lcdcmd(0x38);

    lcdcmd(0x0C);

    lcdcmd(0x80);}

    void llcddata(int m)

    {lcdcmd(0x01);

    lcdcmd(0x80);

    switch(m){

    case 6: lcddatastr(" Rot Left");

    break;case 1: lcddatastr(" Forward");

    break;

    case 5: lcddatastr(" Rot Right");break;

    case 4: lcddatastr(" Move Left");

    break;case 9: lcddatastr("Pick Mine ");

    break;

    29

  • 7/31/2019 heavy explosive removing robot

    30/35

    case 3: lcddatastr(" Move Right");

    break;case 7: lcddatastr("Move Arm UP");

    break;

    case 2: lcddatastr(" Move Back");break;

    case 8: lcddatastr("Move Arm Down ");

    break;

    case 10: lcddatastr(" Place Mine ");break;

    case 11: lcddatastr(" Halt ");

    break;

    default:

    lcddatastr(" Try Next ");

    }

    }

    unsigned char keypad(){

    int i,key=0;unsigned char val,row[4];

    P2=0x0F;//0000 1111

    row[0]=0xEF;//1110 1111row[1]=0xDF;//1101 1111

    row[2]=0xBF;//1011 1111

    row[3]=0x70;//1000 1111

    P2=0x0F;

    while((P2&0x0F)==0x0F);while((P2&0x0F)!=0x0F){

    key=0;for(i=0;i

  • 7/31/2019 heavy explosive removing robot

    31/35

    while((P2&0x0F)!=0x0F);

    return key;}

    if(val==0x0B)

    {key+=3;

    Transmit(0x30+key);

    while((P2&0x0F)!=0x0F);

    return key;}

    if(val==0x07)

    {key+=4;

    Transmit(0x30+key);

    while((P2&0x0F)!=0x0F);return key;

    }

    key=(i+1)*4;}

    }

    }

    void serial_interrupt()interrupt 4{if(RI==1)

    {

    RI=0;buzzer = 0;

    lcdcmd(0x81);

    lcddatastr("MINE HAS BEEN ");lcdcmd(0xC4);lcddatastr("DETECTED");

    delay(1000);

    lcdcmd(0x01);buzzer = 1;

    }

    }

    void main(){

    unsigned char a;

    buzzer = 1;lcd_init();

    serial_init();

    serial_string("WILL OUTPUT COME?\n\r");IE=0x90;

    while(1){

    // Transmit('s');a = keypad();

    // Transmit('p');

    31

  • 7/31/2019 heavy explosive removing robot

    32/35

    // Transmit('\n');

    //Transmit(a);llcddata(a);

    delay(100);

    }}

    APPENDIX B

    32

  • 7/31/2019 heavy explosive removing robot

    33/35

    Receiving side

    #include

    sbit motor1_1 = P0^0;sbit motor1_2 = P0^1;

    sbit motor2_1 = P0^2;

    sbit motor2_2 = P0^3;

    sbit rotateleft = P0^4;sbit rotateright = P0^5;

    sbit up = P0^6;

    sbit down = P0^7;sbit pick = P2^0;

    sbit place = P2^1;

    sbit ir = P1^0;sbit us = P1^1;

    void delay(unsigned int value){unsigned int i, j;

    for(i=0;i

  • 7/31/2019 heavy explosive removing robot

    34/35

    s++;

    }}

    void External_interrupt() interrupt 0{Transmit('1');

    }

    void main(){unsigned char a;

    serial_init();

    IE = 0x81;P0=0x00;

    P2=0x00;

    while(1){

    a=Recieve();

    if(a=='1'){ //forwardif(ir==0||us==0){

    }else{

    motor1_1 = 1;motor2_1 = 1;

    delay(100);

    motor1_1 = 0;motor2_1 = 0;

    }

    }else if(a=='2'){//backward

    motor1_2 = 1;

    motor2_2 = 1;delay(100);motor1_2 = 0;

    motor2_2 = 0;

    }else if(a=='4'){//left

    motor2_1 = 1;

    delay(100);motor2_1 = 0;

    }

    else if(a=='3'){//right

    motor1_1 = 1;delay(100);

    motor1_1 = 0;

    }else if(a=='5'){ //rotate left

    rotateleft = 1;

    delay(100);rotateleft = 0;

    }

    34

  • 7/31/2019 heavy explosive removing robot

    35/35