Sunteți pe pagina 1din 39

LINE FOLLOWER ROBOT A MINI PROJECT REPORT Submitted by N.ASHWINI D.PALLAVI N.PALLAVI R.

SHRAVYA [09D21A0410] [09D21A0429] [09D21A0430] [09D21A0445]

In partial fulfilment for the award of the degree Of BACHELOR OF TECHNOLOGY (ELECTRONICS AND COMMUNICATION ENGINEERING)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGG. SRIDEVI WOMENS ENGINEERING COLLEGE (AFFILIATED TO JNTU, HYDERABAD) V.N. PALLY, HYDERABAD MARCH 2012

BONAFIDE CERTIFICATE

Certified that this project report titled LINE FOLLOWER ROBOT is the bonafide work of N.ASHWINI (09D21A0410), D.PALLAVI (09D21A0429), N.PALLAVI (09D21A0430),

R.SHRAVYA (09D21A0445) out the project under my supervision. Certified further, that to the best of my knowledge the work reported herein does not form part of any other dissertation on the basis of which a degree or award was conferred on an earlier occasion of thesis of any other candidate.

INTERNAL GUIDE Mrs.CHAITANYA.P Assistant Professor

HEAD OF THE DEPARTMENT DR.B.RAJARAM. Professor and Head of ECE Department

Signature

Signature

ACKNOWLEDGEMENT The satisfaction and euphoria that accompany the successful completion of any task would be incomplete without the mentioning of the people whose constant guidance and encouragement made it possible. We take pleasure in presenting before you, our project, which is result of studied blend of both research and knowledge. We express our earnest gratitude to our internal guide, Mrs.CHAITANYA.P , Assistance professor, our project guide, for her constant support ,encouragement and guidance .We are grateful for her cooperation and her valuable suggestions. With this acknowledgement we would like to thank Mr.BHARGAV KUMAR, Department of ECE and Dr.B.RAJA VIKRAM, Professor and Head of ECE department. Finally, we express our gratitude to all other members who are involved either directly or indirectly for the completion of this project.

Sincerely N.ASHWINI D.PALLAVI [09D21A0429] N.PALLAVI [09D21A0430] R.SHRAVYA [09D21A0445] [09D21A0410]

LINE FOLLOWER ROBOT ABSTRACT The line follower machine as its name suggests is used to follow a line on a surface and the combination could be a white line on dark surface or vice versa. To follow a line uses infrared sensors; these sensors are then used to follow the line. Depending on the value (high or low) obtained from the sensors and algorithm applied, the machine, follow the line. The mechanism applied in an IR sensor module so that sensor can sense the line. When the machine is moving the IR transmitter is continuously transmitting the IR waves which are then received by IR receive. During motion when the sensor is on white surface and the waves transmitted by transmitter are reflected by white surface and they are received by the receiver and hence and hence the sensor identifies the white surface Otherwise when the sensor is on the black surface the transmitted waves are absorbed by the black (dark) surface and thus they are not received by the receiver hence sensor identifies the black surface and then will react according to the algorithm.

CONTENTS CHAPTER 1. 1.1 1.2 1.3 1.4 2. 2.1 2.2 2.2.1 2.2.2 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 2.5 3. 3.1 3.2 3.2.1 3.3 3.3.1 3.4 TOPIC INTRODUCTION Robot Requirements Basic Design Basic Operation Block Diagram Description Block Diagram Sensors Sensors In Nature Bio-sensors DC-Motors Why DC-Motors Uses OF Gears Comparator Properties Of Comparator Use Of Comparator In IR Sensors OP-AMP Voltage Comparator Micro Control Unit(AT89S52) Circuit Diagram Description Circuit Diagram IC LM324 Pin Diagram Potentiometer Types of Potentiometer IC LM293D PAGE NO 1-2 1 1 2 2 3-9 3 3 4 4 6 6 6 7 7 7 8 8 10-31 10 11 11 12 14 14

3.5 3.6 3.6.1 3.7 3.8 3.8.1 3.8.1.1 3.8.1.2 3.8.1.3 3.8.1.4 3.8.1.5 3.9 3.10 3.11 3.11.1 4. 4.1 4.2 4.3 4.4 4.5 4.6 5

Output Connections Crystal Oscillator Operation Diode Capacitor Types of Capacitor Dielectric Capacitor Variable Capacitors Symbols Film Capacitor Ceramic Capacitors Electrolytic Capacitors LED Resistor DC Motor Use Two Motors Hardware Description Introduction The Major Features AT 89S52 AT 89S52 Micro Controller Architecture Types Of Memory Pin description Applications And Limitations Result And Conclusion Future Scope And Bibliography CHAPTER 1 INTRODUCTION

16 17 17 18 21 22 22 22 23 23 23 24 26 27 30-41 32 32 32 32 33 34 35 42 43 44

A Line follower is a robot that automatically traces a line on the ground, preferably a dark line on a light background or a light line on a dark background. This in itself is a simple concept. The line follower is a self operating robot that detects and follows a line that is drawn on the floor. The path consists of a black line on a white surface. The control system used must sense a line and manoeuvre the robot to stay on course, while constantly correcting the wrong moves using feedback Mechanism, thus forming a simple yet effective closed loop System. The robot is designed to follow very tight curves.

1.1 ROBOT: A robot can be defined as a programmable, self-controlled device consisting of electronic, electrical, or mechanical units. More generally, it is a machine that functions in place of a living agent. Robots are especially desirable for certain work functions because, unlike humans, they never get tired; they can endure physical conditions that are uncomfortable or even dangerous; they can operate in airless conditions; they do not get bored by repetition; and they cannot be distracted from the task at hand. Robots are machines which do a task which would otherwise be done by human labor. 1.2 REQUIREMENTS: Robots may or may not possess intelligence. The robot must be capable of following a line.

It should be capable of taking various degrees of turns It must be prepared of a situation that it runs into a territory which has no line to follow. (Barren land syndrome) The robot must also be capable of following a line even if it has breaks. The robot must be insensitive to environmental factors such as lighting and noise. It must allow calibration of the lines darkness threshold. Scalability must be a primary concern in the design. The color of the line must not be a factor as long as it is darker than the surroundings.

1.3 BASIC DESIGN AND REQUIREMENTS The robot is built with AT89S52, L293D, IR sensors, LM324, platform consisting of a toy car chassis. The robot is designed using two motors controlling wheels. It has infrared sensors on the bottom for detect black tracking tape .It captures the line position with the help of these optical sensors called opts-couplers mounted at front end of the robot. When the sensors detect black surface, output of comparator, LM324 is low logic and for white surface the output is high. It reports to the microcontroller for accurate control and steering of motors. MicrocontrollerATmega8L and Motor driver L293D were used to drive the motors.

1.4 BASIC OPERATION

The basic operations of the line follower are as follows: 1. Capture line position with optical sensors mounted at front end of the robot. For this a combination of IR LEDs and Photo Transistor called an opt couplers used. The line sensing process requires high resolution and high robustness. 2. Steer robot to track the line with any steering mechanism. To achieve this we use two motors governing wheel.

1.5 SAMPLE PATHS

The path is a black line on a white background with width of 3 cm (except at Bends where a little variation may be present). It may contain paths laterally displaced by an around 3 cm and also

gap of at most 5 cm. CHAPTER 2 BLOCK DIAGRAM DESCRIPTION 2.1 BLOCK DIAGRAM

Figure2.1.1: Block diagram 2.2 SENSOR A sensor is also called as detector. Sensor is a converter that measures a physical quantity and converts it into a signal which can be read by an observer or by an electronic instrument. For example, a mercury-in-glass thermometer converts the measured temperature into expansion and contraction of a liquid which can be read on a calibrated glass tube. A thermocouple converts temperature to an output voltage which can be read by a voltmeter. For accuracy, most sensors are calibrated against known standards. Sensors are used in everyday objects such as touch-sensitive elevator buttons and lamps which dim or brighten by touching the base Applications include cars, machines, aerospace, medicine, manufacturing and robotics. IR reflective sensors have one emitter (IR LED) and one receiver (Photo-Transistor or photo diode).If we have white surface it reflects the light and it will sensed by the receiver, similarly if we have black surface it absorbs the light and receiver cannot sense light. Photo diode has property that if IR light fall on it its electrical resistance comes down. Similarly if we have black surface it absorbs the light and receiver cannot sense light.

A sensor is a device which receives and responds to a signal. A sensor's sensitivity indicates how much the sensor's output changes when the measured quantity changes. For instance, if the mercury in a thermometer moves 1 cm when the temperature changes by 1 C, the sensitivity is 1 cm/C (it is basically the slope Dy/Dx assuming a linear characteristic). Sensors that measure very small changes must have very high sensitivities. Sensors also have an impact on what they measure; for instance, a room temperature thermometer inserted into a hot cup of liquid cools the liquid while the liquid heats the thermometer.

Sensors need to be designed to have a small effect on what is measured; making the sensor smaller often improves this and may introduce other advantages. Technological progress allows more and more sensors to be manufactured on a microscopic scale as micro sensors using MEMS technology. In most cases, a micro sensor reaches a significantly higher speed and

using MEMS technology. In most cases, a micro sensor reaches a significantly higher speed and sensitivity compared with macroscopic approaches.

2.2.1 SENSORS IN NATURE All living organisms contain biological sensors with functions similar to those of the mechanical devices described. Most of these are specialized cells that are sensitive to: Light, motion, temperature, magnetic fields, gravity, humidity, moisture, vibration, pressure, electrical fields, sound, and other physical aspects of the external environment Physical aspects of the internal environment, such as stretch, motion of the organism, and position of appendages. Environmental molecules, including toxins, nutrients, and pheromones Estimation of bio molecules interaction and some kinetics parameters Internal metabolic milieu, such as glucose level, oxygen level, or osmolality Internal signal molecules, such as hormones, neurotransmitters, and cytokines Differences between proteins of the organism itself and of the environment or alien creatures.

2.2.2. BIOSENSOR In biomedicine and biotechnology, sensors which detect analytic thanks to a biological component, such as cells, protein, nucleic acid or bio mimetic polymers, are called biosensors. Whereas a non-biological sensor, even organic, for biological analytic is referred to as sensor or nanosensor. This terminology applies for both in vitro and in vivo applications. The encapsulation of the biological component in biosensors, presents with a slightly different problem that ordinary sensors, this can either be done by means of a semi permeable barrier, such as a dialysis membrane or a hydro gel, a 3D polymer matrix, which either physically constrains the sensing macromolecule or chemically (macromolecule is bound to the scaffold)

FIGURE 2.2.2: SENSORS Photo diode has property that if IR light fall on it its electrical resistance comes down (I.e. its comes down from 150k to 10k if no noise present).For sense the change in Resistance we use voltage divider circuit (as shown in figure below).

FIGURE 2.1.3: VOLTAGE DIVIDER CIRCUIT 2.3 DC MOTOR A DC motor is an electric motor that runs on direct current (DC) electricity. DC motors were used to run machinery, often eliminating the need for a local steam engine or internal combustion engine. DC motors can operate directly from rechargeable batteries, providing the motive power for the first electric vehicles. Today DC motors are still found in applications as small as toys and disk drives, or in large sizes to operate steel rolling mills and paper machines. Modern DC motors are nearly always operated in conjunction with power electronic devices. Two important performance parameters of DC motors are the motor constants, Kv and Km. 2.3.1 WHY DC MOTORS Dc motors are most easy to control. One dc signals requires only two signals for its operation. If we want to change its direction just reverse the polarity of power supply across it. We can vary speed by varying the voltage across motor. 2.3.2 USE OF GEARS The dc motors dont have enough torque to drive a robot directly by connecting wheels in it. Gears used to increase the torque of dc motor on the expense of its speed.

FIGURE 2.3: DC MOTORS

2.4 COMPARATOR Comparator is a device which compares two input voltages and gives output high/low. In circuit diagram it is normally represented by a triangle having-Inverting (negative) Input (-), NonInverting (positive) Input (+), Vcc, Ground, Output. 2.4.1 PROPERTIES OF COMPARATOR If V+ > V then VO= Vcc (Digital High 1 output) If V+ < V then VO=0 (Digital Low 0 output)

2.4.2 USE OF COMPARATOR IN IR SENSOR

As above we see that two inputs are required for comparator. One input is from photo-receiver (like photo-diode), other is generated by us using potentiometer. The second voltage is also called as reference voltage for that sensor. The input voltages must stay within the limits specified by the manufacturer. Early integrated comparators, like the LM111 family, and certain high-speed comparators like the LM119 family, require input voltage ranges substantially lower than the power supply voltages (15 V vs. 36V).[1] Rail-to-rail comparators allow any input voltages within the power supply range. When powered from a bipolar (dual rail) supply.

or, when powered from a unipolar TTL/CMOS power supply:

Specific rail-to-rail comparators with p-n-p input transistors, like the LM139 family, allow input

potential to drop 0.3 Volts below the negative supply rail, but do not allow it to rise above the positive rail. Specific ultra-fast comparators, like the LMH7322, allow input signal to swing below the negative rail and above the positive rail, although by a narrow margin of only 0.2V. Differential input voltage (the voltage between two inputs) of a modern rail-to-rail comparator is usually limited only by the full swing of power supply.

2.4.3 OP-AMP VOLTAGE COMPARATOR

FIGURE: A SIMPLE OP-MAP COMPARATOR An operational amplifier (op-amp) has a well balanced difference input and a very high gain. This parallels the characteristics of comparators and can be substituted in applications with lowperformance requirements theory, a standard op-amp operating in open-loop configuration (without negative feedback) may be used as a low-performance comparator. When the noninverting input (V+) is at a higher voltage than the inverting input (V-), the high gain of the op-amp causes the output to saturate at the highest positive voltage it can output. When the non-inverting input (V+) drops below the inverting input (V-), the output saturates at the most negative voltage it can output. The op-amp's output voltage is limited by the supply voltage. An op-amp operating in a linear mode with negative feed. Using a balanced, split-voltage power supply, (powered by VS) its transfer function is typically written as : . However, this equation may not be applicable to a comparator circuit which is non-linear and operates open-loop

2.5 MICROCONTROLLER UNIT (AT89S52) A Micro Controller consists of a powerful CPU tightly coupled with memory, various I/O interfaces 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, 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 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

The Major Features


Compatible with MCS-51 products. 4k Bytes of in-system Reprogrammable flash memory. Fully static operation: 0HZ to 24MHZ. Three level programmable clock. 128*8 bit timer/counters. Six interrupt sources.

Programmable serial channel. Low power idle power-down modes

FIGURE 2.5 PIN DIAGRAM

CHAPTER 3 CIRUIT DIAGRAM DESCRIPTION

3.1 CIRCUIT DIAGRAM

3.2 IC LM324

IC LM324 contains four comparators. You can see the datasheet of that IC for more details. 3.2.1 PIN DIAGRAM

FIGURE 3.2.1 PIN DESCRIPTION

LM324 is a 14pin IC consisting of four independent operational amplifier (op-amps) compensated in a single package. Op-amps are high gain electronic voltage amplifier with differential input and, usually, a single-ended output. The output voltage is many times higher than the voltage difference between input terminals of an op-amp.

These op-amps are operated by a single power supply LM324 and need for a dual supply is eliminated. They can be used as amplifiers, comparators, oscillators, rectifiers etc. The conventional op-amp applications can be more easily implemented with LM324.

PIN DESCRIPTION:

Pin No 1 2 3 4 5 6

Function comparator Inverting input of 1st comparator Non-inverting input of 1st comparator Supply voltage; 5V (up to 32V) Non-inverting input of 2nd comparator Inverting input of 2nd comparator Output of 1st

Name Output 1 Input 1Input 1+ Vcc Input 2+ Input 2-

7 8 9 10 11 12 13 14

Output of 2nd comparator Output of 3rd comparator Inverting input of 3rd comparator Non-inverting input of 3rd comparator Ground (0V) Non-inverting input of 4th comparator Inverting input of 4th comparator Output of 4th comparator

Output 2 Output 3 Input 3Input 3+ Ground Input 4+ Input 4Output 4

3.3 POTENTIO METER (POT ' ) Potentiometer is a variable resistor which is used to vary the resistance by rotating the shaft. Potentiometers are available from 100 ohm to 470Kohm. A potentiometer informally, a pot, in electronics technology is a component, a three-terminal resistor with a sliding contact that forms an adjustable voltage divider.[1] If only two terminals are used, one end and the wiper, it acts as a variable resistor or rheostat. In circuit theory and measurement a potentiometer is essentially a voltage divider used for measuring electric potential (voltage); the component is an implementation of the same principle, hence its name. Potentiometers are commonly used to control electrical devices such as volume controls on audio equipment. Potentiometers operated by a mechanism can be used as position transducers, for example, in a joystick. Potentiometers are rarely used to directly control significant power (more than a watt), since the power dissipated in the potentiometer would be comparable to the power in the controlled load (see infinite switch). Instead they are used to adjust the level of analog signals (e.g. volume controls on audio), and as control inputs for electronic circuits. For example, a light dimmer uses a potentiometer to control the switching of a TRIACand so indirectly to control the brightness of lamps user-accessible rotary potentiometers can be fitted with a switch which operates usually at the anti-clockwise extreme of rotation.

FIGURE 3.3 POTENTIOMETER (POT ' )

Potentiometer is a voltage divider. If we connect Lead A to Vcc and Lead B to ground then you can get voltages from 0 to Vcc by at LeadW. Mainly potentiometers are used to generate reference voltage for LM324.E.g. if we couple potentiometer to the shaft of a motor, then we can measure the angle moved by shaft by connect the output of Leads W and Lead B to an ADC to get a digital reading of angle. I.e. a shaft encoder, but there is a limitation, we can't get rotation >270 degree and also number of rotations since potentiometer shaft can only move from A to B.

3.3.1 TYPES OF POTENTIOMETERS

FIGURE 3.3.1 TYPES OF POTENTIOMETER

Above figure shows different types of potentiometers available. Second and third potentiometers are mainly used when you only want to change the value of resistance occasionally while the first one is used when we have to vary resistance frequently. Second and third one are easy to be inserted in breadboard and PCB they remain Fixed. Second and third type of potentiometers also called Preset. Resistance is varied by rotating the shaft in the body of the potentiometer.

3.4 IC L293D

This is a motor driver IC that can drive two motor simultaneously. Lets see how we use this IC.

FIGURE 3.4 PIN DETAILS OF LM293D

Points regarding L293D Supply voltage (Vss) is the Voltage at which we wish to drive the motor. Generally we prefer 6V for dc motor and 6 to 12V for gear motor, depending upon the rating of the motor. Logical Supply Voltage will decide what value of input voltage should be considered as high or low .So if we set Logical supply Voltage equals to +5V, then -0.3V to 1.5V will be considered as Input Low Voltage and 2.3 V to 5V will be considered as Input High Voltage. L293D has 2 Channels .One channel is used for one motor. Channel 1 - Pin 1 to 8 Channel 2 - Pin 9 to 16

Enable Pin is use to enable or to make a channel active .Enable pin is also called as Chip Inhibit Pin. All Input (Pin No. 2, 7,10and 15) of L293D IC is the output from Microcontroller (ATmega8).E.g.-We connected (Pin No. 2, 7, 10 and 15) of L293D IC to (Pin No. 14, 15,16and 17) of ATmega8 respectively in our robots, because on pin 15And 16 of ATmega8 we can generate PWM. All Output (Pin No. 3, 6,11and 14) of L293D IC goes to the input of Right and Left motor.

3.5 OUTPUT CONNECTIONS

OUTPUT 1 (Pin No 3) --- Negative Terminal of Right Motor OUTPUT 2 (Pin No 6) --- Positive Terminal of Right Motor OUTPUT 3 (Pin No 10) --- Positive Terminal of Left Motor OUTPUT 4 (Pin No 14) --- Negative Terminal of Left Motor For one motor: Positive terminal 0 VSS Negative terminal 0 0 Motor output No movement straight

0 VSS

VSS VSS

reverse No movement

One channel corresponds to one motor. Enable pin should be high for activating The corresponding channel. Input 1 corresponds to Output 1. If Enable 1=High (1) Input1 =High (1), Output1=Vss Input1 =Low (0), Output1=0

If Enable 1=Low (0) Input1 =High (1), Output1=0 Input1 =Low (0), Output1=0 Means if Enable pin low, the output will be at 0 always. If its high output depend on input 3.6 CRYSTAL OSCILLATOR

A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits and to stabilize frequencies for for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits designed around them became known as "crystal oscillators." Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of megahertz. More than two billion (2109) crystals are manufactured annually. Most are used for consumer devices such as wristwatches, clocks, radios, computers, and cell phones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, and oscilloscopes.

FIGURE 3.6 CRYSTAL OSCILLATORS 3.6.1 OPERATION A crystal is a solid in which the constituent atoms, molecules, or ions are packed in a regularly ordered, repeating pattern extending in all three spatial dimensions. Almost any object made of an elastic material could be used like a crystal, with appropriate transducers, since all objects have natural resonant frequencies of vibration. For example, steel is very elastic and has a high speed of sound. It was often used in mechanical filters before quartz. The resonant frequency depends on size, shape, elasticity, and the speed of sound in the material. High-frequency crystals are typically cut in the shape of a simple, rectangular plate. Low-frequency crystals, such as those used in digital watches, are typically cut in the shape of a tuning fork. For applications not needing very precise timing, a low-cost ceramic resonator is often used in place of a quartz crystal. When a crystal of quartz is properly cut and mounted, it can be made to distort in an electric field by applying a voltage to an electrode near or on the crystal. This property is known as piezoelectricity. When the field is removed, the quartz will generate an electric field as it returns to its previous shape, and this can generate a voltage. The result is that a quartz crystal behaves like a circuit composed of an inductor, capacitor and resistor, with a precise resonant frequency. Quartz has the further advantage that its elastic constants and its size change in such a way that the frequency dependence on temperature can be very low. The specific characteristics will depend on the mode of vibration and the angle at which the quartz is cut (relative to its crystallographic axes).[7] Therefore, the resonant frequency of the plate, which depends on its size, will not change much, either. This means that a quartz clock, filter or oscillator will remain accurate. For critical applications the quartz oscillator is mounted in a temperature-controlled container, called a crystal oven, and can also be mounted on shock absorbers to prevent perturbation by external mechanical vibrations.

3.7 DIODE In electronics, a diode is a two terminal electronic component with asymmetric transfer characteristic, with low (ideally zero) resistance to current flow in one direction, and high (ideally infinite) resistance in the other. A semiconductor diode, the most common type today, is a crystalline piece of semiconductor material with a p-n junction connected to two electrical terminals. A vacuum tube diode, now rarely used except in some high-power technologies and by enthusiasts, is a vacuum tube with two electrodes, a plate (anode) and cathode. The most common function of a diode is to allow an electric current to pass in one direction while blocking current in the opposite direction. Thus, the diode can be viewed as an electronic version of a check value. This unidirectional behaviour is called rectification, and is used to convert alternating current to direct current, including extraction of modulation from radio signals in radio receivers

these diodes are forms of rectifiers. However, diodes can have more complicated behaviour than this simple onoff action. Semiconductor diodes do not begin conducting electricity until a certain threshold voltage or cutIn voltage is present in the forward direction (a state in which the diode is said to be forwardbiased). The voltage drop across a forward-biased diode varies only a little with the current, and is a function of temperature; this effect can be used as a temperature sensor or voltage reference. Semiconductor diodes' nonlinear currentvoltage characteristic can be tailored by varying the semiconductor materials and introducing impurities into (doping) the materials. These are exploited in special-purpose diodes that perform many different functions. For example, diodes are used to regulate voltage (Zener diodes), to protect circuits from high voltage surges (avalanche diodes), to electronically tune radio and TV receivers (varactor diodes), to generate radio frequency oscillations (tunnel diodes, Gunn diodes, IMPATT diodes), and to produce light (light emitting diodes). Tunnel diodes exhibit negative resistance, which makes them useful in some types of circuits. Diodes were the first semi conductors devices discovery of crystals' rectifying abilities was made by German physicist Ferdinand Braun in 1874. The first semiconductor diodes, called cat's whisker diodes, developed around 1906, were made of mineral crystals such as galena. Today most diodes are made of silicon, but other semiconductors such as germanium are sometimes used.

FIGURE 3.7 DIODES Light Emitting Diode (LED): It is one of the most popular types of diodes and when this diode permits the transfer of electric current between the electrodes, light is produced. In most of the diodes, the light cannot be seen as they are at frequencies that do not permit visibility. The colour of light depends on the energy gap of the semiconductor. Avalanche Diode: This type of diode operates in the reverse bias, and used avalanche effect for its operation. The avalanche breakdown takes place across the entire PN junction, when the voltage drop is constant and is independent of current. Generally, the avalanche diode is used for photo-detection; where in high levels of sensitivity can be obtained by avalanche diode. Laser Diode: This type of diode is different from the LED type, as it produces coherent light. These diodes find their application in DVD and CD drives, laser pointers, etc. Laser diodes are more expensive than LEDs. However, they are cheaper than other forms of laser generators. Scotty Diodes: These diodes feature lower forward voltage drop as compared to the ordinary silicon PN junction diodes. The voltage drop may be somewhere between 0.15 and 0.4 volts at low currents, as compared to the 0.6 volts for a silicon diode. Schottky diodes are used in RF applications, rectifier applications and clamping diodes. Zener diode: This type of diode provides a stable reference voltage, thus is a very useful type and is used in vast quantities. The diode runs in reverse bias, and breaks down on the arrival of a certain voltage. A stable voltage is produced, if the current through the resistor is limited. In power supplies, these diodes are widely used for the reference of the voltage. Varicap Diode or Varactor Diode: This type of diode feature a reverse bias placed upon it, which varies the width of the depletion layer as per the voltage placed across the diode. This diode acts as a capacitor and capacitor plates are formed by the extent of conduction regions and the depletion region as the insulating dielectric. Rectifier Diode: These diodes are used to rectify alternating power inputs in power supplies. They can rectify current levels that range from an amp upwards. If low voltage drops are required, then Schottky diodes can be used, however, generally these diodes are PN junction diodes. 3.8 CAPACITOR This article is about the electronic component. For the physical phenomenon, see capacitance. For an overview of various kinds of capacitors, see types of capacitor. Photo-SMDcapacitors.jpg

Miniature low-voltage capacitors, by a cm ruler

FIGURE 3.8 CAPACITOR A capacitor (originally known as condenser) is a passive two-terminal electrical component used to store energy in an electric field. The forms of practical capacitors vary widely, but all contain at least two electrical conductors separated by a dielectric (insulator); for example, one common construction consists of metal foils separated by a thin layer of insulating film. Capacitors are widely used as parts of electrical circuits in many common electrical devices. When there is a potential difference (voltage) across the conductors, a static electric field develops across the dielectric, causing positive charge to collect on one plate and negative charge on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is characterized by a single constant value, capacitance, measured in farads.

3.8.1 TYPES OF CAPACITOR There are a very, very large variety of different types of capacitor available in the market place and each one has its own set of characteristics and applications, from very small delicate trimming capacitors up to large power metal-can type capacitors used in high voltage power correction and smoothing circuits. Like resistors, there are also variable types of capacitors which allow us to vary their capacitance value for use in radio or "frequency tuning" type circuits. 3.8.1.1 DI ELECTRIC CAPACITOR Dielectric Capacitors are usually of the variable type were a continuous variation of capacitance is required for tuning transmitters, receivers and transistor radios. Variable dielectric capacitors are multi-plate air-spaced types that have a set of fixed plates and a set of movable plates which move in between the fixed plates. The position of the moving plates with respect to the fixed plates determines the overall capacitance value. The capacitance is generally at maximum when the two sets of plates are fully meshed together 3.8.1.2 VARIABLE CAPACITOR SYMBOLS Variable Capacitor Symbol

FIGURE 3.8.1.2 Variable Capacitor Symbols

As well as the continuously variable types, preset type variable capacitors are also available

called Trimmers. These are generally small devices that can be adjusted or "pre-set" to a particular capacitance value with the aid of a small screwdriver and are available in very small capacitances of 500pF or less and are non-polarized. 3.8.1.3 Film Capacitor Film Capacitors are the most commonly available of all types of capacitors, consisting of a relatively large family of capacitors with the difference being in their dielectric properties. Film type capacitors are available in capacitance ranges from as small as 5pF to as large as 100uF depends upon the actual type of capacitor and its voltage rating. Film Capacitors which use polystyrene, polycarbonate or Teflon as their dielectrics are sometimes called "Plastic capacitors". 3.8.1.4 Ceramic Capacitors Ceramic Capacitors or Disc Capacitors as they are generally called are made by coating two sides of a small porcelain or ceramic disc with silver and are then stacked together to make a capacitor. For very low capacitance values a single ceramic disc of about 3-6mm is used. Ceramic capacitors have a high dielectric constant (High-K) and are available so that relatively high capacitances can be obtained in a small physical size.

FIGURE 3.8.1.4 CERAMIC CAPACITOR Ceramic capacitors have values ranging from a few pico farads to one or two microfarads but their voltage ratings are generally quite low. 3.8.1.5 ELECTROLYTIC CAPACITORS Electrolytic Capacitors are generally used when very large capacitance values are required. Here instead of using a very thin metallic film layer for one of the electrodes, a semi-liquid electrolyte solution in the form of a jelly or paste is used which serves as the second electrode (usually the cathode). The dielectric is a very thin layer of oxide which is grown electrochemically in production with the thickness of the film being less than ten microns.

FIGURE 3.8.1.5 ELECTROLYTIC CAPACITOR Electrolytic Capacitors are generally used in DC power supply circuits due to their large capacitances and small size to help reduce the ripple voltage or for coupling and decoupling applications. One main disadvantage of electrolytic capacitors is their relatively low voltage rating and due to the polarisation of electrolytic capacitors, it follows then that they must not be used on AC supplies. 3.9 LED

Light-emitting diode RBG-LED.jpg

Red, pure green and blue LEDs of the 5mm diffused type Type Working principle Invented First production Passive, optoelectronic Electroluminescence Nick Holonyak Jr. (1962)[1] 1968[2]

Electronic symbol LED symbol.svg Pin anode and cathode configuration

FIGURE 3.9 LED

A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet, and infrared wavelengths, with very high brightness. When a light-emitting diode is forward-biased , electrons are able to recombine with electron holes within the device, releasing energy in the form of photons.. LEDs are often small in area (less than 1 mm2), and integrated optical components may be used to shape its radiation pattern.[5] LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved physical robustness, smaller size, and faster switching Light-emitting diodes are used in applications as diverse as aviation lighting, automotive lighting, advertising, general lighting, and traffic signals. LEDs have allowed new text, video displays, and sensors to be developed, while their high switching rates are also useful in advanced communications technology.

LEDs are produced in a variety of shapes and sizes. The colour of the plastic lens is often the same as the actual colour of light emitted, but not always. .

Common package shapes include round, with a domed or flat top, rectangular with a flat top (as used in bar-graph displays), and triangular or square with a flat top. The encapsulation may also be clear or tinted to improve contrast and viewing angle.

3.10 RESISTER Resistor.jpg

FIGURE 3.10 RESITER Axial-lead resistors on tape. The tape is removed during assembly before the leads are formed and the part is inserted into the board. A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. The current through a resistor is in direct proportion to the voltage across the resistor's terminals. Thus, the ratio of the voltage applied across a resistor's terminals to the intensity of current through the circuit is called resistance. This relation is represented by Ohm's law:

Where I is the current through the conductor in units of amperes, V is the potential difference measured across the conductor in units of volts, and R is the resistance of the conductor in units of ohms. More specifically, Ohm's law states that the R in this relation is constant, independent of the current. Resistors are common elements of electrical networks and electronic circuits and are ubiquitous in electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel-chrome). Resistors are also implemented within integrated circuits, particularly analog devices, and can also be integrated into hybrid and printed circuits. The electrical functionality of a resistor is specified by its resistance: common commercial resistors are manufactured over a range of more than nine orders of magnitude. When specifying that resistance in an electronic design, the required precision of the resistance may require attention to the manufacturing tolerance of the chosen resistor, according to its specific application. The temperature coefficient of the resistance may also be of concern in some

precision applications. Practical resistors are also specified as having a maximum power rating which must exceed the anticipated power dissipation of that resistor in a particular circuit: this is mainly of concern in power electronics applications. Resistors with higher power ratings are physically larger and may require heat sinks. In a high-voltage circuit, attention must sometimes be paid to the rated maximum working voltage of the resistor. Practical resistors have a series inductance and a small parallel capacitance; these specifications can be important in high-frequency applications. In a low-noise amplifier or preamp, the noise characteristics of a resistor may be an issue. The unwanted inductance, excess noise, and temperature coefficient are mainly dependent on the technology used in manufacturing the resistor. They are not normally specified individually for a particular family of resistors manufactured using a particular technology.[1] A family of discrete resistors is also characterized according to its form factor, that is, the size of the device and the position of its leads (or terminals) which is relevant in the practical manufacturing of circuits using them. 3.11 DC MOTORS A DC motor is an electric motor that runs on direct current (DC) electricity. DC motors were used to run machinery, often eliminating the need for a local steam engine or internal combustion engine. DC motors can operate directly from rechargeable batteries, providing the motive power for the first electric vehicles. Today DC motors are still found in applications as small as toys and disk drives, or in large sizes to operate steel rolling mills and paper machines. Modern DC motors are nearly always operated in conjunction with power electronic devices. Two important performance parameters of DC motors are the motor constants, Kv and Km. Direct current (DC) motors are widely used to generate motion in a variety of products. Permanent magnet DC (direct current) motors are enjoying increasing popularity in applications requiring compact size, high torque, high efficiency, and low power consumption. In a brushed DC motor, the brushes make mechanical contact with a set of electrical contacts provided on a commutator secured to an armature, forming an electrical circuit between the DC electrical source and coil windings on the armature. As the armature rotates on an axis, the stationary brushes come into contact with different sections of the rotating commentator. Permanent magnet DC motors utilize two or more brushes contacting a commutator which provides the direct current flow to the windings of the rotor, which in turn provide the desired magnetic repulsion/attraction with the permanent magnets located around the periphery of the motor. The brushes are conventionally located in brush boxes and utilize a U-shaped spring which biases the brush into contact with the commutator. Permanent magnet brushless dc motors are widely used in a variety of applications due to their simplicity of design, high efficiency, and low noise. These motors operate by electronic commutation of stator windings rather than the conventional mechanical commutation accomplished by the pressing engagement of brushes against a rotating commutator. A brushless DC motor basically consists of a shaft, a rotor assembly equipped with one or more permanent magnets arranged on the shaft, and a stator assembly which incorporates a stator component and phase windings. Rotating magnetic fields are formed by the currents applied to the coils. USE DC MOTORS Dc motors are most easy to control. One dc signals requires only two signals for its operation. If we want to change its direction just reverse the polarity of power supply across it. We can vary speed by varying the voltage across motor.

USE OF GEARS The dc motors dont have enough torque to drive a robot directly by connecting wheels in it. Gears used to increase the torque of dc motor on the expense of its speed. NOTE In toy car, there is a gear box that contains several combinations of gear Geared motor has gears box at its front FIGURE 3.10 DC MOTORS

3.11.1 USE TWO MOTORS

By using two motors we can move our robot in any direction. This steering mechanism of robot is called as differential drive. Lets check how it works

FIGURE 3.11.1. DIFFERENT TYPES OF MOVEMENT OF ROBOT The table:

Left Motor Straight Stop Reverse Straight Straight Reverse Use of Motor Driver

Right Motor Straight Straight Straight Stop Reverse Reverse

Robot Movement Straight Left Sharp left Right Sharp Right Reverse

From microcontroller we cannot connect a motor directly because microcontroller cannot give sufficient current to drive the DC motors. Motor driver is a current enhancing device; it can also be act as Switching Device. Thus we insert motor driver in between motor and microcontroller. Motor driver take the input signals from microcontroller and generate corresponding output for motor.

CHAPTER 4 HARDWARE DESCRIPTION

MICROCONTROLLER UNIT (AT89S52)

4.1 INTRODUCTION
A Micro Controller consists of a powerful CPU tightly coupled with memory, various I/O interfaces 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, 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 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.

4.2 THE MAJOR FEATURES


Compatible with MCS-51 products. 4k Bytes of in-system Reprogrammable flash memory. Fully static operation: 0HZ to 24MHZ. Three level programmable clock. 128*8 bit timer/counters. Six interrupt sources. Programmable serial channel. Low power idle power-down modes.

4.3 AT 89S52
The system requirements and control specifications clearly rule out the use of 16, 32 or 64 bit micro controllers or microprocessors. Systems using these may be earlier to implement due to large number of internal features. They are also faster and more reliable but, 8-bit micro controller satisfactorily serves the above application. Using an inexpensive 8-bit Microcontroller will doom the 32-bit product failure in any competitive market place. AT89S52 is used of all the 8-bit microcontroller available in the market the main reason would be because it has 4 Kb on chip flash memory which is just sufficient for mentioned 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 AT89S52 is the optimal solution.

FIGURE 4.3 AT89S52 MICRO CONTROLLERS

4.4 AT89S52 MICROCONTROLLER ARCHITECTURE


The 89S52 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 (89S52). Internal RAM of 128 bytes: a. Four register banks, each containing eight registers. b. Sixteen bytes, which may be addressed at the bit level. c. Eighty bytes of general-purpose data memory. Thirty two input/output pins arranged as four 8-vbit ports: p0-p3. Two 16-bit timer/counters: T0 and T1. Full duplex serial data receiver/transmitter: SBUT. Control registers: TCON, TMOD, SCON, PCON, IP and IE. Two external and three internal interrupts sources. Oscillator and clock circuits.

4.5 TYPES OF MEMORY


The 89S52 have three general types of memory. They are on-chip memory, external Code memory and external Ram. On-Chip memory refers to physically existing 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.

CODE MEMORY

Code memory is the memory that holds the actual 89S52 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 controlled by pin provided as EA.

INTERNAL RAM
The 89S52 have a bank of 128 of internal RAM. The internal RAM is found on-chop. 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 89S52 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
Flash memory (sometimes called flash RAM) is a type of constantly-powered non-volatile that can be erased and reprogrammed in units of memory called blocks. It is a variation of electrically erasable programmable read-only memory (EEPROM) which, unlike flash memory, is erased and rewritten at the byte level, which is slower than flash memory updating. Flash memory is often used to hold control code such as the basic input/output system (BIOS) in a personal computer. Flash memory gets its name because the microchip is organized so that a section of memory cells are erased in a single action or flash.The erasure is caused by Fowler-Nordheim tunnelling in which electrons pierce through a thin dielectric material to remove and electronic charge from a floating gate associated with each memory cell. Intel offers a form flash memory that holds two bits (rather than one) in each memory cell, thus doubling the capacity of memory without a corresponding increase in price. 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.

FIGURE 4.6 PIN DIAGRAM OF AT89S52

4.6 PIN DESCRIPTION


VEE: 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 ones 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 PO 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,port1 pins that are externally being pulled low will source current(IIL) because of the internal pull-ups. Port1 also receives the low-order address bytes during flash programming and verification. Port 2 Port 2 is an 8-bit bi-directional I/0 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. Port2 emits the high-order address byte during fetches from external program memory and during accesses to external data memories that use 16-bit address (MOVX @DPTR) port2 emits the contents of the p2 special function register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. PORT 3 Port 3 is an 8-bit bi-directional I/O port with input terminal pull-ups. The port 3 output buffers can sink/source four TTL inputs. When 1 are written to port 3 they are pulled high by the internal pullups and can be used as inputs. As inputs, port 3 pins that are externally being pulled low will sorce current (IIL) because of the pull-up port 3 also serves the function of various special features of the AT89S52 as listed below. Port pin P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 Alternate functions RXD (serial input port) TXD (serial output port) INT0 (external interrupt 0) INT1 (external interrupt 1) T0 (timer 0 external input) T1 (timer 1 external input) WR (external data memory write strobe) RD (external data memory read strobe

TABLE 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 devices. ALE/PROG Address latch enable output pulse for latching the low byte of the address during access 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 the 1/6 oscillator frequency, and may be used for external timing or clocking purposes. PSEN Program store enable is the read strobe to external program memory. When the AT89S52 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. 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 the require 12-volt VPP. XTAL 1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL 2 It is the output from the inverting oscillator amplifier. 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 8-bit registers. In 8051 there is only one data byte type: 8bits. The 8 bits of a register are shown in the diagram from MSB (most significant bit) D7 to the LSB (*least significant bit)D0. With an 8-bit data type, any data larger than 8bits must be broken into 8-bit chunks before it is processed since there are a large number of registers in the 8051, we will concentrate on some of the widely used general-purpose registers and cover special registers in future chapters. D7 D6 D5 D4 D3 D2 D1 D0

The most widely used registers of the 8051 are A(accumulator), B ,R0 ,R1 ,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 al 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). There are mainly special function registers and they are aidely used. The SFR can be accessed by the names or by their addresses. For example, register A has address E0h, and register B has been ignited the address FOH, as shown in the table. The following two point a should noted about the SFR addresses. 1. The special function registers have address between 80H and FFH. These address 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. Regarding direct addressing mode, notice the following two points: (a) the address value is limited to one byte, 00-FFH, which means this addressing mode is limited to accessing RAM locations and registers located inside the 8051. (b) If you examine the 1st fie for an assembly language program, you will see that SFR registers names are replaced with their address as listed in table. Symbol ACC B PSW SP DPTR DPL DPH P0 P1 P2 P3 IP IE TMOD TCON T2CON T2MOD TH0 TL0 TH1 TL1 TH2 TL2 RCAP2H RCAP2L SCON SBUF PCON Name Accumulator B register Program status word Stack pointer Data pointer 2 bytes Low byte High byte Port 0 Port 1 Port 2 Port 3 Interrupt priority control Interrupt enable control Timer/counter mode control Timer/counter control Timer/counter 2 control Timer/counter mode 2 control Timer/counter 0 high byte Timer/counter 0 low byte Timer/counter 1 high byte Timer/counter 1 low byte Timer/counter 2 high byte Timer/counter 2 low byte T/C 2 capture register high byte T/C 2 capture register low byte Serial control Serial data buffer Power control Address 0E0H 0F0H 0D0H 81H 82H 83H 80H 90H 0A0H 0B0H 0B8H 0A8H 89H 88H 0C8H 0C9H 8CH 8AH 8DH 8BH 0CDH 0CCH 0CBH 0CAH 98H 99H 87H

SPECIAL FUNCTION REGISTERS WITH ADDRESS A Register (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 performed by the ALU, the result is placed into the accumulator. If a data should be transferred from one register to another, it must go through 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). During programming, each of register s is called by name so that their exact address is not so important for the user. During compiling into machine code (series of hexadecimal numbers recognised as instructions by the microcontroller). PV will automatically, instead of registers name, write necessary address into the microcontroller. A single microcontroller can serve several devices. There are two ways to do that INTERRUPTS or POLLING. POLLING In polling the microcontroller continuously monitors the status of a given device; when the status condition is met, it performs the service. After that, it moves on to monitor the next device until each one is serviced. Although polling can monitor the status of several devices and serve each of them as certain condition are met. INTERRUPTS In the interrupts method, whenever any device needs its service, the device notifies the microcontroller BT sending it an interrupts signal. Upon receiving an interrupt signal, the microcontroller interrupts whatever it is doing and serves the device. The program associated with the interrupts is called the interrupt service routine (ISR).or interrupt handler. INTERRUPTS Vs POLLING The advantage of interrupts is that the microcontroller can serve many devices (not all the same time, of course); each device can get the attenuation of the microcontroller based on the priority assigned to it. The polling method cannot assign priority since it checks all devices in round-robin fashion. This is again not possible with the polling method. The most important reason that the interrupt method is preferable is that the polling method wastes much of the microcontrollers time by polling devices that do not need service. So, in order to avoid tying down the microcontroller, interrupts are used.

APPLICATIONS Industrial automated equipment carriers Automated cars. Tour guides in museums and other similar applications. Second wave robotic reconnaissance operations.

LIMITATIONS

Choice of line is made in the hardware abstraction and cannot be changed by software. Calibration is difficult, and it is not easy to set a perfect value. The steering mechanism is not easily implemented in huge vehicles and impossible for non-electric vehicles (petrol powered). Few curves are not made efficiently, and must be avoided. Lack of a four wheel drive, makes it not suitable for a rough terrain. Use of IR even though solves a lot of problems pertaining to interference, makes it hard to debug a faulty sensor. Lack of speed control makes the robot unstable at times.

RESULT AND CONCLUSION

The robot follows a line as demonstrated. It effectively overcomes problems such as barren land syndrome and line breaks. The hardware and software works as designed.

FUTURE SCOPE Software control of the line type (dark or light) to make automatic detection possible. Obstacle detecting sensors to avoid physical obstacles and continue on the line. Distance sensing and position logging & transmission

BIBLIOGRAPHY Programming and Customizing the PIC microcontroller by Myke Predko PIC micro Mid-Range MCU Family Reference Manual by MICROCHIP PIC Robotics, A beginners guide to robotics projects using the PIC micro by John Iovine The Seattle Robotics Society Encoder library of robotics articles Dallas Personal Robotics Group. Most of these tutorials and articles were referred. Go Robotics.NET, this page has many useful links to robotics articles. Carnegie Mellon Robotics Club. This is the links page with lots of useful resources This page is called the Micro-mouse Handbook and an excellent tutorial for small scale robotics. This is the main website of microchip. Thousands of application notes, tutorials & manuals can be found here.