pick and place line following robot report

Download Pick and place Line following robot report

If you can't read please download the document

Upload: pradeep-yadav

Post on 21-May-2015

2.935 views

Category:

Technology


7 download

DESCRIPTION

Download report on pick and place line following report.the robot is made by using LM324,L293d and microcontroller 8051/52.

TRANSCRIPT

  • 1. LINE FOLLOWING PICK AND PLACEROBOTA Project submitted in partial fulfillment of the requirements forthe award of the degree ofB.TechinELECTRONICS AND INSTRUMENTATIONByYASH KUMAR YADAV (1009032059)VINOD KUMAR (1009032058)PRADEEP KUMAR (1009032037)ELECTRONICS AND INSTRUMENTATIONIEC COLLEGE OF ENGINEERING & TECHNOLOGYGREATER NOIDAMAY 20141

2. DECLARATIONWe, hereby declare that this submission is our own work and that, to the best of ourknowledge and belief, it contains no material previously published or written byanother person nor material which to a substantial extent has been accepted for theaward of any other degree or diploma of the university or other institute of higherlearning, except where due acknowledgement has been made in the text.1. Signature....................................................Name YASH KUMAR YADAVRoll No 1009032059Date ...................................................2. Signature....................................................Name VINOD KUMARRoll No 1009032058Date ...................................................3. Signature...................................................Name PRADEEP KUMARRoll No. 1009032037Date ...................................................MR.SATISH JAISWAL MR. R.P. SINGHGuide Head of the DepartmentProject Viva-voce held on _____________________________Internal Examiner External Examiner2 3. ABSTRACTMankind has always strived to give life like qualities to its artifacts in an attempt tofind substitutes for himself to carry out his orders and also to work in a hostileenvironment. The popular concept of a robot is of a machine that looks and works likea human being.The industry is moving from current state of automation to Robotization, to increaseproductivity and to deliver uniform quality. The industrial robots of today may notlook the least bit like a human being although all the research is directed to providemore and more anthropomorphic and humanlike features and super-humancapabilities in these.One type of robot commonly used in industry is a robotic manipulator or simply arobotic arm. It is an open or closed kinematic chain of rigid links interconnected bymovable joints. In some configurations, links can be considered to correspond tohuman anatomy as waist, upper arm and forearm with joint at shoulder and elbow. Atend of arm a wrist joint connects end effectors which may be a tool and its fixture or agripper or any other device to work.Here how a pick and place Line following robot can be designed for a workstationwhere loading and packing of lead batteries is been presented. All the variousproblems and obstructions for the loading process has been deeply analyzed and beentaken into consideration while designing the pick and place line following robot.3 4. ACKNOWLEDGEMENTIt gives us a great sense of pleasure to present the report of the B. Tech Projectundertaken during. Tech. Final Year. We owe special debt of gratitude to Project Incharge Mr. Satish Jaiswal, Department of Electronics & InstrumentationEngineering, IEC College of engineering & technology, Greater Noida for hisconstant support and guidance throughout the course of our work. His sincerity,thoroughness and perseverance have been a constant source of inspiration for us. It isonly his cognizant efforts that our endeavours have seen light of the day.We also take the opportunity to acknowledge the contribution of Professor R.P.Singh Head, Department of Electronics & Instrumentation Engineering, IEC Collegeof Engineering, Greater Noida for his full support and assistance during thedevelopment of the project.We also do not like to miss the opportunity to acknowledge the contribution of allfaculty members of the department for their kind assistance and cooperation duringthe development of our project. Last but not the least, we acknowledge our friends fortheir contribution in the completion of the project.4 5. TABLE OF CONTENTSTITLE PAGE NO.5ABSTRACTACKNOWLEDGEMENTTABLE OF CONTENTLIST OF TABLELIST OF FIGURECHAPTER ONE1.1INTRODUCTION TO LINE FOLLOWING ROBOT1.2 TYPES OF ROBOT1.3 AIM1.4 OBJECTIVE1.5 SCOPE1.6 INTRODUCTION TO EMBEDDED SYSTEMCHAPTER TWO2.1 AT89C51 MICROCONTRILLE2.2 HARDWARE COMPONENT EXPLANATION2.3 BLOCK DIAGRAMCHAPTER THREE3.1WORKING PROCEDURECHAPTER FOUR4.1SOFTWARE TOOLSCONCLUSION AND FUTURE SCOPEREFE 6. LIST OF TABLETABLE 2.1 PORT 3 ALTERNATE FUCTIONTABLE 2.2 H BRIDGE SWITCH OPERATIONS6 7. LIST OF FIGUREFIG 1.1 INDUSTRIAL ROBOTFIG1.2 AGRICULTURE ROBOT7FIG1.3 TELE ROBOTFIG1.4 HUMAN ROBOTFIG1.5 BLOCK DIAGRAM OF EMBEDED SYSTEMFIG2.1 PIN DIAGRAM OF AT89C51FIG2.2 AT89C51 ICFIG2.3 TYPICAL CRSTAL OSCILLATORFIG2.4 PULLUP RESISTERFIG2.5 ELECTROLYTIC CAPACITORFIG2.6 BASE IC OF 8PIN AND 40 PINFIG2.7 RESISTERFIG2.8 VOLTAGE REGULATORFIG2.9 IR SENSORFIG2.10 IR SENSOR CIRCUITFIG2.11 PIN CONFIGURATION OF LM324 TOP VIEWFIG2.12 PIN DIAGRAM OF L293DFIG2.13 CIRCUIT DIAGRAM OF H BRIDGEFIG 2.14 BLOCKS DIAGRAM OF L293DFIG 2.15 DC MOTORFIG2.16 GRIPPERFIG2.17 LIFTER ASSEMBLY 8. FIG2.18 WORM DRIVE ARRANGEMENTFIG2.19 SPUR GEAR,WORM GEAR8FIG2.20 TRACK WHEELFIG2.21 METTALIC CHASISFIG2.22 BATTERYFIG2.23 CONNCTION DIAGRAM OF CIRCUITFIG4.1 CIRCUIT DIAGRAM 9. CHAPTER -11.1 INTRODUCTION TO LINE FOLLING ROBOTA line follower robot is basically a robot designed to follow a line or path alreadypredetermined by the user. This line or path may be as simple as a physical white lineon the floor or as complex path marking schemes e.g. embedded lines, magneticmarkers and laser guide markers. In order to detect these specific markers or lines,various sensing schemes can be employed. These schemes may vary from simple lowcost line sensing circuit to expansive vision systems. The choice of these schemeswould be dependent upon the sensing accuracy and flexibility required. From theindustrial point of view, line following robot has been implemented in semi to fullyautonomous plants. In this environment, these robots functions as materials carrier todeliver products from one manufacturing point to another where rail, conveyor andgantry solutions are not possible. Apart from line following capabilities, these robotsshould also have the capability to navigate junctions and decide on which junction toturn and which junction ignore. This would require the robot to have 90 degree turnand also junction counting capabilities. To add on to the complexity of the problem,sensor positioning also plays a role in optimizing the robots performance for the tasksmentioned earlier.Line-following robots with pick- and- placement capabilities are commonly used inmanufacturing plants. These move on a specified path to pick the components fromspecified locations and place them on desired locations. Basically, a line-followingrobot is a self-operating robot that detects and follows a line drawn on the floor. Thepath to be taken is indicated by a white line on a black surface. The control systemused must sense the line and man oeuvre the robot to stay on course while constantlycorrecting the wrong moves using feedback mechanism, thus forming a simple yeteffective closed- loop system.Industrial robots are found in a variety of locations including the automobile andmanufacturing industries. Robots cut and shape fabricated parts, assemble machinery9 10. and inspect manufactured parts. Some types of jobs robots do: load bricks, die cast,drill, fasten, forge, make glass, grind, heat treat, load/unload machines, machine parts,handle parts, measure, monitor radiation, run nuts, sort parts, clean parts, profileobjects, perform quality control, rivet, sand blast, change tools and weld.Outside the manufacturing world robots perform other important jobs. They can befound in hazardous duty service, CAD/CAM design and prototyping, maintenancejobs, fighting fires, medical applications, military warfare and on the farm.1.2 TYPES OF ROBOTS AS PER APPLICATIONSNowadays, robots do a lot of different tasks in many fields.And this number of jobs entrusted to robots is growing steadily.That's why one of the best ways how to divide robots into types isa division by their application.1.2.1 INDUSTRIAL ROBOTS: Robots today are being utilizedin a wide variety of industrial applications. Any job that involvesrepetitiveness, accuracy, endurance, speed, and reliability can bedone much better by robots, which is why many industrial jobsthat used to be done by humans are increasingly being done byrobots.1.2.2 MOBILE ROBOTS: Also known as Automated GuidedVehicles, or AGVs, these are used for transporting material overlarge sized places like hospitals, container ports, and warehouses,using wires or markers placed in the floor, or lasers, or vision, tosense the environment they operate in. An advanced form of theAGV is the SGV, or the Self Guided Vehicle, like PatrolBotGofer, Tug, and Specie-Minder, which can be taught toautonomously navigate within a space.1.2.3 AGRICULTURE ROBOTS: Although the idea of robotsplanting seeds, ploughing fields, and gathering the harvest may10FIG 1.1 INDUSTRIALROBOTFIG 1.2 AGRICULTURALROBOTFIG 1.3 TELE ROBOT 11. seem straight out of a futuristic science fiction book, nevertheless there are severalrobots in the experimental stages of being used for agricultural purposes, such asrobots that can pick apples.1.2.4 TELEROBOTS: These robots are used in places that are hazardous to humans,or are inaccessible or far away. A human operator located at a distance from a Telerobot controls its action, which was accomplished with the arm of the space shuttle.Telerobots are also useful in nuclear power plants where they, instead of humans, canhandle hazardous material or undertake operations potentially harmful for humans.1.2.5 SERVICE ROBOTS: The Japanese are in the forefront in these types of robots.Essentially, this category comprises of any robot that is used outside an industrialfacility, although they can be sub-divided into two main types of robots: one, robotsused for professional jobs, and the second, robots used for personal use. Amongst theformer type are the above mentioned robots used for military use, and then there arerobots that are used for underwater jobs, or robots used for cleaning hazardous waste,like.HUMANOID ROBOT : A humanoid robot is a robot with its body shape built toresemble that of the human body. A humanoid design might be for resemble humansfunctional purposes, such as interacting with human tools and environments, forexperimental purposes, such as the study of bipedal locomotion, or for other purposes.In general, humanoid robots have a torso, a head, two arms, and two legs, thoughsome forms of humanoid robots may model only part of the body, for example, fromthe waist up. Some humanoid robots may also have heads designed to replicate humanfacial features such as eyes and mouths. Androids are humanoid robots built toaesthetically.11 12. Figure 1A humanoid robot12 13. 1.3 PROJECT AIM AND OBJECTIVE:The aim of this project is design an autonomous robot with complete system allowthe robot wander about its environment and to interact with certain object that itsencounter. In order to achieve the aim of this project, several objectives are needed tobe complete.131.4 IMPORTANCE OF WORK:In this scenario, the industry having a problem by human life in some hazardous dutyservice. Robot can work in environments so hazardous that an unprotected humanwould quickly die1.5 SCOPE OF PROJECT:Industrial automation, equipment and goods carrier, tour guide in museum, deliver themail in office building, delivers medication in the hospital, can be used in place ofcrane in various lifting and carriage application. 14. 1.6 INTRODUCTION TO EMBEDDED SYSTEMSAn embedded system is a system which is going to do a predefined specified task isthe embedded system and is even defined as combination of both software andhardware. A general-purpose definition of embedded systems is that they are devicesused to control, monitor or assist the operation of equipment, machinery or plant."Embedded" reflects the fact that they are an integral part of the system. At the otherextreme a general-purpose computer may be used to control the operation of a largecomplex processing plant, and its presence will be obvious.All embedded systems are including computers or microprocessors. Some of thesecomputers are however very simple systems as compared with a personal computer.The simplest devices consist of a single microprocessor (often called a "chip), whichmay itself be packaged with other chips in a hybrid system or Application SpecificIntegrated Circuit (ASIC). Its input comes from a detector or sensor and its outputgoes to a switch or activator which (for example) may start or stop the operation of amachine.Figure: 1.4 Block diagram of Embedded System14EmbeddedSystemSoftware Hardwareo ALPo Co VBEtc.,o Processoro Peripheralso memory 15. Embedded consist of both software and hardware:Memory: It is used to store data or address.Peripherals: These are the external devices connectedProcessor: It is an IC which is used to perform some task15Applications of embedded systemsManufacturing and process controlConstruction industryTransportBuildings and premisesDomestic serviceCommunicationsOffice systems and mobile equipmentBanking, finance and commercialMedical diagnostics, monitoring and life supportTesting, monitoring and diagnostic systems 16. CHAPTER 2HARDWARE DISCRIPTION2.1 AT89S52 MICROCONTROLLERS:The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with4K bytes of programmable Flash memory and erasable read only memory (PEROM).The device is manufactured using Atmels high-density nonvolatile memorytechnology and is compatible with the industry- standard MCS-51 instruction set andpin out. The on-chip Flash allows the program memory to be reprogrammed in-systemor by a conventional nonvolatile memory programmer. By combining aversatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89S52 is apowerful microcontroller which provides a highly-flexible and cost-effective solutionto many embedded control applications.162.2 PIN CONFIGURATIONS:FIGURE 2.1 PIN DIAGRAM AT89S52 17. FIGURE2.2AT89S52 IC172.2.1 Standard Features: 4K bytes of Flash, 128* 8 bits of internal RAM, 32 programmable I/O lines, Full static operation: 0Hz to 24 MHz Three level program memory Lock two 16-bit timer/counters, a six-vector two-level interrupt architecture,2.2.2 PIN DESCRIPTIONVCCSupply voltage.Port 0Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin cansink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as 18. high impedance inputs. Port 0 can also be configured to be the multiplexed low orderaddress/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 Flashprogramming and outputs the code bytes during program verification. External pullups are required during program verification.18Port 1Port 1 is an 8-bit bidirectional I/O port with internal pull ups. The Port 1 outputbuffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they arepulled high by the internal pull ups and can be used as inputs. As inputs, Port 1 pinsthat are externally being pulled low will source current (IIL) because of the internalpull ups. Port 1 also receives the low-order address bytes during Flash programming.Port 2Port 2 is an 8-bit bidirectional I/O port with internal pull ups. The Port 2 outputbuffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they arepulled high by the internal pull ups and can be used as inputs. As inputs, Port 2 pinsthat are externally being pulled low will source current (IIL) because of the internalpull ups. Port 2 emits the high-order address byte during fetches from externalprogram memory and during accesses to external data memory that use 16-bitaddresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-upswhen emitting 1s. During accesses to external data memory that use 8-bit addresses(MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2also receives the high-order address bits and some control signals during Flashprogramming and verification.Port 3Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 outputbuffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they arepulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pinsthat are externally being pulled low will source current (IIL) because of the pull-ups. 19. Port 3 also serves the functions of various special features of the AT89S52, as shownin the following table. Port 3 receives some control signals for Flash Programming.Table: 2.1 port 3 alternate functions19RSTReset input. A high on this pin for two machine cycles while the oscillator is runningresets the device.ALE/PROGAddress Latch Enable (ALE) is an output pulse for latching the low byte of theaddress during accesses to external memory. In normal operation, ALE is emitted at aconstant rate of 1/6 the oscillator frequency and may be used for external timing orclocking purposes. Note, however, that one ALE pulse is skipped during each accessto external data memory. If desired, ALE operation can be disabled by setting bit 0 ofSFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVCinstruction. Otherwise, the pin is weakly pulled high.PSENProgram Store Enable (PSEN) is the read strobe to external program memory. Whenthe AT89S52 is executing code from external program memory, PSEN is activated 20. twice each machine cycle, except that two PSEN activations are skipped during eachaccess to external data memory.20EA/VPPExternal Access Enable. EA must be strapped to GND in order to enable the device tofetch 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 onreset. EA should be strapped to VCC for internal program executions.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operatingcircuit.XTAL2Output from the inverting oscillator amplifier.2.2.3 CRYSTAL OSILLATORA crystal oscillator is an electronic oscillator circuit that uses themechanical resonance of a vibrating crystal of piezoelectric material to create anelectrical signal with a very precise frequency. This frequency is commonly used tokeep track of time (as in quartz wristwatches), to provide a stable clocksignal for digital integrated circuits, and to stabilize frequencies for radiotransmitters and receivers. The most common type of piezoelectric resonator used isthe quartz crystal, so oscillator circuits incorporating them became known as crystaloscillators, but other piezoelectric materials including polycrystalline ceramics areused in similar circuits.Quartz crystals are manufactured for frequencies from a few tens of kilohertz tohundreds of megahertz. More than two billion 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 measurementequipment, such as counters, signal generators, and oscilloscopes. 21. A crystal is a solid in which the constituent atoms, molecules, or ions are packed in aregularly ordered, repeating pattern extending in all three spatial dimensions.Almost any object made of an elastic material could be used like a crystal, withappropriate transducers, since all objects have natural resonant frequenciesof vibration. For example, steel is very elastic and has a high speed of sound. It wasoften used in mechanical filters before quartz. The resonant frequency depends onsize, shape, elasticity, and the speed of sound in the material. High-frequency crystalsare 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 oftenused in place of a quartz crystal.When a crystal of quartz is properly cut and mounted, it can be made to distort inan electric field by applying a voltage to an electrode near or on the crystal. Thisproperty is known as electrostriction or inverse piezoelectricity. When the field isremoved, 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 circuitcomposed 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 away that the frequency dependence on temperature can be very low. The specificcharacteristics will depend on the mode of vibration and the angle at which the quartzis cut (relative to its crystallographic axes). Therefore, the resonant frequency of theplate, which depends on its size, will not change much, either. This means that aquartz clock, filter or oscillator will remain accurate. For critical applications thequartz oscillator is mounted in a temperature-controlled container, called a crystaloven, and can also be mounted on shock absorbers to prevent perturbation by externalmechanical vibrations.21 22. Figure 2.3diagram of typical crystal oscillator generating a frequency of 11.059222MHz2.2.4 CERAMIC CAPACITOR:A ceramic capacitor is a fixed value capacitor in which ceramic material acts as thedielectric. It is constructed of two or more alternating layers of ceramic and ametal layer acting as the electrode The composition of the ceramic material definesthe electrical behavior and therefore applications. Ceramic capacitors are divided intotwo application classes: Class 1 ceramic capacitors offer high stability and low losses for resonantcircuit applications. Class 2 ceramic capacitors offer high volume efficiency for buffer, by-pass andcoupling applications.Ceramic capacitors, especially the multilayer style (MLCC), are the most producedand used capacitors in electronic equipment that incorporate approximately onetrillion pieces (1000 billion pieces) per year.Ceramic capacitors of special shapes and styles are used as capacitors for RFI/ MFIsuppression, as feed-through capacitors and in larger dimensions as power capacitorsfor transmitter 23. 232.2.5 Pull-up resister:Pull up resister are used in electronic logic circuits to ensure that inputs to logicsystems settle at expected logic levels if external devices are disconnected or highimpedance is introduced. They may also be used at the interface between two differenttypes of logic devices, possibly operating at different power supply voltagesWhen the switch is open the voltage of the gate input is pulled up to the level of Vin.When the switch is closed, the input voltage at the gate goes to ground.A pull-up resistor weakly "pulls" the voltage of the wire it is connected to towards itsvoltage source level when the other components on the line are inactive. When allother connections on the line are inactive, they are high-impedance and act like theyare disconnected. Since the other components act as though they are disconnected, thecircuit acts as though it is disconnected, and the pull-up resistor brings the wire up tothe high logic circuits When another component on the line goes active, it willoverride the high logic level set by the pull-up resistor. The pull-up resistor ensuresthat the wire is at a defined logic level even if no active devices are connected to it.A pull-down resistor works in the same way but is connected to ground. It holds thelogic signal near zero volts when no other active device is connected..Figure 2.4 pull up resister 24. ELECTROLYTIC CAPACITOR: electrolytic capacitor is a capacitor that usesan electrolytic (an ionic conducting liquid) as one of its plates to achieve a largercapacitance per unit volume than other types. The large capacitance of electrolyticcapacitors makes them particularly suitable for passing or bypassing low-frequencysignals and storing large amounts of energy. They are widely used in power supplyand interconnecting stages of amplifiers at audio frequencies. An electrolytic capacitorwill generally have higher leakage current than a comparable (dry) capacitor, and mayhave significant limitations in its operating temperature range, parasitic resistance andinductance, and the stability and accuracy of its capacitance value.FIGURE 2. A Electrolytic capacitor2.2.7 BASES OF IC : IC sockets are generally for preventing damage to IC's fromsoldering and while testing multiple circuits. These are made from BlackThermoplastic and tin-plated alloy contacts. One end is notched to aid inidentification. They can be mounted end to end to suit longer IC's24 25. Figure 2.5base of 8 pin2.2.8 RESISTOR: These do exactly what they say, they resist the flow of electron.These are necessary for several reasons. They control how much current goes down toeach wire. They control the power uses. They can control voltages (since current,resistance)The last point is important as it is the basis of Ohm's law, V=IR. Voltage = Current xResistance. For example, suppose you take a resistor and connect the two ends of abattery with it. You know that your battery is 9V (or whatever) and you know theresistor is 3Kohm (determined by the color stripes on the resistor), so 9V divided by3Kohm is .003amps (3 milliamps). So why is this information useful? Well now thatyou know the current, you can determine other useful things such as power. P=IV.You will notice that if you increase resistance, you decrease current. If you decreasecurrent, you decrease power use. Put a 1ohm resistor between the battery and it willget so hot it could burn because of the power use. Use a 100Kohm resistor and almostno power at all will be used.Figure 2.6 Resistor252.2.9 VOLTAGE REGULATOR 26. Figure 2.7 voltage regulator ic 7805A voltage regulator is an electrical regulator designed to automatically maintain aconstant voltage level. It may use an electromechanical mechanism, or passive oractive electronic components. Depending on the design, it may be used to regulate oneor more AC or DC voltages. There are two types of regulator are they.26 Positive Voltage Series (78xx) and Negative Voltage Series (79xx)78xx: 78 indicate the positive series and xxindicates the voltage rating. Suppose7805 produces the maximum 5V.05indicates the regulator output is 5V.79xx: 78 indicate the negative series and xxindicates the voltage rating.Suppose 7905 produces the maximum -5V.05indicates the regulator output is -5V. 27. These regulators consists the three pins there are27Pin1: It is used for input pin.Pin2: This is ground pin for regulatorPin3: It is used for output pin. Through this pin we get the output.2.2.10 IR SENSORSAn Infra-Red sensor detects Infra-Red light/white light from a particular object/lineand then converts light energy to electrical energy. An IR sensor pair consists of anemitter and a detector. The emitter is blue in color and the detector can be grey, blackor white in color.figure 2.8 IR sensor2.2.11 IR EMITTERAn infra-red emitter is a Light Emitting Diode (LED) made from Gallium Arsenide. Itdetects IR energy at a wavelength of 880nm and emits the same. The infraredphototransistor acts as a transistor with the base voltage determined by the amount oflight hitting the transistor. Hence it acts as a variable current source. Greater amountof IR light cause greater currents to flow through the collector-emitter leads.The variable current traveling through the resistor causes a voltage drop in the pull-upresistor. This voltage is measured as the output of the device.2.2.12 IR DTECTOR 28. An infra-red detector is a photo detector. It detects IR energy emitted by the emitterand converts it into electrical energy.The main principle involved in the conversion of light energy to electrical energy isPHOTOELECTRIC EFFECT.IR sensor circuit to detect a black line on white background:28Fig: 2.9. IR sensor circuitThe output is taken at negative terminal of IR detector.The output can be taken to a microcontroller either to its ADC (Analog to DigitalConverter) or LM 339 can be used as a comparator.2.2.13 LM 3242.2.13.1 FEATURES: Wide gain bandwidth : 1.3MHZ input common-mode voltage range Includes ground .large voltage gain: 100DB .very low supply current/amplify :375ma low input bias current : 20NA low input offset voltage : 5mv max. Low input offset current : 2NA wide power supply range : Single supply : +3v to +30v Dual supplies : 1.5v to 15v It is a comparator ic2.2.13.2 DESCRIPTIONThese circuits consist of four independent, high gain, internally frequencycompensated operational amplifiers .They operate from a single power supply over awide range of voltages. Operation from split power supplies is also possible and the 29. low power supply current drain is independent of the magnitude of the power supplyvoltage.Fig:2.10. pin configuration top view16 81215L_IN2R_IN1LM-RM+L2 9 3D INPUTLINES79103146114 5 12 13GND292.2.14 L293D( H-BRIDGE):LM+ OUTPUT FORMOTOR1OUTPUT FORMOTOR2RM-Figure 2.11 PIN DIAGRAM OF L293D ICVCC1 - LOGICSUPPLY= 5VL_IN1L_ENR_IN2R_ENMotor are arrange in a fashion called H bridge. H bridge is an electronics circuitswhich enables a voltage to be applied across the load in either direction. It allow a 30. circuit full control, that is an H bridge, a microcontroller logic chip, or remote controlcan electronically command the motor to go forward ,reverse and brakeAn H-bridge is an electronic circuit which enables DC electric motors to be runforwards or backwards. These circuits are often used in robotics. H-bridges areavailable as integrated circuits, or can be built from discrete components.30Figure 2.12 circuit diagram of H bridgeThe two basic states of a H-bridge. The term "H-bridge" is derived from the typicalgraphical representation of such a circuit. An H-bridge is built with four switches(solid-state or mechanical). When the switches S1 and S4 (according to the firstfigure) are closed (and S2 and S3 are open) a positive voltage will be applied acrossthe motor. By opening S1 and S4 switches and closing S2 and S3 switches, thisvoltage is reversed, allowing reverse operation of the motor.Using the nomenclature above, the switches S1 and S2 should never be closed at thesame time, as this would cause a short circuit on the input voltage source. The sameapplies to the switches S3 and S4. This condition is known as shoot-through.2.2. 13.1 OPERATIONThe H-Bridge arrangement is generally used to reverse the polarity of the motor, butcan also be used to 'brake' the motor, where the motor comes to a sudden stop, as themotors terminals are shorted, or to let the motor 'free run' to a stop, as the motor iseffectively disconnected from the circuit. The following table summarizes operation. 31. 31S1 S2 S3 S4 Result1 0 0 1 Motor moves right0 1 1 0 Motor moves left0 0 0 0 Motor free runs0 1 0 1 Motor brakesTable: 2.2 H-bridge switch operation2. 2.13.2 H-BRIDGE DRIVERThe switching property of this H-Bridge can be replaced by a Transistor or a Relay orA Mosfet or even by an IC. Here we are replacing this with an IC named L293D asthe driver whose description is as given below. The Device is a monolithic integratedhigh voltage, high current four channel driver designed to accept standard DTL orTTL logic levels and drive inductive loads as and switching power transistors. Tosimplify use as two bridges each pair of channels is equipped with an enable input. Aseparate supply input is provided for the logic, allowing operation at a lower voltageand internal clamp diodes are included. This device is suitable for use in switchingapplications at frequencies up to 5 kHz. The L293D is assembled in a 16 lead plasticpackage which has 4 center pins connected together and used for heat sinking TheL293D is assembled in a 20 lead surface mount which has 8 center pins connectedtogether and used for heat sinking.2. 13.3 FEATURES 600mA OUTPUT CURRENT CAPABILITY 32. PER CHANNEL 1.2A PEAK OUTPUT CURRENT (non repetitive) ENABLE FACILITY OVERTEMPERATURE PROTECTION LOGICAL "0" INPUT VOLTAGE UP TO 1.5 V (HIGH NOISE IMMUNITY) INTERNAL CLAMP DIODES322.2.13.4 BLOCK DIAGRAM:Figure 2.13block diagram of LM293D2.2. 14 DC MOTORS:These are very commonly used in robotics. DC motors can rotate in both directionsdepending upon the polarity of current through the motor. These motors have freerunning torque and current ideally zero. These motors have high speed which can bereduced with the help of gears and traded off for torque. Speed Control of DC motorsis done through Pulse Width Modulation techniques, i.e. sending the current inintermittent bursts. PWM can be generated by 555 timer IC with adjusted duty cycle.Varying current through the motor varies the torque. 33. FIGURE 2.14(DC MOTOR GRIPPER ARM: The gripper module is state of the art robotic arm which can beused in various 'pick and place' kind of robots. It works on DC Motor (9 to 12VDC). Change in rotation direction of the DC Motor, generates Jaw Open & Close33Action. The DC motor can be easily be controlled with the help of DPDT Switch (manualmode) or with the help of any micro controller along with L293D Motor Drivermodule.FIGURE3Gripper orthogonal view, main view 34. LIFTER ASSEMBLY: It is made from laser cut Metal and acrylic. There isa worm gear and spur gear assembly which is attached with a DC motor (9 to10 volt) to provide torque so that gripper can pick and lift the load.34Figure 3..Lifter assemblyLIFTER PARTS: Gripper assembly Plates. Fiber Grippers-2nos. 45 RPM Motor-1nos. Worm Gear-1nos. Spur Gear-2nos. Different Screws and nuts. 35. Worm drive: Worm drive is a gear arrangement in which a worm (which is a gear inthe form of a screw) meshes with a worm gear (which is similar in appearance toa spur gear, and is also called a worm wheel). The terminology is often confused byimprecise use of the term worm gear to refer to the worm, the as a worm gear, or theworm drive unit.Like other gear arrangements, a worm drive can reduce rotational speed or allowhigher torque to be transmitted. The image shows a section of a gear box with a wormgear being driven by a worm. A worm is an example of a screw, one of the six simplemachines.Figure: 3.12 worm drive arrangement35 36. (a) (b)Figure 3.125 (a) Spur gear (b) Worm gear, (Made by acrylic fiber)TRACK WHEEL: Track wheel is a circular wheel with rubber grip fastened on DCmotor shaft by screw. Track wheel provide help in movement of robot in anydirection.Figure 3.125 Track wheel36 37. CHASSIS: A chassis consists of an internal framework that supports a man-madeobject in its construction and use. It is analogous to an animal's skeleton. An exampleof a chassis is the under part of a motor vehicle, consisting of the frame (on which thebody is mounted). Here metallic chassis is used.FIGURE 3.212 A metallic chassisPOWER SUPPLY: To provide energy to DC motors for movement of robot ABattery of DC (6 volt to 12 V, 4.5A) is being used.Figure 3.225 Battery37 38. 382.3 CIRCUIT DIAGRAM:FIGURE 2.15 CONNECTION DIAGRAM OF CIRCUIT) 39. 393. WORKING PROCEDURE3.1 WORKINGRobotics is an interesting subject to discuss about and in this advanced world Robotsare becoming a part of our life. In this project we are going to discuss about a robotwhich is capable of following a line without the help of any external source.The Embedded Line following robot uses four motors to control rear wheels and thesingle front wheel is free. It has 2-infrared sensors on the bottom for detection ofwhite tracking tape. When the middle sensor detects the black color, this sensor outputis given to the comparator LM324. The output of comparator compares this sensoroutput with a reference voltage and gives an output. The output of comparator will below when it receives an input from the sensor When a sensor is on the black line it reads 0 and when it is on the brightsurface read 1. and sensor module gives the value to controller to generatecontrol signal according to programmer When both right and left sensors are on bright surface (read 1) then bothcouple of motor move. When left sensor comes in black (for white line tracer) region then left motorstops while right motor continue to move so that left turn takes place and robotreturns on black line. When right sensor comes in black region then right motor stops while leftmotor continue to move so that right turn takes place and robot returns onblack line. By correcting the path robot move to destination. When both sensors comes on black surface simultaneously (read 0) than bothmotor stop. 40. When both sensor read 0 simultaneously and both wheel motor stops thanimmediately motor for right and left movement of lifter arm start moving forsome definite time duration using Timer of controller. After movement of left- right motor of lifter the motor for lifting and gripping moveone by one for some definite time duration defined in program using timer ofcontroller. The lifter and gripper arm have various gear arrangement, so that aftermovement of each motor of arm one by one the arm pick an object or workpiece softly. After movement of gripper motor, all the motor of arm starts moving inreverse direction of previous movement, one by one. After picking an object by gripper and lifter arm, either left or right wheelmotor starts moving until the robot reverts his path and both sensor comes onbright surface after crossing a black surface between. After reversing the path robot move by correcting path and reach to destination At destination both sensors read 0 simultaneously, so that previous process isrepeated and the object is now placed by same movement of motor. The robot revert its path and repeats the pick and place process again and again40continuously.3.2 ADVANTAGES Robot movement is automatic. Fit and Forget system. Used for long distance applications. Defense applications. Used in home, industrial automation. Cost effective. 41. 41 Simplicity of building3.3 DISADVANTAGES LFR follows a black line about 1 or 2 inches in width on a white surface. LFR are simple robots with an additional sensors placed on them. Needs a path to run either white or black since the IR rays should reflectfromthe particular path. Slow speed and instability on different line thickness or hard angles.3.4 APPLICATIONS: Guidance system for industrial robots moving on shop floor etc. Industrial applications. Home applications. 42. CHAPTER 4424. SOFTWARE TOOLS4.1 KEIL SOFTWARE:Keil compiler is software used where the machine language code is written andcompiled. After compilation, the machine source code is converted into hex codewhich is to be dumped into the microcontroller for further processing. Keil compileralso supports C language code.#includesbit m1=P0^0;sbit m2=P0^1;sbit m3=P0^2;sbit m4=P0^3;sbit m5=P0^4;sbit m6=P0^5;sbit m7=P0^6;sbit m8=P0^7;sbit ma=P3^6;sbit mb=P3^7;sbit sens1=P1^0;sbit sens2=P1^1;void delay(int);void main(){m1=0; 43. 43m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=0;ma=0;mb=0;sens1=1;sens2=1;while(1){while((sens1==1)&&(sens2==0)){m1=1;m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=0;ma=0; 44. 44mb=0;}while((sens1==0)&&(sens2==1)){m1=0;m2=0;m3=1;m4=0;m5=0;m6=0;m7=0;m8=0;ma=0;mb=0;}while((sens1==1)&&(sens2==1)){m1=1;m2=0;m3=1;m4=0;m5=0;m6=0;m7=0; 45. 45m8=0;ma=0;mb=0;}while((sens1==0)&&(sens2==0)){m1=0;m2=0;m3=0;m4=0;m5=1;m6=0;m7=0;m8=0;ma=0;mb=0;delay(500);m1=0;m2=0;m3=0;m4=0;m5=0;m6=0;m7=1; 46. 46m8=0;ma=0;mb=0;delay(500);m1=0;m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=0;ma=1;mb=0;delay(500);m1=0;m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=0;ma=0; 47. 47mb=0;m1=0;m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=0;ma=0;mb=1;delay(500);m1=0;m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=0;ma=0;mb=0; 48. 48m1=0;m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=1;delay(500);m1=0;m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=0;m1=0;m2=0;m3=0;m4=0;m7=0;m8=0; 49. 49m5=0;m6=1;delay(500);m1=0;m2=0;m3=0;m4=0;m7=0;m8=0;m5=0;m6=0;m1=1;m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=0;while(sens1==0);while(sens1==1);while(sens1==0); 50. 50delay(20);m1=0;m2=0;m3=0;m4=0;m5=0;m6=0;m7=0;m8=0;}}}void delay(int x){int y,z;for(y=0;y