saii iiiiii final

Upload: prasad

Post on 08-Aug-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/22/2019 Saii Iiiiii Final

    1/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 1

    CHAPTER 1

  • 8/22/2019 Saii Iiiiii Final

    2/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 2

    INTRODUCTION

    1.1 WHAT IS A ROBOT?

    A robot is a mechanical or virtual, artificial agent. A robot is

    usually an electro-mechanical system, which, by its appearance or movement,conveys a sense that it has intent or agency of its own. The word robot can refer to

    both physical robots and virtual software agents, but the latter are often referred to as

    bots.

    A typical robot must have several, but not all of the following properties:

    Is not natural / has been artificially created.

    Can sense its environment.

    Can manipulate things in its environment.

    Has some degree of intelligence or ability to make choices based on the

    environment or automatic control / preprogrammed sequence.

    Is programmable.

    Can make with one or more axes of rotation or translation.

    Appears to have intent or agency.

    The appearance of agency is important when people are considering whether to

    call a machine a robot. In general, the more a machine has the appearance of agency,the more it is considered a robot.

    For robotic engineers, the physical appearance of a machine is less important than

    the way its actions are controlled. The more the control system seems to have agency

    of its own, the more likely the machine is to be called a robot. An important feature of

    agency is the ability to make choice. So the ore a machine could feasible choose to do

    something different, the more agencies it has.

    The simple appearance of agency is not sufficient to be called a robot. A robot

    must do something, whether it is useful work or not. So, for example, a rubber dog

    chew, shaped like Asimo, would not be considered a robot.

  • 8/22/2019 Saii Iiiiii Final

    3/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 3

    DEFINITIONS OF ROBOT:

    International standard ISO 8373 defines a robot as:

    An automatically controlled, reprogrammable, multipurpose, manipulator

    programmable in three or more axes, which may be either, fixed in place or

    mobile for use in industrial automation applications.

    The Cambridge Online Dictionary defines robot as:

    A machine used to perform jobs automatically, which is controlled by a

    computer.

    The Japanese Industrial Robot Association, (JIRA) does not provide a general

    definition.

    It distinguishes robot as per their performance and structure as follows:

    1. Manipulator Robot2. Fixed sequence Robot

    3. Variable sequence Robot

    4. Play back Robot

    5. Numerical control Robot

    6. Intelligent Robot

    The Robot Institute of America (RIA) defines a robot as:

    A reprogrammable multifunctional manipulator designed to move and

    manipulate material, parts, tools or specialized devices through variable

    programmed motions for the performance of a variety of specific tasks.

    1.2 REASONS FOR USING A ROBOT:

    Over a period of years, need of a robot increased and technology

    progressed with lots of research efforts taking place worldwide making robot as

    on date as part and parcel of human, assisting them in several ways. The growing

    areas of robots utilization are discussed here in a systematized way.

    Hazards and Discomforts:

    The first industrial application of robot took place in the year 1961,

    which was used for loading and unloading a die casting machine, a particularly

    unpleasant task for human operator. Infact, advent of robot was necessitated due

  • 8/22/2019 Saii Iiiiii Final

    4/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 4

    to mans desire to free himself from high degree of hazardous and discomfort

    jobs, especially in the areas of welding, painting, foundry operations etc. In the

    earlier applications, this was the prime consideration for using a robot.

    Increased productivity:

    Third consideration for using industrial robot is its capability for

    providing increased productivity. This is due to robots ability to work almost

    continuously without breaks in comparision with human operartor. Robot

    machine can work with no tiresomeness, doing job repetitively with no

    grumbling. Human workers in contrast may not be so productive as well as

    demanding more than due to them.

    Better quality:

    The fourth consideration in using a robot lies in its suitability in

    handling repetitive jobs. Robots can be used to handle this type of tasks with high

    degree of consistency, which in turn leads to improved product quality. This

    improvement in quality justifies robots application in areas like spray painting,

    welding, inspection etc.

    The above four benefits, namely relieving human operator

    from hazardous tasks, reduced costs, improved productivity and better quality,

    primarily justify the reasons for using robots in industry. The way we listen,

    research for a need based robot is being carried out producing robots that help

    human in multiple ways.

    1.3 CLASSIFICATION OF ROBOTS

    In view of the definitions given, robots may be classified based on

    generations, manipulators geometry and mobility.

    1.3.1 Classification Based On Generations:

    1. The first generation of robots mainly comprises of Manipulator, Fixed

    sequence and Variable sequence types

  • 8/22/2019 Saii Iiiiii Final

    5/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 5

    In manipulator type, the operator controls the transport arm directly

    with or without power assistance depending on application. In Fixed

    sequence type, a manipulator does the pre-set tasks repetitively as per

    predetermined sequence, which cannot be altered. In contrast, a Variable

    sequence type allows the sequence to be changed while doing the repetitive

    job. Thus, the robots of the first generation are not capable of adapting to a

    continuously changing environment.

    2. The second generation of robots comprises of Playback and Numerical

    control types. These are being provided with sensory inputs of rudimentary

    nature such as vision and touch. These features enable them to respond to

    the changing environment.

    3. The third generation of robot is of intelligent type. In this generation of

    robots, lot of refinements have been made in sensory devices, like visual,

    acoustic and others implementing true adaptive control. This has resulted in

    increased efficiency and precision.

    1.3.2 Classification Based On Manipulator:

    The robots have been also classified based on the construction of

    manipulator arm. They are:

    1. Cartesian type2. Cylindrical type

    3. Spherical type

    4. Anthropomorphic type

    In Cartesian type of robots, the working head is manipulated along three

    perpendicular tracks so as to achieve the required height, width and depth. The

    base of manipulating robot may be positioned horizontally on the floor, or

    may be suspended from a gantry or a travelling bridge.

    In Cylindrical type of robots, the movements of the working head takes

    place in a cylindrical volume for reaching any required height and azimuth.

    This can be achieved by mounting an extendable arm on a central side, which

    moves up and down and swivels on its base. This gives two longitudinal

    movements with perpendicular axis and on rotational movement.

  • 8/22/2019 Saii Iiiiii Final

    6/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 6

    In Spherical type of robots, the movement of working head takes

    place in spherical range according to spherical coordinates. The manipulator is

    provided with an extendable arm mounted on a central pivot, thereby allowing

    rotations on a non-parallel axes.

    In Anthropomorphic type of robots, the philosophy is based on the

    human morphology, wherein the mechanical arm can be bent at an elbow

    and swivel at ashoulder.

    1.3.3 Classification Based On Mobility:

    Yet another classification of robots can be based on the

    mobility of the overall structure of the robot. While a universal robot is able

    to undertake almost any task, a real robot can be performing a specific range

    of tasks only as specified. In this context, two kinds of robots may be

    highlighted, namely, Fixed robot and Mobile robot.

    A Fixed robot, as the name signifies, has a defined

    workspace and any manipulation task on a work-piece is done within the

    defined workspace. This type of robot performs the following types of tasks:

    Handling moving objects

    Transformation of an object

    Dismantling

    Fixing

    Measuring

    A Mobile robot on the other hand has the ability to move to the

    workspace, exceeding the dimensions set for the robot itself. Thus, it will be able to

    do other tasks as well. Additionally, the mobile robot can do the following tasks:

    Conveying

    Exploration

    Gathering

    Tele-operation

    This categorization gives us a feel of how complex is a real working

    robot in relation to the simple robots.

  • 8/22/2019 Saii Iiiiii Final

    7/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 7

    CHAPTER 2

  • 8/22/2019 Saii Iiiiii Final

    8/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 8

    2. EMBEDED SYSTEMS

    Embedded systems are electronic devices that incorporate microprocessors

    with in their implementations. The main purposes of the microprocessors are to

    simplify the system design and provide flexibility. Having a microprocessor in the

    device helps in removing the bugs, making modifications, or adding new features

    are only matter of rewriting the software that controls the device. Or in other

    words embedded computer systems are electronic systems that include a

    microprocessor to perform a specific dedicated application. The computer is

    hidden inside these products. Embedded systems are ubiquitous. Every week

    millions of tiny computer chips come pouring out of factories finding their way

    into our everyday products.Embedded systems are self-contained programs that are embedded within a

    piece of hardware. Whereas a regular computer has many different applications

    and software that can be applied to various tasks, embedded systems are usually

    set to a specific task that cannot be altered without physically manipulating the

    circuitry. Another way to think of an embedded system is as a computer system

    that is created with optimal efficiency, thereby allowing it to complete specific

    functions as quickly as possible.

    Embedded systems designers usually have a significant grasp of hardware

    technologies. They use specific programming languages and software to develop

    embedded systems and manipulate the equipment. When searching online,

    companies offer embedded systems tools for use by engineers and businesses.

    Embedded systems technologies are usually fairly expensive due to the necessary

    development time and built in efficiencies, but they are highly valued in specific

    industries. Smaller businesses may wish to hire a consultant to determine what

    sort of embedded systems will add value to their organization.

  • 8/22/2019 Saii Iiiiii Final

    9/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 9

    2.1 CHARACTERISTICS

    Two major areas of differences are cost and power consumption. Since many

    embedded systems are produced in tens of thousands to millions of units range,

    reducing cost is a major concern. Embedded systems often use a slow processor

    and small memory size to minimize costs. The slowness is not just clock speed.

    The whole architecture of computer is often intentionally simplified to lower

    costs. For examples, embedded systems often use peripherals controlled by

    synchronous serial interfaces, which are ten to hundreds of times slower often run

    with real time constrains with limited hardware resources : often there is no disk

    drive, operating system, keyboard or screen may be used instead of a PCs

    keyboard and screen.

    2.2 EMBEDDED SYSTEMS CONSTRAINTS

    An embedded system is software designed to keep in view three constraints:

    Available system memory

    Available processor speed

    The need to limit the power dissipation

    2.3 WHAT MAKES EMBEDDED SYSTEMS DIFFERENT

    Real-time operation

    Size

    Cost

    Time

    Reliability

    Safety

    Energy

    Security

  • 8/22/2019 Saii Iiiiii Final

    10/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 10

    2.4 CLASSIFICATIONS OF EMBEDDED SYSTEM

    1. Small Scale Embedded System

    2. Medium Scale Embedded System

    3. Sophisticated Embedded System

    SMALL SCALE EMBEDDED SYSTEM

    Single 8 bit or 16bit Microcontroller.

    Little hardware and software complexity.

    They May even be battery operated.

    Usually C is used for developing this system.

    The need to limit power dissipation when system is running continuously.

    Programming tools:

    Editor, Assembler and Cross Assembler

    Fig:2.4.1

    MEDIUM SCALE EMBEDDED SYSTEM Single or few 16 or 32 bit microcontrollers or Digital Signal Processors (DSP) or

    Reduced Instructions Set Computers (RISC).

    Both hardware and software complexity.

    Programming tools:

    RTOS, Source code Engineering Tool, Simulator, Debugger and Integrated

    Development Environment (IDE).

    Fig:2.4.2

  • 8/22/2019 Saii Iiiiii Final

    11/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 11

    SOPHISTICATED EMBEDDED SYSTEM

    Enormous hardware and software complexity

    Which may need scalable processor or configurable processor and programminglogic arrays

    Constrained by the processing speed available in their hardware units.

    Programming Tools:

    For these systems may not be readily available at a reasonable cost or may not be

    available at all. A compiler or retarget able compiler might have to be developed

    for this.

    Fig:2.4.3

  • 8/22/2019 Saii Iiiiii Final

    12/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 12

    CHAPTER 3

  • 8/22/2019 Saii Iiiiii Final

    13/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 13

    3. MICROCONTROLLER

    Microcontroller as the name suggests are small controllers. They are like

    single hip computers that are often embedded into other systems to functions as

    processing/controlling unit. For example the remote control you are using

    probably has micro controllers inside that do micro wave ovens, toys etc.,

    where automation is needed.

    Micro controllers are useful to the extent that they communicate with other

    devices, such as sensors, motors, switches, keypads, displays, memory and even

    other microcontrollers. Many interface methods have been developed over the

    years to solve the complex problem of balancing circuit design criteria such as

    features, cost, size, weight, power consumption, reliability, availability,manufacturability. Many microcontroller designs typically mix multiple

    interfacing methods. In a very simplistic form, a micro controller system can be

    viewed as a system that reads from (monitors) inputs, performs processing and

    writes to (controls) outputs.

    Embedded system means the processor is embedded into the required

    application. An embedded product uses a microprocessor or microcontroller to do

    one task only. In an embedded system, there is only application software that is

    typically burned into ROM. Example: printer, keyboard, video-game player.

    Microprocessor -A single chip that contains the CPU or most of the computer

    Microcontrollers - A single chip that controls other devices.

    Microcontroller differs from a microprocessor in many ways. First and the most

    important is its functionality. In order for a microprocessor to be used, other

    components such as memory, or components for receiving and sending data must be

    added to it. In short that means the microprocessor is the main heart of the computer.

    On the other hand, microcontroller is designed to be all of that in one. No other

    external components are needed for its application because all necessary peripherals

    are already built into it. Thus we save time and space needed to construct devices.

  • 8/22/2019 Saii Iiiiii Final

    14/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 14

    3.1 MICROPROCESSOR VS MICROCONTROLLER

    MICROPROCESSOR

    CPU is stand-alone, RAM, ROM, I/O, timer are separate.

    Designer can decide on the amount of RAM, ROM and I/O ports.

    Expensive

    Versatility general-purpose

    MICROCONTROLLER

    CPU, RAM, ROM, I/O and timer are all on a single chip.

    Fix amount of on chip ROM,RAM,I/O ports

    For applications in which cost, power and space are critical

    Single purpose.

    3.2MICRO CONTROLLER 89C51

    3.2.1 INTRODUCTION

    A Micro controller consists of a powerful CPU tightly coupled with memory,

    various I/O interfaces such as serial port, parallel port timer or counter, interrupt

    controller, data acquisition interfaces-Analog to Digital converter, Digital to

    Analog converter, integrated on to a single silicon chip.

    If a system is developed with a microprocessor, the designer has to go for

    external memory such as RAM, ROM, EPROM and peripherals. But controller is

    provided all these facilities on a single chip. Development of a Micro controller

    reduces PCB size and cost of design.

    One of the major differences between a Microprocessor and a Micro controller

    is that a controller often deals with bits not bytes as in the real world application.

    Intel has introduced a family of Micro controllers called the MCS-51.

    3.2.2 THE MAJOR FEATURES:

    Compatible with MCS-51 products

    4k Bytes of in-system Reprogrammable flash memory

    Fully static operation: 0HZ to 24MHZ

  • 8/22/2019 Saii Iiiiii Final

    15/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 15

    Three level programmable clock

    128 * 8 bit timer/counters

    Six interrupt sources

    Programmable serial channel

    Low power idle power-down modes

    AT89C51 is 8-bit micro controller, which has 4 KB on chip flash memory,

    which is just sufficient for our application. The on-chip Flash ROM allows the

    program memory to be reprogrammed in system or by conventional non-volatile

    memory Programmer. Moreover ATMEL is the leader in flash technology in

    todays market place and hence using AT 89C51 is the optimal solution.

    3.2.3 AT89C51 MICROCONTROLLER ARCHITECTURE

    The 89C51 architecture consists of these specific features:

    Eight bit CPU with registers A (the accumulator) and B

    Sixteen-bit program counter (PC) and data pointer (DPTR)

    Eight- bit stack pointer (PSW)

    Eight-bit stack pointer (Sp)

    Internal ROM or EPROM (8751) of 0(8031) to 4K (89C51)

    Internal RAM of 128 bytes:

    Thirty two input/output pins arranged as four 8-bit ports:p0-p3

    Two 16-bit timer/counters: T0 and T1

    Full duplex serial data receiver/transmitter: SBUF

    Control registers: TCON, TMOD, SCON, PCON, IP, and IE

    Two external and three internal interrupts sources.

    Oscillator and clock circuits.

  • 8/22/2019 Saii Iiiiii Final

    16/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 16

    Fig 3.1: Architecture of micro controller

    3.2.4 TYPES OF MEMORY:

    The 89C51 have three general types of memory. They are on-chip memory,

    external Code memory and external Ram. On-Chip memory refers to physicallyexisting memory on the micro controller itself. External code memory is the code

    memory that resides off chip. This is often in the form of an external EPROM.

    External RAM is the Ram that resides off chip. This often is in the form of

    standard static RAM or flash RAM.

    a) Code memory

    Code memory is the memory that holds the actual 89C51 programs that is to

    be run. This memory is limited to 64K. Code memory may be found on-chip or

    off-chip. It is possible to have 4K of code memory on-chip and 60K off chip

    memory simultaneously. If only off-chip memory is available then there can be

    64K of off chip ROM. This is controlled by pin provided as EA.

  • 8/22/2019 Saii Iiiiii Final

    17/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 17

    b) Internal RAM

    The 89C51 have a bank of 128 of internal RAM. The internal RAM is found

    on-chip. So it is the fastest Ram available. And also it is most flexible in terms of

    reading and writing. Internal Ram is volatile, so when 89C51 is reset, this memory

    is cleared. 128 bytes of internal memory are subdivided. The first 32 bytes are

    divided into 4 register banks. Each bank contains 8 registers. Internal RAM also

    contains 128 bits, which are addressed from 20h to 2Fh. These bits are bit

    addressed i.e. each individual bit of a byte can be addressed by the user. They are

    numbered 00h to 7Fh. The user may make use of these variables with commands

    such as SETB and CLR.

    Flash memory is a nonvolatile memory using NOR technology, which allowsthe user to electrically program and erase information. Flash memory is used in

    digital cellular phones, digital cameras, LAN switches, PC Cards for notebook

    computers, digital set-up boxes, embedded controllers, and other devices.

    Fig 3.2: - Pin diagram of AT89C51

  • 8/22/2019 Saii Iiiiii Final

    18/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 18

    3.2.5 PIN DESCRIPTION:

    VCC: Supply voltage.

    GND: Ground.

    Port 0:

    Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each

    pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be

    used as high impedance inputs. Port 0 may also be configured to be the

    multiplexed low order address/data bus during accesses to external program and

    data memory. In this mode P0 has internal pull-ups. Port 0 also receives the code

    bytes during Flash programming, and outputs the code bytes during program

    verification. External pull-ups are required during program verification.

    Port 1:

    Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1

    output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins

    they are pulled high by the internal pull-ups and can be used as inputs. As inputs,

    Port 1 pins that are externally being pulled low will source current (IIL) because

    of the internal pull-ups. Port 1 also receives the low-order address bytes during

    Flash programming and verification.

    Port 2:

    Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2

    output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins

    they are pulled high by the internal pull-ups and can be used as inputs. As inputs,

    Port 2 pins that are externally being pulled low will source current (IIL) because

    of the internal pull-ups.

    Port 3:

    Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3

    output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins

    they are pulled high by the internal pull-ups and can be used as inputs. As inputs,

    Port 3 pins that are externally being pulled low will source current (IIL) because

    of the pull-ups.

  • 8/22/2019 Saii Iiiiii Final

    19/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 19

    Port 3 also serves the functions of various special features of the AT89C51 as

    listed below:

    Tab 1 Port pins and their alternate functions

    RST:

    Reset input. A high on this pin for two machine cycles while the oscillator is

    running resets the device.

    ALE/PROG:

    Address Latch Enable output pulse for latching the low byte of the address

    during accesses to external memory. This pin is also the program pulse input

    (PROG) during Flash programming. In normal operation ALE is emitted at a

    constant rate of 1/6the oscillator frequency, and may be used for external timing

    or clocking purposes. Note, however, that one ALE pulse is skipped during each

    access to external Data Memory. If desired, ALE operation can be disabled by

    setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a

    MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting

    the ALE-disable bit has no effect if the micro controller is in external execution

    mode.

    PSEN:

    Program Store Enable is the read strobe to external program memory. When

    the AT89C51 is executing code from external program memory, PSEN is

    activated twice each machine cycle, except that two PSEN activations are skipped

    during each access to external data memory.

  • 8/22/2019 Saii Iiiiii Final

    20/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 20

    EA/VPP:

    External Access Enable. EA must be strapped to GND in order to enable the

    device to fetch code from external program memory locations starting at 0000H

    up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be

    internally latched on reset. EA should be strapped to VCC for internal program

    executions. This pin also receives the 12-volt programming enable voltage (VPP)

    during Flash programming, for parts that require 12-volt VPP.

    XTAL1:

    Input to the inverting oscillator amplifier and input to the internal clock

    operating circuit.

    XTAL2:

    Output from the inverting oscillator amplifier

    OSCILLATOR CHARACTERISTICS:

    XTAL1 and XTAL2 are the input and output, respectively, of an inverting

    amplifier, which can be configured for use as an on-chip oscillator, as shown in

    Figs 6.1 Either a quartz crystal or ceramic resonator may be used. To drive the

    device from an external clock source, XTAL2 should be left unconnected while

    XTAL1 is driven as shown in Figure 6.2. There are no requirements on the duty

    cycle of the external clock signal, since the input to the internal clocking circuitry

    is through a divide-by-two flip-flop, but minimum and maximum voltage high and

    low time specifications must be observed.

    Fig 3.3 Oscillator Connections Fig 3.4 External clock drive Configuration

  • 8/22/2019 Saii Iiiiii Final

    21/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 21

    3.2.6 REGISTERS:

    In the CPU, registers are used to store information temporarily. That

    information could be a byte of data to be processed, or an address pointing to the

    data to be fetched. The vast majority of 8051 registers are 8bit registers. .

    D7 D6 D5 D4 D3 D2 D1 D0

    The most widely used registers of the 8051 are A (accumulator), B, R0, R1,

    R2, R3, R4, R5, R6, R7, DPTR (data pointer), and PC (program counter). All of

    the above registers are 8-bits, except DPTR and the program counter. The

    accumulator, register A, is used for all arithmetic and logic instructions.

    SFRs (Special Function Registers):

    In the 8051, registers A, B, PSW and DPTR are part of the group of registers

    commonly referred to as SFR (special function registers). The SFR can be

    accessed by the names (which is much easier) or by their addresses. For example,

    register A has address E0h, and register B has been ignited the address F0H, as

    shown in table.

    The following two points should note about the SFR addresses.

    1.The Special function registers have addresses between 80H and FFH. These

    addresses are above 80H, since the addresses 00 to 7FH are addresses of RAM

    memory inside the 8051.

    2.Not all the address space of 80H to FFH is used by the SFR. The unused

    locations 80H to FFH are reserved and must not be used by the 8051 programmer.

    Symbol Name Address

    ACC Accumulator 0E0H

    B B register 0F0H

    PSW Program status word 0D0H

    SP Stack pointer 81H

  • 8/22/2019 Saii Iiiiii Final

    22/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 22

    DPTR Data pointer 2 bytes

    DPL Low byte 82H

    DPH High byte 83H

    P0 Port0 80H

    P1 Port1 90H

    P2 Port2 0A0H

    P3 Port3 0B0H

    IP Interrupt priority control 0B8H

    IE Interrupt enable control 0A8H

    TMOD Timer/counter mode control 89H

    TCON Timer/counter control 88H

    T2CON Timer/counter 2 control 0C8H

    T2MOD Timer/counter mode2 control 0C9H

    TH0 Timer/counter 0high byte 8CH

    TL0 Timer/counter 0 low byte 8AH

    TH1 Timer/counter 1 high byte 8DH

    TL1 Timer/counter 1 low byte 8BH

    TH2 Timer/counter 2 high byte 0CDH

    TL2 Timer/counter 2 low byte 0CCH

    RCAP2H T/C 2 capture register high byte 0CBH

    RCAP2L T/C 2 capture register low byte 0CAH

    SCON Serial control 98H

    SBUF Serial data buffer 99H

    PCON Power control 87H

    Table: 2 8051 Special function register Address

  • 8/22/2019 Saii Iiiiii Final

    23/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 23

    ARegister(Accumulator):

    This is a general-purpose register, which serves for storing intermediate results

    during operating. A number (an operand) should be added to the accumulator

    prior to execute an instruction upon it. Once an arithmetical operation is

    preformed by the ALU, the result is placed into the accumulator.

    B REGISTER:

    B register is used during multiply and divide operations which can be

    performed only upon numbers stored in the A and B registers. All other

    instructions in the program can use this register as a spare accumulator (A).

    Registers (R0-R7)

    Fig3.5: Memory organization of RAM

    This is a common name for the total 8 general purpose registers (R0, R1, R2

    ...R7). Even they are not true SFRs, they deserve to be discussed here because of

    their purpose. The bank is active when the R registers it includes are in use.

    Similar to the accumulator, they are used for temporary storing variables and

    intermediate results. Which of the banks will be active depends on two bits

    included in the PSW Register. These registers are stored in four banks in the scope

    of RAM.

  • 8/22/2019 Saii Iiiiii Final

    24/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 24

    8051 REGISTER BANKS AND STACK:

    RAM memory space allocation in the 8051

    There are 128 bytes of RAM in the 8051. The 128 bytes of RAM inside the8051 are assigned addresses 00 to7FH. These 128 bytes are divided into three

    different groups as follows:

    1. A total of 32 bytes from locations 00 to 1FH hex are set aside for register

    banks and the stack.

    2. A total of 16 bytes from locations 20 to 2FH hex are set aside for bit-

    addressable read/write memory.

    3. A total of 80 bytes from locations 30H to 7FH are used for read and write

    storage, or what is normally called Scratch pad. These 80 locations of RAM are

    widely used for the purpose of storing data and parameters nu 8051 programmers.

    Default register bank

    Register bank 0; that is, RAM locations 0, 1,2,3,4,5,6, and 7 are accessed with

    the names R0, R1, R2, R3, R4, R5, R6, and R7 when programming the 8051.

    FIG 3.6: RAM Allocation in the 8051

    PSW REGISTER (Program Status Word)

  • 8/22/2019 Saii Iiiiii Final

    25/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 25

    This is one of the most important SFRs. The Program Status Word (PSW)

    contains several status bits that reflect the current state of the CPU. This register

    contains: Carry bit, Auxiliary Carry, two register bank select bits, Overflow flag,

    parity bit, and user-definable status flag. The ALU automatically changes some of

    registers bits, which is usually used in regulation of the program performing.

    P - PARITY BIT:

    If a number in accumulator is even then this bit will be automatically set (1),

    otherwise it will be cleared (0). It is mainly used during data transmission and

    receiving via serial communication.

    OV OVERFLOW:

    occurs when the result of arithmetical operation is greater than 255 (decimal),

    so that it cannot be stored in one register. In that case, this bit will be set (1). If

    there is no overflow, this bit will be cleared (0).

    RS0, RS1 - REGISTER BANK SELECT BITS:

    These two bits are used to select one of the four register banks in RAM. By

    writing zeroes and ones to these bits, a group of registers R0-R7 is stored in one of

    four banks in RAM.

    RS1 RS2Space in

    RAM

    0 0Bank0 00h-

    07h

    0 1Bank1 08h-

    0Fh

    1 0Bank2 10h-

    17h

    1 1 Bank3 18h-

    Table3

  • 8/22/2019 Saii Iiiiii Final

    26/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 26

    F0 - FLAG 0: This is a general-purpose bit available to the user.

    AC - AUXILIARY CARRY FLAG: Ac is used for BCD operations only.

    CY - CARRY FLAG: CY is the (ninth) auxiliary bit used for all arithmetical

    operations and shift instructions.

    DPTR REGISTER (Data Pointer):

    These registers are not true ones because they do not physically exist. They

    consist of two separate registers: DPH (Data Pointer High) and (Data Pointer

    Low). Their 16 bits are used for external memory addressing. They may be

    handled as a 16-bit register or as two independent 8-bit registers. Besides, the

    DPTR Register is usually used for storing data and intermediate results, which

    have nothing to do with memory locations.

    SP REGISTER (Stack Pointer):

    The stack is a section of RAM used by the CPU to store information

    temporarily. This information could be data or an address. The CPU needs this

    storage area since there are only a limited number of registers.

  • 8/22/2019 Saii Iiiiii Final

    27/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 27

    3.3 HOW STACKS ARE ACCESSED IN THE 8051:

    If the stack is a section of RAM, there must be registers inside the CPU to

    point to it. The register used to access the stack is called the SP (Stack point)

    Register. The stack pointer in the 8051 is only 8 bits wide; which means that it

    can take values of 00 to FFH. When the 8051 is powered up, the SP register

    contains value 07. This means that RAM location 08 is the first location used for

    the stack by the 8051. The storing of a CPU register in the stack is called a

    PUSH, and pulling the contents off the stack back into a CPU register is called a

    POP. In other words, a register is pushed onto the stack to save it and popped off

    the stack to retrieve it. The job of the SP is very critical when push and pop

    actions are performed.

    3.4 PROGRAM COUNTER:

    The important register in the 8051 is the PC (Program counter). The program

    counter points to the address of the next instruction to be executed. As the CPU

    fetches the opcode from the program ROM, the program counter is incremented to

    point to the next instruction. The program counter in the 8051 is 16bits wide.

    This means that the 8051 can access program addresses 0000 to FFFFH, a total of

    64k bytes of code. However, not all members of the 8051 have the entire 64K

    bytes of on-chip ROM installed, as we will see soon.

  • 8/22/2019 Saii Iiiiii Final

    28/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 28

    CHAPTER 4

  • 8/22/2019 Saii Iiiiii Final

    29/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 29

    4. ZIGBEE TECHNOLOGY

    4.1 Zig-bee:

    Fig 4.1 Zibee

    Zig-bee is a specification for a suite of high level communication protocols

    using small, low-power digital radios based on the IEEE 802.15.4,2006 standard for

    wireless personal area networks (WPANs),

    such as wireless headphones connecting with cell phones short-range radio.

    The technology defined by the Zig-bee specification is intended to be simpler and less

    expensive than other WPANs, such as Bluetooth. Zig-bee is targeted at radio-

    frequency (RF) applications that require a low data rate, long battery life, and securenetworking.

    Zig-bee is a low data rate, two-way standard for home automation and data

    networks. The standard specification for up to 254 nodes including one master,

    managed from a single remote control. Real usage examples of Zig-bee includes

    home automation tasks such as turning lights on, setting the home security system, or

    starting the VCR. With Zig-bee all these tasks can be done from anywhere in the

    home at the touch of a button. Zig-bee also allows for dial-in access via the Internet

    for automation control.

    Zig-bee protocol is optimized for very long battery life measured in months to

    years from inexpensive, off-the-shelf non-rechargeable batteries, and can control

    lighting, air conditioning and heating, smoke and fire alarms, and other security

    devices. The standard supports 2.4 GHz (worldwide), 868 MHz (Europe) and 915

    MHz (Americas) unlicensed radio bands with range up to 100 meters.

  • 8/22/2019 Saii Iiiiii Final

    30/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 30

    IEEE 802.15.4

    IEEE 802.15.4 is a standard which specifies the physical layer and medium access

    control for low-rate wireless personal area networks (LR-WPAN's).This standard was

    chartered to investigate a low data rate solution with multi-month to multi-year

    battery life and very low complexity. It is operating in an unlicensed, international

    frequency band. Potential applications are sensors, interactive toys, smart badges,

    remote controls, and home automation.

    802.15.4 Is part of the 802.15 wireless personal-area network efforts at the IEEE? It is

    a simple packet-based radio protocol aimed at very low-cost, battery-operated widgets

    and sensors (whose batteries last years, not hours) that can intercommunicate and

    send low-bandwidth data to a centralized device.

    As of 2007, the current version of the standard is the 2006 revision. It is maintained

    by the IEEE 802.15 working group.

    It is the basis for the Zig-bee specification, which further attempts to offer a complete

    networking solution by developing the upper layers which are not covered by the

    standard.

    802.15.4 Protocol

    Data rates of 250 kbps with 10-100 meter range.

    Two addressing modes; 16-bit short and 64-bit IEEE addressing.

    CSMA-CA channel access.

    Power management to ensure low power consumption.

    16 channels in the 2.4GHz ISM band.

    Low duty cycle - Provides long battery life.

    Low latency.

    Support for multiple network topologies: Static, dynamic, star and mesh. Up to 65,000 nodes on a network.

    Comparison with other technologies

    Zig-Bee enables broad-based deployment of wireless networks with low-cost, low-

    power solutions. It provides the ability to run for years on inexpensive batteries for a

    host of monitoring applications: Lighting controls, AMR (Automatic Meter Reading),

  • 8/22/2019 Saii Iiiiii Final

    31/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 31

    smoke and CO detectors, wireless telemetry, HVAC control, heating control, home

    security, Environmental controls and shade controls, etc.

    Why is Zigbee needed?

    There are a multitude of standards that address mid to high data rates for voice, PC

    LANs, video, etc. However, up till now there hasnt been a wireless network

    standard that meets the unique needs of sensors and control devices. Sensors and

    controls dont need high bandwidth but they do need low latency and very low

    energy consumption for long battery lives and for large device arrays.

    There are a multitude of proprietary wireless systems manufactured today to solve

    a multitude of problems that also dont require high data rates but do require low

    cost and very low current drain.

    These proprietary systems were designed because there were no standards that met

    their requirements. These legacy systems are creating significant interoperability

    problems with each other and with newer technologies.

    4.2 Zigbee/IEEE 802.15.4 - General Characteristics

    Dual PHY (2.4GHz and 868/915 MHz).

    Data rates of 250 kbps (@2.4 GHz), 40 kbps (@ 915 MHz), and 20 kbps

    (@868 MHz).

    Optimized for low duty-cycle applications (

  • 8/22/2019 Saii Iiiiii Final

    32/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 32

    ZIGBEE NETWORK TOPOLOGY:

    Fig 4.2 Zigbee network topology

    Three devices in network:

    1. Zigbee PAN coordinator (MASTER)

    2. Zigbee router (full function device)

    3. Zigbee end device (reduced function device)

    Star Topology

    PAN

    Full function device Communications flow

    Peer to Peer topology Cluster Tree Topology

    Reduced Function Device

  • 8/22/2019 Saii Iiiiii Final

    33/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 33

    4.3 ZIGBEE PROTOCOL STACK

    Fig 4.3 Zigbee protocol stack

    PHYSICAL LAYER

    The physical layer was designed to accommodate the need for a low cost yet

    allowing for high levels of integration. The use of direct sequence allows the analog

    circuitry to be very simple and

    The PHY provides two services: the PHY data service and PHY management

    service interfacing to the physical layer management entity (PLME). The PHY data

    service enables the transmission and reception of PHY protocol data units (PPDU)

    across the physical radio channel. The features of the PHY are activation and

    deactivation of the radio transceiver, energy detection(ED), link quality indication

    (LQI), channel selection, clear channel assessment (CCA) and transmitting as well as

    receiving packets across the physical medium.

  • 8/22/2019 Saii Iiiiii Final

    34/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 34

    The standard offers two PHY options based on the frequency band. Both are

    based on direct sequence spread spectrum (DSSS). The data rate is 250kbps at

    2.4GHz, 40kbps at 915MHz and 20kbps at 868MHz. The higher data rate at 2.4GHz

    is attributed to a higher-order modulation scheme. Lower frequencies provide longer

    range due to lower propagation losses. Low rate can be translated into better

    sensitivity and larger coverage area. Higher rate means higher throughput, Lower

    latency or lower duty cycle.

    There is a single channel between 868 and 868.6MHz, 10 channels between 902.0

    and 928.0MHz, and 16 channels between 2.4 and 2.4835GHz.

    MAC LAYER

    The media access control (MAC) layer was designed to allow multiple

    topologies without complexity. The power management operation doesnt require

    multiple modes of operation. The MAC allows a reduced functionality device

    (RFD) that neednt have flash nor large amounts of ROM or RAM. The MAC

    was designed to handle large numbers of devices without requiring them to be

    parked.

    MAC Primitives:

    MAC Data Service

    MCPS-DATA exchange data packets between MAC and PHY.

    MCPS-PURGE purge an MSDU from the transaction queue.

    MAC Management Service

    MLME-ASSOCIATE/DISASSOCIATE network association.

    MLME-SYNC / SYNC-LOSS - device synchronization.

    MLME-SCAN - scan radio channels.

    MLME- COMM-STATUS communication status.

    MLME-GET / -SET retrieve/set MAC PIB parameters.

    MLME-START / BEACON-NOTIFY beacon management.

    MLME-POLL - beaconless synchronization.

    MLME-GTS - GTS management.

  • 8/22/2019 Saii Iiiiii Final

    35/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 35

    MLME-RESET request for MLME to perform reset.

    MLME-ORPHAN - orphan device management.

    MLME-RX-ENABLE - enabling/disabling of radio system.

    Network Layer

    The responsibilities of the Zigbee NWK layer include:

    Starting a network: The ability to successfully establish a new network.

    Joining and leaving a network: The ability to gain membership (join) or relinquish

    membership (leave) a network.

    Configuring a new device: The ability to sufficiently configure the stack for

    operation as required.

    Addressing: The ability of a Zigbee coordinator to assign addresses to devices

    joining the network.

    Synchronization within a network: The ability for a device to achieve

    synchronization with another device either through tracking beacons or by polling.

    Security: applying security to outgoing frames and removing security to

    terminating frames

    Routing: routing frames to their intended destinations.

    Network Routing Overview

    Perhaps the most straightforward way to think of the Zigbee routing algorithm is as a

    hierarchical routing strategy with table-driven optimizations applied where possible.

    NWK uses an algorithm that allows stack implementers and application developers

    to balance unit cost, battery drain, and complexity in producing Zigbee solutions to

    meet the specific cost-performance profile of their application.

    Started with the well-studied public-domain algorithm AODV and MotorolasCluster-Tree algorithm and folding in ideas from Ember Corporations GRAD.

  • 8/22/2019 Saii Iiiiii Final

    36/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 36

    Network Summary

    The network layer builds upon the IEEE 802.15.4 MACs features to allow

    extensibility of coverage. Additional clusters can be added; networks can be

    consolidated or split up.

    Application layer

    The Zigbee application layer consists of the APS sub-layer, the ZDO and the

    manufacturer-defined application objects. The responsibilities of the APS sub-layer

    include maintaining tables for binding, which is the ability to match two devices

    together based on their services and their needs, and forwarding messages between

    bound devices. Another responsibility of the APS sub-layer is discovery, which is the

    ability to determine which other devices are operating in the personal operating space

    of a device. The responsibilities of the ZDO include defining the role of the device

    within the network (e.g., Zigbee coordinator or end device), initiating and/or

    responding to binding requests and establishing a secure relationship between network

    devices. The manufacturer-defined application objects implement the actual

    applications according to the Zigbee-defined application descriptions

    Zigbee Device Object

    Defines the role of the device within the network (e.g., Zigbee coordinator or

    end device)

    Initiates and/or responds to binding requests

    Establishes a secure relationship between network devices selecting one of

    ZigBees security methods such as public key, symmetric key, etc.

    Application Support Layer:

    This layer provides the following services:

    Discovery: The ability to determine which other devices are operating in the

    personal operating space of a device.

    Binding: The ability to match two or more devices together based on their

    services and their needs and forwarding messages between bound devices.

  • 8/22/2019 Saii Iiiiii Final

    37/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 37

    APPLICATIONS OF ZIGBEE TECHNOLOGY

    Typical application areas include

    Home Entertainment and Control Smart lighting, advanced temperature

    control, safety and security, movies and music

    Home Awareness Water sensors, power sensors, energy monitoring,

    smoke and fire detectors, smart appliances and access sensors

    Mobile Services m-payment, m-monitoring and control, m-security and

    access control, m-healthcare and tele-assist

    Commercial Building Energy monitoring, HVAC, lighting, access control

    Industrial Plant Process control, asset management, environmental

    management, energy management, industrial device control, machine-to-

    machine (M2Mcommunication.

    Zigbee vs. Bluetooth

    Zigbee looks rather like Bluetooth but is simpler, has a lower data rate and spends

    most of its time snoozing. This characteristic means that a node on a Zigbee network

    should be able to run for six months to two years on just two AA batteries. The

    operational range of Zigbee is 10-75m compared to 10m for Bluetooth (without a

    power amplifier).

    Zigbee sits below Bluetooth in terms of data rate. The data rate of Zigbee is 250kbps

    at 2.4GHz, 40kbps at 915MHz and 20kbps at 868MHz whereas that of Bluetooth is

    1Mbps.

    Zigbee uses a basic master-slave configuration suited to static star networks of many

    infrequently used devices that talk via small data packets. It allows up to 254 nodes.

    Bluetooths protocol is more complex since it is geared towards handling voice,

    images and file transfers in ad hoc networks. Bluetooth devices can support scatter

    nets of multiple smaller non-synchronized networks (piconets). It only allows up to 8

    slave nodes in a basic master-slave piconet set-up.

    When Zigbee node is powered down, it can wake up and get a packet in around 15

    msec whereas Bluetooth device would take around 3sec to wake up and respond.

  • 8/22/2019 Saii Iiiiii Final

    38/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 38

    ZIGBEE MODULE:

    Comparison with other technologies

    StandardZigbee

    802.15.4

    Wi-Fi

    802.11b

    Bluetooth

    802.15.1

    Transmission Range

    (meters)

    1 100* 1 100 1 10

    Battery Life (days)100 1,000 0.5 5.0 1 - 7

    Network Size (# of nodes)> 64,000 32 7

    Application

    Monitoring &

    Control

    Web, Email,

    Video

    Cable

    Replacement

    Stack Size (KB)4 32 1,000 250

    Throughput kb/s)20 250 11,000 720

    Zigbee-compliant products operate in unlicensed bands worldwide, including 2.4GHz

    (global), 902 to 928MHz (Americas), and 868MHz (Europe). Raw data throughput

    rates of 250Kbps can be achieved at 2.4GHz (16 channels), 40Kbps at 915MHz (10

    channels), and 20Kbps at 868MHz (1 channel). The transmission distance is expected

    to range from 10 to 100m, depending on power output and environmental

    characteristics. Like Wi-Fi, Zigbee uses direct-sequence spread spectrum in the

    2.4GHz band, with offset-quadrature phase-shift keying modulation. Channel width is

    2MHz with 5MHz channel spacing. The 868 and 900MHz bands also use direct-

    sequence spread spectrum but with binary-phase-shift keying modulation.

    ZIGBEE MODULE SPECIFICATION:

    Performance: XBee

    Power output:: 1mW (+0 dBm) North American & International version

    Indoor/Urban range: Up to 100 ft (30 m)

    Outdoor/RF line-of-sight range: Up to 300 ft (90 m)

  • 8/22/2019 Saii Iiiiii Final

    39/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 39

    RF data rate: 250 Kbps

    Interface data rate: Up to 115.2 Kbps

    Operating frequency: 2.4 GHz

    Receiver sensitivity: -92 dBm

    Performance: XBee-PRO

    Power output:

    63 mW (+18 dBm) North American version

    10 mW (+10 dBm) International version

    Indoor/Urban range: Up to 300 ft (90 m)

    Outdoor/RF line-of-sight range: Up to 1 mile (1.6 km) RF LOS

    RF data rate: 250 Kbps

    Interface data rate: Up to 115.2 Kbps

    Operating frequency: 2.4 GHz

    Receiver sensitivity: -100 dBm (all variants)

    Networking

    Spread Spectrum type: DSSS (Direct Sequence Spread Spectrum)

    Networking topology: Point-to-point, point-to-multipoint, & peer-to-peer

    Error handling: Retries & acknowledgements

    Filtration options: PAN ID, Channel, and 64-bit addresses

    Channel capacity:

    XBee: 16 Channels

    XBee-PRO: 12 Channels

    Addressing: 65,000 network addresses available for each channel

    Power

    Supply voltage:

    XBee: 2.8 - 3.4 VDC

    XBee-PRO: 2.8 - 3.4 VDC

    XBee Footprint Recommendation: 3.0 - 3.4 VDC

  • 8/22/2019 Saii Iiiiii Final

    40/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 40

    Transmit current:

    XBee: 45 mA (@ 3.3 V) boost mode 35 mA (@ 3.3 V) normal mode

    XBee-PRO: 215 mA (@ 3.3 V)

    Receive current:

    XBee: 50 mA (@ 3.3 V)

    XBee-PRO: 55 mA (@ 3.3 V)

    Power-down sleep current:

    XBee:

  • 8/22/2019 Saii Iiiiii Final

    41/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 41

    CHAPTER 5

  • 8/22/2019 Saii Iiiiii Final

    42/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 42

    5. WORKING FLOW OF THE PROJECT

    5.1 BLOCK DIAGRAM:

    CONTROL SECTION:

    Fig 5.1 Control Section

    ROBOT SECTION:

    Fig 5.2 Robot Section

    ZIGBEE TRANSCEIVERPERSONAL COMPUTER

    RF RECEIVER

    ZIGBEE

    TRANSCEIVER

    8051

    MICRO CONTOLLER

    HBRIDGEMAX 232

    MOTORS

    LCD

    ULTRA SONIC SENSOR

    METAL DETECTING

    SENSOR

    BUZZER

    POWER SUPPLY

    CAMERA

  • 8/22/2019 Saii Iiiiii Final

    43/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 43

    CIRCUIT DISCRIPTION:

    In this project, there are two sections (control section & robot section) as

    shown in the block diagrams. The instructions such as Left, Right etc are processedand are given by the person by operating PC. So based upon input of PC the following

    output will be seen i.e. left or right. In control Section, the instructions are delivered

    to Zigbee transceiver from which is connected to the PC. This information is

    processed and is sent to the receiver section via wireless.

    The signals from the control section are received by the Zigbee

    transceiver, in the Robot section and are sent to the controller as input. Controller

    processes this data and controls the Robot direction according to the instruction given

    at the control section. It has a camera which records audio and video of the

    surrounding environment and it transmits those signals to control section via wireless.

    So we can monitor the robot and basing upon that, we can give instructions from

    control section. Then the Robot will move in a particular direction for the given

    instruction. Similarly if any metal is detected, the buzzer will make a beep sound

    which is audible at control section using RF receiver. This robot section also has a

    ultrasonic sensor which is used to detect any obstacles. If it detects any obstacle, it

    gives output to microcontroller, then that micro-controller processes that signal and

    automatically rotates the robot right.

    5.2 POWER SUPPLY

    The input to the circuit is applied from the regulated power supply. The a.c.

    input i.e., 230V from the mains supply is step down by the transformer to 12V and is

    fed to a rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So

    in order to get a pure d.c voltage, the output voltage from the rectifier is fed to a filter

    to remove any a.c components present even after rectification. Now, this voltage is

    given to a voltage regulator to obtain a pure constant dc voltage.

  • 8/22/2019 Saii Iiiiii Final

    44/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 44

    5.2.1 BLOCK DIAGRAM:

    Fig 5.2.1: Block diagram

    THE POWER SUPPLY MAINLY CONSISTS OF THREE PARTS:

    Step down transformer.

    Full wave rectifier (Bridge rectifier).

    Regulator LM 7805.

    Entire circuit works on a supply of +5v.Transformer 12-0-12 volts/1amp

    rating is used. Bridge rectifier for 7805 power regulator is used. it is a three pin

    package .first pin for input ,second pin for ground, third pin for output. First pin is

    connected to 1000uf/25v capacitor positive terminal. Second pin is connected to

    ground terminal. Third pin is connected to output pin to provide 5v supply for

    micro controller board.

    5.2.2 STEP DOWN TRANSFORMER:

    A transformer is an electrical device which is used to convert electrical power

    from one electrical circuit to another without change in frequency.

    Transformers convert AC electricity from one voltage to another with little

    loss of power. Transformers work only with AC and this is one of the reasons why

    mains electricity is AC. Step-up transformers increase in output voltage, step-

    230V AC

    50Hz

    D.C

    Output

    Step down

    transformer

    Bridge

    rectifier

    FilterRegulator

  • 8/22/2019 Saii Iiiiii Final

    45/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 45

    down transformers decrease in output voltage. Most power supplies use a step-

    down transformer to reduce the dangerously high mains voltage to a safer low

    voltage. The input coil is called the primary and the output coil is called the

    secondary. There is no electrical connection between the two coils; instead they

    are linked by an alternating magnetic field created in the soft-iron core of the

    transformer. The two lines in the middle of the circuit symbol represent the core.

    Transformers waste very little power so the power out is (almost) equal to the

    power in. Note that as voltage is stepped down current is stepped up. The ratio of

    the number of turns on each coil, called the turns ratio, determines the ratio of the

    voltages. A step-down transformer has a large number of turns on its primary

    (input) coil which is connected to the high voltage mains supply, and a small

    number of turns on its secondary (output) coil to give a low output voltage.

    Fig 5.2.2: An Electrical Transformer

    Turns ratio = Vp/ VS = Np/NS

    Power Out= Power In

    VS X IS=VP X IP

    Vp = primary (input) voltage

    Np = number of turns on primary coil

    Ip = primary (input) current

    5.2.3 RECTIFIER:

    A circuit, which is used to convert a.c to dc, is known as RECTIFIER.

    The process of conversion a.c to d.c is called rectification.

  • 8/22/2019 Saii Iiiiii Final

    46/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 46

    TYPES OF RECTIFIERS:

    Half wave Rectifier

    Full wave rectifier

    1. Center-tap full wave rectifier.

    2. Bridge-type full bridge rectifier.

    BRIDGE RECTIFIER:

    Most of electronic device and circuits need a DC source for the

    operation. So it is necessary to convert AC to DC. The process of converting AC

    to DC is called rectification. This can be achieved with a rectifier, filter and

    voltage regulator.A rectifier is defined as an electronic device used for converting AC

    voltage current into unidirectional voltage and current. The rectifiers are classified

    in two types:

    1. Half wave rectifier.

    2. Full wave rectifier.

    5.2

    .4 FILTER:Capacitive filter is used in this project. It removes the ripples from the output

    of rectifier and smoothens the D.C. Output received from this filter is constant

    until the mains voltage and load is maintained constant. However, if either of the

    two is varied, D.C. voltage received at this point changes. Therefore a regulator is

    applied at the output stage.

    CAPACITOR FILTER:

    We have seen that the ripple content in the rectified output of half wave

    rectifier is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48%

    such high percentages of ripples is not acceptable for most of the applications.

    Ripples can be removed by one of the following methods of filtering:

  • 8/22/2019 Saii Iiiiii Final

    47/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 47

    (a) A capacitor, in parallel to the load, provides an easier by pass for the ripples

    voltage though it due to low impedance. At ripple frequency and leave the d.c.to

    appears the load.

    (b) An inductor, in series with the load, prevents the passage of the ripple current

    (due to high impedance at ripple frequency) while allowing the d.c (due to low

    resistance to d.c)

    (c) Various combinations of capacitor and inductor, such as L-section filter

    section filter, multiple section filter etc. which make use of both the properties

    mentioned in (a) and (b) above. Two cases of capacitor filter, one applied on half

    wave rectifier and another with full wave rectifier.

    Filtering is performed by a large value electrolytic capacitor connected across the

    DC supply to act as a reservoir, supplying current to the output when the varying

    DC voltage from the rectifier is falling. The capacitor charges quickly near the

    peak of the varying DC, and then discharges as it supplies current to the output.

    Filtering significantly increases the average DC voltage to almost the peak value

    (1.4 RMS value).

    To calculate the value of capacitor(C),

    C = *3*f*r*Rl

    Where,

    f = supply frequency,

    r = ripple factor,

    Rl = load resistance

    Note: In our circuit we are using 1000 microfarads.

    5.2.5 VOLTAGE REGULATOR:

    Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) orvariable output voltages. The maximum current they can pass also rates them.

    Negative voltage regulators are available, mainly for use in dual supplies. Most

    regulators include some automatic protection from excessive current ('overload

    protection') and overheating ('thermal protection'). Many of the fixed voltage

    regulators ICs has 3 leads and look like power transistors, such as the 7805 +5V

  • 8/22/2019 Saii Iiiiii Final

    48/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 48

    1A regulator shown on the right. The LM7805 is simple to use. You simply

    connect the positive lead of your unregulated DC power supply (anything from

    9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin

    and then when you turn on the power, you get a 5 volt supply from the output pin.

    Fig 5.2.3: A Three Terminal Voltage Regulator

    78XX:

    The Bay Linear LM78XX is integrated linear positive regulator with three

    terminals. The LM78XX offer several fixed output voltages making them useful

    in wide range of applications. When used as a zener diode/resistor combination

    replacement, the LM78XX usually results in an effective output impedance

    improvement of two orders of magnitude, lower quiescent current. The LM78XX

    is available in the TO-252, TO-220 & TO-263packages,

    FEATURES:

    Output Current of 1.5A

    Output Voltage Tolerance of 5%

    Internal thermal overload protection

    Internal Short-Circuit Limited

    No External Component

    Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V

    Offer in plastic TO-252, TO-220 & TO-263

    Direct Replacement for LM78XX

  • 8/22/2019 Saii Iiiiii Final

    49/86

    PRAGATI ENGINEERING C

    5.3 MAX 232:

    5.3.1 RS-232 WAV

    Fig 5

    The diagra

    when using the common

    Bit. The RS-232 line, wh

    with a start bit which is (

    The LSB (Least Signific

    the signal to make up the

    The data se

    framed between a Start a

    RS-232 Voltage leve

    +3 to +25 volts to

    -3 to -25 volts for

    Any voltage in be

    undefined.

    WIRELESS OPERATED

    OLLEGE

    FORM

    .3.1:TTL/CMOS Serial Logic Waveform

    m above shows the expected waveform from th

    8N1 format. 8N1 signifies 8 Data bits, No Parit

    en idle is in the Mark State (Logic 1). A transm

    ogic 0). Then each bit is sent down the line, o

    nt Bit) is sent first. A Stop Bit (Logic 1) is then

    transmission.

    nt using this method, is said to be framed. That

    d Stop Bit.

    s

    signify a "Space" (Logic 0)

    a "Mark" (logic 1).

    tween these regions (i.e. between +3 and -3 Vol

    WARFIELD LAND ROVER

    49

    UART

    and 1 Stop

    ssion starts

    e at a time.

    appended to

    is the data is

    ts) is

  • 8/22/2019 Saii Iiiiii Final

    50/86

    PRAGATI ENGINEERING C

    The data byte i

    The bits are tra

    rate of the serial signal.

    computer, shown below.

    5.3.2 RS-232 LEVEL

    Standard serial

    Standard device, requires

    purpose. It provides 2-ch

    The driver requi

    Fi

    WIRELESS OPERATED

    OLLEGE

    always transmitted least-significant-bit first.

    smitted at specific time intervals determined b

    his is the signal present on the RS-232 Port of

    Fig 5.3.2: RS-232 Logic Waveform

    CONVERTER

    nterfacing of microcontroller (TTL) with PC or

    TTL to RS232 Level converter . A MAX232 is

    annel RS232C port and requires external 10uF

    es a single supply of +5V.

    5.3.3 MAX 232 IC Configurations

    WARFIELD LAND ROVER

    50

    the baud

    our

    any RS232C

    sed for this

    apacitors.

  • 8/22/2019 Saii Iiiiii Final

    51/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 51

    MAX-232 includes a Charge Pump, which generates +10V and -10V from a single 5v

    supply.

    5.3.3 Serial communication

    When a processor communicates with the outside world, it provides data in

    byte sized chunks. Computers transfer data in two ways: parallel and serial. In parallel

    data transfers, often more lines are used to transfer data to a device and 8 bit data path

    is expensive. The serial communication transfer uses only a single data line instead of

    the 8 bit data line of parallel communication which makes the data transfer not only

    cheaper but also makes it possible for two computers located in two different cities to

    communicate over telephone.

    Serial data communication uses two methods, asynchronous and

    synchronous. The synchronous method transfers data at a time while the

    asynchronous transfers a single byte at a time. There are some special IC chips made

    by many manufacturers for data communications. These chips are commonly referred

    to as UART (universal asynchronous receiver-transmitter) and USART (universal

    synchronous asynchronous receiver transmitter). The AT89C51 chip has a built in

    UART.

    In asynchronous method, each character is placed between start and stop

    bits. This is called framing. In data framing of asynchronous communications, the

    data, such as ASCII characters, are packed in between a start and stop bit. We have a

    total of 10 bits for a character: 8 bits for the ASCII code and 1 bit each for the start

    and stop bits. The rate of serial data transfer communication is stated in bps or it can

    be called as baud rate.

    To allow the compatibility among data communication equipment made

    by various manufacturers, and interfacing standard called RS232 was set by the

    Electronics industries Association in 1960. Today RS232 is the most widely used I/O

    interfacing standard. This standard is used in PCs and numerous types of equipment.

    However, since the standard was set long before the advent of the TTL logic family,

    its input and output voltage levels are not TTL compatible. In RS232, a 1 bit is

    represented by -3 to -25V, while a 0 bit is represented +3 to +25 V, making -3 to +3

    undefined. For this reason, to connect any RS232 to a microcontroller system we must

  • 8/22/2019 Saii Iiiiii Final

    52/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 52

    use voltage converters such as MAX232 to connect the TTL logic levels to RS232

    voltage levels and vice versa. MAX232 ICs are commonly referred to as line drivers.

    Fig 5.3.4: Serial communication process

    The RS232 cables are generally referred to as DB-9 connector. In labeling, DB-9P

    refers to the plug connector (male) and DB-9S is for the socket connector (female).

    The simplest connection between a PC and microcontroller requires a minimum of

    three pin, TXD, RXD, and ground. Many of the pins of the RS232 connector are used

    for handshaking signals. They are bypassed since they are not supported by the UART

    chip.

    IBM PC/ compatible computers based on x86(8086, 80286, 386, 486 and

    Pentium) microprocessors normally have two COM ports. Both COM ports have

    RS232 type connectors. Many PCs use one each of the DB-25 and DB-9 RS232

    connectors. The COM ports are designated as COM1 and COM2. We can connect the

    serial port to the COM 2 port of a PC for serial communication experiments. We use a

    DB9 connector in our arrangement.

  • 8/22/2019 Saii Iiiiii Final

    53/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 53

    5.4 H-BRIDGE:

    DC motors are typically controlled by using a transistor

    configuration called an "H-bridge". This consists of a minimum of four mechanical or

    solid-state switches, such as two NPN and two PNP transistors. One NPN and one

    PNP transistor are activated at a time. Both NPN and PNP transistors can be activated

    to cause a short across the motor terminals, which can be useful for slowing down the

    motor from the back EMF it creates.

    Basic Theory:

    H-bridge. Sometimes called a "full bridge" the H-bridge is so named because

    it has four switching elements at the "corners" of the H and the motor forms the cross

    bar.

    The key fact to note is that there are, in theory, four switching elements within

    the bridge. These four elements are often called, high side left, high side right, low

    side right, and low side left (when traversing in clockwise order).

    The switches are turned on in pairs, either high left and lower right, or lower

    left and high right, but never both switches on the same "side" of the bridge. If both

    switches on one side of a bridge are turned on it creates a short circuit between the

    battery plus and battery minus terminals. If the bridge is sufficiently powerful it will

    absorb that load and your batteries will simply drain quickly. Usually however the

    switches in question melt.

    To power the motor, you turn on two switches that are diagonally opposed. In

    the picture to the right, imagine that the high side left and low side right switches are

    turned on.

    The current flows and the motor begins to turn in a "positive" direction. Turn on the

    high side right and low side left switches, then Current flows the other direction

    through the motor and the motor turns in the opposite direction.

    Actually it is just that simple, the tricky part comes in when you decide what

    to use for switches. Anything that can carry a current will work, from four SPST

  • 8/22/2019 Saii Iiiiii Final

    54/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 54

    switches, one DPDT switch, relays, transistors, to enhancement mode power

    MOSFETs.

    One more topic in the basic theory section, quadrants. If each switch can be

    controlled independently then you can do some interesting things with the bridge,

    some folks call such a bridge a "four quadrant device" (4QD get it?). If you built it out

    of a single DPDT relay, you can really only control forward or reverse. You can build

    a small truth table that tells you for each of the switch's states, what the bridge will do.

    As each switch has one of two states, and there are four switches, there are 16

    possible states. However, since any state that turns both switches on one side on is

    "bad" (smoke issues forth: P), there are in fact only four useful states (the four

    quadrants) where the transistors are turned on.

    High Side Left High Side Right Low Side Left Low Side Right Quadrant Description

    On Off Off On Forward Running

    Off On On Off Backward Running

    On On Off Off Braking

    Off Off On On Braking

    Table 5.4.1

    The last two rows describe a maneuver where you "short circuit" the motor

    which causes the motors generator effect to work against itself. The turning motor

    generates a voltage which tries to force the motor to turn the opposite direction. This

    causes the motor to rapidly stop spinning and is called "braking" on a lot of H-bridge

    designs.

    Of course there is also the state where all the transistors are turned off. In this

    case the motor coasts freely if it was spinning and does nothing if it was doing

    nothing.

  • 8/22/2019 Saii Iiiiii Final

    55/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 55

    5.4.1 Implementation of H-bridge

    1. Using Relays:

    A simple implementation of an H Bridge using four SPST relays is shown.

    Terminal A is High Side Left, Terminal B is High Side Right, Terminal C is

    Low Side Left and Terminal D is Low Side Right. The logic followed is

    according to the table above.

    Warning: Never turn on A and C or B and D at the same time. This will lead

    to a short circuit of the battery and will lead to failure of the relays due to the

    large current.

    Fig 5.4.1: Implementation using relalys

    2.Using Transistors:

    We can better control our motor by using transistors or Field Effect

    Transistors (FETs). Most of what we have discussed about the relays H-Bridge

    is true of these circuits. See the diagram showing how they are connected. You

  • 8/22/2019 Saii Iiiiii Final

    56/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 56

    should add diodes across the transistors to catch the back voltage that is

    generated by the motor's coil when the power is switched on and off. This fly

    back voltage can be many times higher than the supply voltage!

    Warning: If you don't use diodes, you could burn out your transistors. Also the

    same warning as in the diode case. Don't turn on A and C or B and D at the

    same time.

    Fig 5.4.2: Implementation using transistors

    Transistors, being a semiconductor device, will have some resistance,

    which causes them to get hot when conducting much current. This is called not

    being able to sink or source very much power, i.e.: Not able to provide muchcurrent from ground or from plus voltage.

    Mosfets are much more efficient, they can provide much more current

    and not get as hot. They usually have the fly back diodes built in so you don't

    need the diodes anymore. This helps guard against fly back voltage frying

    your ICs.

    To use Mosfets in an H-Bridge, you need P-Channel Mosfets on top

    because they can "source" power, and N-Channel Mosfets on the bottom

    because then can "sink" power.

    It is important that the four quadrants of the H-Bridge circuits be

    turned on and off properly. When there is a path between the positive and

    ground side of the H-Bridge, other than through the motor, a condition exists

  • 8/22/2019 Saii Iiiiii Final

    57/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 57

    called "shoot through". This is basically a direct short of the power supply and

    can cause semiconductors to become ballistic, in circuits with large currents

    flowing. There are H-bridge chips available that are much easier, and safer, to

    use than designing your own H-Bridge circuit.

    3.Using H-Bridge Devices:

    The L293 has 2 H-Bridges (actually 4 Half H-Bridges), can provide

    about 1 amp to each and occasional peak loads to 2 amps.

    The L298 has 2 h-bridges on board, can handle 1amp and peak current

    draws to about 3amps. The LMD18200 has one h-bridge on board, can handle

    about 2 or 3 amps and can handle a peak of about 6 amps. There are several

    more commercially designed H-Bridge chips as well.

    Once a Half H-bridge is enabled, it truth table is as follows:

    INPUT

    A

    OUTPUT

    Y

    L L

    H H

    Table5.4.2

    So you just give a High level when you want to turn the Half H-

    Bridge on and Low level when you want to turn it off. When the Half H-

    Bridge is on, the voltage at the output is equal to Vcc2.If you want to make a

    Full H-Bridge, you connect the motor (or the load) between the outputs of twoHalf H-Bridges and the inputs will be the two inputs of the Half H-Bridges.

    Suppose we have connected Half H-Bridges 1 and 2 to form a Full H-

    Bridge. Now the truth table is as follows:

  • 8/22/2019 Saii Iiiiii Final

    58/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 58

    INPUT

    1A

    INPUT

    2A

    OUTPUT

    1Y

    OUTPUT

    2Y Description

    L L L LBraking (both terminals

    of motor are Gnd)

    L H L H Forward Running

    H L H L Backward Running

    H H H HBraking (both terminals

    of motor at Vcc2

    Table 5.4.3

    5.4.2 L293D Motor Driver IC:

    Since two motors are used to drive The back wheels of the robot

    independently, there is a need for Two H-bridges. Instead of implementing the above

    H-bridge controlCircuit twice, an alternative is to use an integrated circuit (IC), which

    Provides more than one

    H-bridges. One such IC is L293D, which has 2 H-Bridges in it. It can supply

    600Ma continuous and 1.2A peak Currents. It is suitable for switching applications up

    to 5 kHz. These Features make it ideal for our application. Another option is to use

    IC L298, which can drive 2A continually and 3A peak currents. The Diagram of

    L293D is shown in Figure. It can be observed from the figure that L293D has asimilar configuration to the circuit in h bridge.

  • 8/22/2019 Saii Iiiiii Final

    59/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 59

    Fig 5.4.3 L293 Motor Driver IC

    Motor Driver Connections:

    The motor driver requires 2 control

    inputs for each motor. Since we drive 2 motors, we need 4 controls

    Inputs from the microcontroller. Since it has many pins which can be

    configured as outputs, there are many options for implementation.For example, in our

    robot the last 4 bits of Port B (RB4, RB5, RB6,RB7 - Pins 37 to 40) are used to

    control the rotation direction of the motors . The enable pins of the motor driver are

    connected to the PWM outputs of the microcontroller (Pins 16and 17). This is

    because, as was mentioned above, by changing the width of the pulse (implying

    changing the enable time of the driver) one can change the speed of the motor. The

    truth table for motor driver is as shown in Table II, where H = high, L = low, and Z

    =high output impedance state.

    Since the motors are reverse aligned, in order to have the robot Move forward they

    must be configured such that one of them turns forward and the other one turns

  • 8/22/2019 Saii Iiiiii Final

    60/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 60

    backward. In case of any requirement for the robot to move backward, it is sufficient

    to just reverse the

    THE TRUTH TABLE OF THE MOTOR DRIVER

    input enable output

    H H H

    L H L

    H L z

    L L z

    Table 5.4.4

    DRIVER CONTROL INPUTS

    Direction Input 1 Input 2 Input 3 Input 4

    Forward H L L H

    Backward L H H L

    Table 5.4.5

    Outputs of the control pins. For example, in our robot while moving forward, inputs

    of the motor driver have states shown in the first row Of Table III, whereas for

    backward movement, the states shown in the second row of Table III is applied.

  • 8/22/2019 Saii Iiiiii Final

    61/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 61

    5.5 DC MOTORS

    DC motors are configured in many types and sizes, including brush less,

    servo, and gear motor types. A motor consists of a rotor and a permanent magnetic

    field stator. The magnetic field is maintained using either permanent magnets or

    electromagnetic windings. DC motors are most commonly used in variable speed and

    torque.

    Motion and controls cover a wide range of components that in some way are

    used to generate and/or control motion. Areas within this category include bearings

    and bushings, clutches and brakes, controls and drives, drive components, encoders

    and resolves, Integrated motion control, limit switches, linear actuators, linear and

    rotary motion components, linear position sensing, motors (both AC and DC motors),

    orientation position sensing, pneumatics and pneumatic components, positioning

    stages, slides and guides, power transmission (mechanical), seals, slip rings,

    solenoids, springs.

    Motors are the devices that provide the actual speed and torque in a drive

    system. This family includes AC motor types (single and multiphase motors,

    universal, servo motors, induction, synchronous, and gear motor) and DC motors

    (brush less, servo motor, and gear motor) as well as linear, stepper and air motors, and

    motor contactors and starters.

    In any electric motor, operation is based on simple electromagnetism. A

    current-carrying conductor generates a magnetic field; when this is then placed in an

    external magnetic field, it will experience a force proportional to the current in the

    conductor, and to the strength of the external magnetic field. As you are well aware of

    from playing with magnets as a kid, opposite (North and South) polarities attract,

    while like polarities (North and North, South and South) repel. The internal

    configuration of a DC motor is designed to harness the magnetic interaction between

    a current-carrying conductor and an external magnetic field to generate rotational

    motion.

    Let's start by looking at a simple 2-pole DC electric motor (here red represents

    a magnet or winding with a "North" polarization, while green represents a magnet or

    winding with a "South" polarization).

  • 8/22/2019 Saii Iiiiii Final

    62/86

    WIRELESS OPERATED WARFIELD LAND ROVER

    PRAGATI ENGINEERING COLLEGE 62

    Fig 5.5.1: Block Diagram of the DC motor

    Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator,

    commutator, field magnet(s), and brushes. In most common DC motors (and all that

    Beamers will see), the external magnetic field is produced by high-strength permanent

    magnets1. The stator is the stationary part of the motor -- this includes the motor

    casing, as well as two or more permanent magnet pole pieces. The rotor (together with

    the axle and attached commutator) rotates with respect to the stator. The rotor consists

    of windings (generally on a core), the windings being electrically connected to the

    commutator. The above diagram shows a common motor layout -- with the rotor

    inside the stator (field) magnets

    The geometry of the brushes, commutator contacts, and rotor windings are

    such that when power is applied, the polarities of the energized winding and the stator

    magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the

    stator's field magnets. As the rotor reaches alignment, the brushes move to the next

    commutator contacts, and energize the next winding. Given our example two-pole

    motor, the rotation reverses the direction of current through the rotor winding, leading

    to a "flip" of the rotor's magnetic field, and driving it to continue rotating.

    In real life, though, DC motors will always have more than two poles

    (three is a very common number). In particular, this avoids "dead spots" in the

    commutator. You can imagine how with our example two-pole motor, if the rotor is

    exactly at the middle of its rotation (perfectly aligned with the field magnets), it will

    get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where the

    commutator shorts out the power supply (i.e., both brushes touch both commutator

    contacts simultaneously). This would be bad for the power supply, waste energy, and

    damage motor components as well. Yet another disadvantage of such a simple motor

  • 8/22/2019 Saii Iiiiii Final

    63/86

    PRAGATI ENGINEERING C

    is that it would exhibit a

    produce is cyclic with th

    Fig 5.5.2:

    So since most

    the workings of one via a

    Fig 5.5.3:

    You'll notice a fe

    time (but two others are

    commutator contact to th

    field will rapidly charge

    about the effects of this

    result of the coil winding

    WIRELESS OPERATED

    OLLEGE

    igh amount of torque ripple" (the amount of t

    position of the rotor).

    Block Diagram of the DC motor having two po

    small DC motors are of a three-pole design, le

    n interactive animation (JavaScript required):

    Block Diagram of the DC motor having Three

    things from this -- namely, one pole is fully

    "partially" energized). As each brush transiti

    e next, one coil's field will rapidly collapse, as

    up (this occurs within a few microsecond).

    later, but in the meantime you can see that t

    s' series wiring:

    WARFIELD LAND ROVER

    63

    rque it could

    es only

    's tinker with

    oles

    nergized at a

    ns from one

    he next coil's

    e'll see more

    is is a di