Sunteți pe pagina 1din 201

Design & Implementation of An Autonomous Forklift

BY

ARJOO SHANEESH
Submitted as part fulfillment for the degree of

BEng (Hons) Mechatronics

University of Mauritius Faculty of Engineering


March 2012

Autonomous Forklift

TABLE OF CONTENTS
Table of Contents CHAPTER 1 : INTRODUCTION ............................................................................. 1 1.1 Advantages of AGVs........................................................................................ 2 1.2 Problem Definition & Aims.............................................................................. 2 1.3 System Description .......................................................................................... 3 1.4 Thesis Structure................................................................................................ 4 CHAPTER 2 : LITTERATURE OVERVIEW ........................................................... 5 2.1 2.2 2.3 2.4 2.5 2.6 Introduction ................................................................................................. 5 Industrial Forklifts ....................................................................................... 5 Autonomous Navigation .............................................................................. 5 Sorting......................................................................................................... 7 Guide Tape AGV......................................................................................... 7 Trailer Loading AGV .................................................................................. 8

CHAPTER 3 : CONCEPTUAL DESIGN ................................................................ 10


3.1 Introduction.................................................................................................... 10 3.2 System Block Diagram ................................................................................... 10
3.2.1 Central PC........................................................................................................... 10 3.2.2 Autonomous Forklift ........................................................................................... 11

3.3 System Flow Chart ......................................................................................... 13 3.4 Conceptual Design ......................................................................................... 15 3.5 Central PC Design .......................................................................................... 16
3.5.1 Sorting ................................................................................................................ 16 3.5.2 Barcode Reader .................................................................................................. 19 3.5.3 Wireless Communicator...................................................................................... 20

3.6 Autonomous Forklift Design .......................................................................... 24


3.6.1 Obstacle Detection ............................................................................................. 24 3.6.2 Navigation System .............................................................................................. 27 3.6.3 Steering System .................................................................................................. 29 3.6.4 Motor Selection .................................................................................................. 34 3.6.5 Microcontroller Selection ................................................................................... 36 3.6.6 Material Selection............................................................................................... 40

Page | i

Autonomous Forklift
CHAPTER 4 : MECHANICAL DESIGN ................................................................ 42 4.1 Introduction.................................................................................................... 42

4.2 Mechanical Structure...................................................................................... 42


4.3 3D Design ...................................................................................................... 42 4.4 Structural Construction ................................................................................... 44
4.4.1 Design of Parts.................................................................................................... 44

4.5 Construction of Base ...................................................................................... 46 4.6 Assembly of Gearbox ..................................................................................... 48 4.7 Construction of Top Part ................................................................................ 49 4.8 Assembly of Tracks and Wheels ..................................................................... 50 4.9 Assembly of Forks ......................................................................................... 50 CHAPTER 5 : ELECTRONIC DESIGN.................................................................. 52 5.1 Introduction.................................................................................................... 52 5.2 Forklift Electronic Design .............................................................................. 52
5.2.1 Ultrasound Sensor .............................................................................................. 52 5.2.2 Battery ............................................................................................................... 53 5.2.3 Line Following Sensor ......................................................................................... 56 5.2.4 Voltage Regulators ............................................................................................. 59 5.2.5 L293D Dual H-Bridge........................................................................................... 63 5.2.6 Shift Register ...................................................................................................... 65 5.2.7 Transceiver ......................................................................................................... 71 5.2.8 Limit Switch ........................................................................................................ 73 5.2.9 Microcontroller .................................................................................................. 73

5.3 Central PC Electronic Design ......................................................................... 75


5.3.1 LCD ..................................................................................................................... 75 5.3.2 Nordic Transceiver .............................................................................................. 77 5.3.3 Push Buttons Switches ........................................................................................ 77 5.3.4 Microcontroller .................................................................................................. 78

CHAPTER 6 : SOFTWARE DESIGN ..................................................................... 81


6.1 Introduction.................................................................................................... 81 6.2 Central PC Software Design ........................................................................... 81
6.2.1 Machine Vision ................................................................................................... 81 6.2.2 Arduino Nano ..................................................................................................... 82

6.3 Forklift Software Design ................................................................................ 84

Page | ii

Autonomous Forklift
6.3.1 Setup Program .................................................................................................... 84 6.3.2 Main Loop Program ............................................................................................ 86

CHAPTER 7 : IMPLEMENTATION AND TESTING .......................................... 105


7.1 Introduction.................................................................................................. 105 7.2 Problems and Solutions ................................................................................ 105 7.3 Central PC .................................................................................................... 106
7.3.1 Machine Vision ................................................................................................. 106 7.3.2 Arduino Nano ................................................................................................... 107

7.4 Forklift ......................................................................................................... 108 CHAPTER 8 : CONCLUSION AND FUTHER WORKS ...................................... 109 8.1 Conclusion ................................................................................................... 109 8.2 Further Works .............................................................................................. 110 REFERENCES ...................................................................................................... 111 APPENDIX A ....................................................................................................... 114 APPENDIX B ....................................................................................................... 116 APPENDIX C ....................................................................................................... 118 APPENDIX D ....................................................................................................... 119 APPENDIX E........................................................................................................ 124 APPENDIX F ........................................................................................................ 129 APPENDIX G ....................................................................................................... 130 APPENDIX H ....................................................................................................... 168 APPENDIX I ......................................................................................................... 169

Page | iii

Autonomous Forklift

LIST OF TABLES
Table 3.1: Decision matrix for Sorting. .................................................................... 18 Table 3.2: Decision matrix for Wireless Communicator. .......................................... 23 Table 3.3: Decision matrix for Steering System ....................................................... 33 Table 3.4: Motor Torque Calculation ....................................................................... 34 Table 3.5: Components of Central PC ...................................................................... 36 Table 3.6: Components of AGV .............................................................................. 37 Table 3.7: Decision matrix for Microcontroller Selection ......................................... 40 Table 3.8: Decision matrix for Material Selection .................................................... 41 Table 4.1: Dimension of Parts.................................................................................. 45 Table 5.1: HC-SR04 Port Allocation ........................................................................ 52 Table 5.2: Voltage Regulators.................................................................................. 59 Table 5.3: L293D Features ...................................................................................... 64 Table 5.4: L293D Logic........................................................................................... 65 Table 5.5: Motor Driver IC Features ........................................................................ 66 Table 5.6: ShiftOut Numbers ................................................................................... 66 Table 5.7: Motor Driver IC Features ........................................................................ 67 Table 5.8: Motor Direction Relative to ShiftOut ...................................................... 70 Table 5.9: Nordic Transceiver Connections. ............................................................ 72 Table 5.10: Different Connections of Arduino ......................................................... 74 Table 5.11: Different Connections of Arduino Nano ................................................ 79 Table 6.1: Typical LDR Values ............................................................................... 86 Table 7.1: Problems and Solutions ......................................................................... 105

LIST OF FIGURES
Figure 2.1: Forklift Overview .................................................................................... 6 Figure 2.2: Barcode Sorting ....................................................................................... 7 Figure 2.3: Line Following AGV ............................................................................... 8 Figure 2.4: AGV Loading Trailer............................................................................... 9 Figure 2.5: Loading Pattern ....................................................................................... 9 Figure 3.1: Central PC Block Diagram..................................................................... 11 Figure 3.2: AGV Block Diagram ............................................................................. 12 Figure 3.3: PC Flowchart ......................................................................................... 13 Figure 3.4: AGV Flowchart ..................................................................................... 15 Figure 3.5: Typical Barcode..................................................................................... 17 Figure 3.6: Typical RFID Tag .................................................................................. 18 Figure 3.7: Handheld Barcode Scanner .................................................................... 19

Page | iv

Autonomous Forklift
Figure 3.8: Wi-Fi Module ........................................................................................ 21 Figure 3.9: XBee Module ........................................................................................ 22 Figure 3.10: nRF24L01+ Wireless Module .............................................................. 23 Figure 3.11: AGV Measuring Distance .................................................................... 24 Figure 3.12: Infrared Proximity Sensor .................................................................... 25 Figure 3.13: Graph of Analog Voltage against Distance ........................................... 26 Figure 3.14: HC-SR04 Module ................................................................................ 26 Figure 3.15: Direction of Motion Relative Wheels ................................................... 30 Figure 3.16: Ackerman Steering .............................................................................. 31 Figure 3.17: Forklift with Mecanum Wheels ............................................................ 32 Figure 3.18: Direction of Motion Relative to Wheels ............................................... 32 Figure 3.19: Tamiya Tracks and Wheels .................................................................. 33 Figure 3.20: Forces Exerted on a Wheel................................................................... 34 Figure 3.21: Tamiya Double Gearbox ...................................................................... 35 Figure 3.22: Olimex Board ...................................................................................... 37 Figure 3.23: Arduino Duemilanove Board ............................................................... 39 Figure 4.1: 3D Design Side View ............................................................................ 43 Figure 4.2: 3D Design Back View ........................................................................... 43 Figure 4.3: 3D Design Front View ........................................................................... 44 Figure 4.4: HDPE Cutting Board ............................................................................. 45 Figure 4.5: Unglued Base of AGV ........................................................................... 46 Figure 4.6: Base with Hinge .................................................................................... 46 Figure 4.7: Battery and Sonar Sensor ....................................................................... 47 Figure 4.8: 3D Design Battery and Sonar Sensor ..................................................... 47 Figure 4.9: Unassembled Tamiya Double Gearbox .................................................. 48 Figure 4.10: Assembled Tamiya Gearbox ................................................................ 48 Figure 4.11: Top Side AGV ..................................................................................... 49 Figure 4.12: Top Side with Holes ............................................................................ 49 Figure 4.13: 3D Design AGV Top Side ................................................................... 50 Figure 4.14: Forks ................................................................................................... 51 Figure 5.1: HC-SR04 Module .................................................................................. 52 Figure 5.2: Schematic of HC-SR04 and Arduino ..................................................... 53 Figure 5.3: Dismantled Charging Dock .................................................................... 54 Figure 5.4: Battery Components Re-soldered ........................................................... 54 Figure 5.5: Battery with Two-way Switch................................................................ 55 Figure 5.6: Schematic of Battery Circuit .................................................................. 55 Figure 5.7: LDR and Led Pairs ................................................................................ 57 Figure 5.8: Line Sensor on AGV.............................................................................. 57 Figure 5.9: Path of Light .......................................................................................... 58 Figure 5.10: Schematic of LDRs and Leds ............................................................... 58 Figure 5.11: AGV Different Levels.......................................................................... 59 Figure 5.12: Schematic of Voltage Regulator 1 ........................................................ 60 Figure 5.13: Schematic of Voltage Regulator 2 ........................................................ 61 Figure 5.14: LM317 Voltage Regulator ................................................................... 61

Page | v

Autonomous Forklift
Figure 5.15: Schematic of LM317 ........................................................................... 62 Figure 5.16: L293D Pin Layout ............................................................................... 63 Figure 5.17: 74HC595 Pin Layout ........................................................................... 65 Figure 5.18: Schematic of 74HC595 and L293D (steering) ...................................... 68 Figure 5.19: Schematic of L293D and Steering Motors ............................................ 68 Figure 5.20: Schematic of 74HC595 and L293D (fork) ............................................ 69 Figure 5.21: Schematic of L293D and Fork Motor ................................................... 70 Figure 5.22: Schematic of Arduino and Shift Register ............................................. 71 Figure 5.23: Transceiver Module and Schematic ...................................................... 71 Figure 5.24: Schematic of Arduino and Transceiver................................................. 72 Figure 5.25: Schematic of Arduino and Limit Switches ........................................... 73 Figure 5.26: Different Connections of Arduino ........................................................ 75 Figure 5.27: LCD Module........................................................................................ 76 Figure 5.28: Schematic of Arduino and LCD ........................................................... 76 Figure 5.29: Schematic of Arduino and Transceiver................................................. 77 Figure 5.30: Schematic of Push Buttons and Arduino ............................................. 78 Figure 5.31: Different Connections of Arduino Nano ............................................... 80 Figure 6.1: Machine Vision Flowchart ..................................................................... 82 Figure 6.2: Arduino Nano Flowchart ....................................................................... 83 Figure 6.3: Setup Program Flowchart....................................................................... 85 Figure 6.4: Main Loop Flowchart ............................................................................ 88 Figure 6.5: Stop Flowchart ...................................................................................... 88 Figure 6.6: Radio Availability Flowchart ................................................................. 89 Figure 6.7: Radio Package Flowchart....................................................................... 90 Figure 6.8: Forward Flowchart................................................................................. 91 Figure 6.9: Obstacle Detection Flowchart ................................................................ 93 Figure 6.10: Forward Junction Flowchart ................................................................. 94 Figure 6.10: Lower Fork Flowchart ......................................................................... 95 Figure 6.12: Forward No Ultrasound Flowchart ....................................................... 96 Figure 6.13: Raise Fork Flowchart ........................................................................... 97 Figure 6.14: Turn Clockwise Flowchart ................................................................... 98 Figure 6.15: Target Flowchart.................................................................................. 99 Figure 6.16: Turn Anticlockwise Flowchart ........................................................... 100 Figure 6.17: Sonar Delivery Flowchart .................................................................. 101 Figure 6.18: Forward Delivery Flowchart .............................................................. 102 Figure 6.19: Reverse Flowchart ............................................................................. 103 Figure 6.20: Location Flowchart ............................................................................ 104 Figure 7.1: Trailer A Barcode ................................................................................ 106 Figure 7.2: Results of Roborealm........................................................................... 106 Figure 7.3: Nano Interfaced with LCD and Transceiver ......................................... 107 Figure 7.4: Autonomous Forklift............................................................................ 108

Page | vi

Autonomous Forklift

LIST OF ABBREVIATIONS
AGV..Autonomous Guided Vehicle GPS....Global Positioning System IC..Integrated Circuit PC..Personal Computer LCD.Liquid Crystal Display LDR....Light Dependent Resistor PWM.Pulse Width Modulation RF.Radio Frequency RFID.Radio Frequency Identifier USBUniversal Serial Bus

Page | vii

Autonomous Forklift

ACKNOWLEDGEMENTS
First and foremost, I would like to express my deepest thanks to my supervisors; Mr. V. Oree and especially Mrs. R. Ramjug-Ballgobin for her constant help, guidance and assistance throughout the year without whom, I would have been unable to successfully complete my project.

I would also like to thank Mr. Rioux, the robotics lab technician for his help and precious advice.

Lastly, I would thank my friends that have made my four years at the university very memorable and thrilling.

Im furthermore very grateful to my mother, uncle and family who have always been there for me as moral support and also lending me a helping hand when necessary.

Page | viii

Autonomous Forklift

UNIVERSITY OF MAURITIUS
Project/Dissertation Declaration Form
Name: ARJOO shaneesh Student ID: 0810877 Programme of Studies: BEng (Hons) Mechatronics Module Code/Name: MECH 4000(5) - Degree Project Title of Project/Dissertation: Design and implementation of an Autonomous Forklift Name of Supervisor(s): Mrs. R. Ramjug-Ballgobin & Mr. V. Oree
Declaration: In accordance with the appropriate regulations, I hereby submit the above dissertation for examination and I declare that: (i) I have read and understood the sections on Plagiarism and Fabrication and Falsification of Results found in the Universitys General Information to Students Handbook (20. /20.) and certify that the dissertation embodies the results of my own work. I have adhered to the Harvard system of referencing or a system acceptable as per The University of Mauritius Referencing Guide for referencing, quotations and citations in my dissertation. Each contribution to, and quotation in my dissertation from the work of other people has been attributed, and has been cited and referenced. I have not allowed and will not allow anyone to copy my work with the intention of passing it off as his or her own work. I am aware that I may have to forfeit the certificate/diploma/degree in the event that plagiarism has been detected after the award. Notwithstanding the supervision provided to me by the University of Mauritius, I warrant that any alleged act(s) of plagiarism during my stay as registered student of the University of Mauritius is entirely my own responsibility and the University of Mauritius and/or its employees shall under no circumstances whatsoever be under any liability of any kind in respect of the aforesaid act(s) of plagiarism.

(ii)

(iii)

(iv)

(v)

Signature:

Date:

Page | ix

Autonomous Forklift

ABSTRACT
Automation is the only means of effectively increasing the productivity of an industry. One of the key components of automation is autonomous guided vehicles. During the past ten years there have been major developments in this field but unfortunately the AGVs developed are only capable of specific tasks and work in restricted zones. The aim of the project was to devise a system capable of performing multi-tasks, that is; sorting of loads and loading of trailers in an environment shared with workers. The project dealt with the design and implementation of a whole system comprising of a central PC and an autonomous forklift in response to the above problem. The central PC sorts out loads and transmits the corresponding wireless data to the forklift. The latter follows a predefined path and loads the appropriate trailer whilst not affecting the safety of workers. The central PC makes use of Roborealm, the machine vision software to differentiate the trailers into which loading has to be done based on barcodes. The information obtained is then transferred to a microcontroller connected to the PC via USB. The latter communicates the data to the forklift via wireless communication for it to act accordingly. The electronic and mechanical parts of both the sub-systems were implemented. A great deal of work was involved in the conceptual and software design so that the system could perform effectively. Tests were carried out to show that the whole system operated exactly as desired.

Page | x

Autonomous Forklift
CHAPTER 1 : INTRODUCTION

Autonomous Guided Vehicles most commonly known as AGVs are increasingly popular in industrial environments. Since the creation of the first AGV in 1953 by the Berrett Electronics Company [1], AGVs have highly evolved, from simple line following to hundreds of AGVs working in cooperation for the automation of whole industrial processes. The first AGV was a simple tow truck that followed a wire track that was embedded in the factory floor. Sensors under the truck detected the magnetic field, produced by current passing through the wire and the former guided the tow truck around the factory. With the development of Integrated Circuits (ICs) in the mid 1970s the popularity of AGV was greatly increased due to the fact that ICs have better capabilities and flexibilities. A good example of the success of AGVs in 1973 is the Volvo car manufacturer in Sweden that replaced its typical conveyor assembly line with no less that 280 AGVs controlled by a computer. The definition of modern AGVs according to Mikell P. Groover is a follows: Automated guided vehicles (AGVs). AGVs are battery-powered, automatically steered vehicles that follow defined pathways in the floor. The pathways are unobtrusive. AGVs are used to move unit loads between load and unload station in facility. Routing variations are possible, meaning that different loads move between different stations. They are usually interfaced with other systems to achieve the full benefits of integrated automation. (Groover, 2001)[2] . Today modern AGVs are more sophisticated and present in practically every industry and warehouse. They have become a key component in flexible manufacturing systems, where they are typically used for the interconnection of work cells. AGVs nowadays are not only controlled by a central system but they are able to communicate between themselves for smoother operations. Twenty four hours non-stop operations has also been made possible with new battery charging solutions, where the battery is either swapped with a charged one or simply charged when the AGV is idle. The latter are not anymore confined to cells or human free zones, with advancement in safety features such as electronics laser bumpers. These bumpers are a foolproof 360o obstacle detection system that allows the AGVs to stop or slow down in case of an obstacle. This allows the latter to operate safely among workers or other vehicles as it is a non-contact type of obstacle detection [3]. Even if the initial cost of automating an industry with automated guided vehicles is very high, the return on investment is usually rapid. AGVs can be classified into categories based on the kind of load they are able to transport, the type of navigation system they use to move around or the tasks they perform. The latter is the most common type of classification. Automated Guided Vehicles are used in a wide range of tasks. They are extensively used in the handling of work-in-process goods in the manufacturing and automotive industries where they move materials form one process to another throughout the manufacturing process. Page | 1

Autonomous Forklift
The advantage of using AGVs for this type of handling is that the movements of goods between workstations are independent. Another example is the handling of finished goods where they are used in the automatic storage and retrieval of goods in food, beverage and pharmaceutical warehouses, where goods have to be classified by the warehousing software according to date of manufacture. AGV forklifts are most suitable for these applications as the goods are usually packed into unit loads found on pallets [4] . Nowadays they are also being used for more complex processes like automatic trailer loading where pallets are picked up from staging lanes and loaded into standard trailers using specific loading patterns for improved goods safety and trailer stability. Secondly in the healthcare industry where AGVs move linens, regulated medical waste, patient meals and surgical case carts. The main advantage is that as they move through the hospital they can automatically operate doors, elevators and even trash dumpers. And lastly also for outer space exploration, the Mars Rovers Spirit and Opportunity are two specially designed AGVs used for the exploration of Mars in an attempt to find traces of water. Originally designed to work for only 90 days on the Martian soil, they outperform every expectation by still being in activity since their landing in January 2004.

1.1 Advantages of AGVs


The advantages offered by AGVs which have contributed to their increased popularity are mainly: [5] 1. 2. 3. 4. 5. 6. Improvement in safety with AGVs that move in a controlled and predictable manner with safety sensors for obstacle detection. Reduction of labor costs with fewer people to manoeuver forklifts and on the loading dock. Reduction in product damage with gentle and precise handling of loads. Reduction in trailer waiting times with safe, reliable, and timely loading of trailers. Improvement of material tracking with computer controlled vehicles which communicate with plant controls No plant modifications or bulky conveyors needed as it accommodates standard, over-the-road trailers and standard loading docks.

1.2 Problem Definition & Aims


Nowadays AGVs are being used in every aspect of the manufacturing process from the handling of material, sorting, storage and retrieval and trailer loading. But most AGVs today can perform only one of the above mentioned tasks. The rare AGVs that Page | 2

Autonomous Forklift
can accomplish multitasking are very expensive. So the main idea behind the project is to design and implement an overall system consisting of a central PC and an autonomous forklift that can sort out crates and also load the latter into trailers according to a specific loading pattern. The challenge of this project is to design an overall system that can operate safely in an existing human work place where other vehicles and workers on foot are present. To meet the challenge the following aims should be met: 1. 2. 3. 4. Sorting of loads for delivery in specific trailer. RF communication between central PC and forklift. Ability of autonomous forklift to navigate through a predefined path. Obstacle avoidance along path, through use of non-contact sensor for increased security. 5. Loading of standard trailers in a specific pattern.

1.3 System Description


To be able to meet the above aims the proposed methodology was to develop a system in two parts. The first one would be sorting part, which would consist of a PC equipped with the appropriate hardware and software. The PC would normally be found in the loading area, with loads in close proximity so as to be able to perform its required task. Whereas the AGV would be in the parking zone found at a remote location. The PC would sort out the loads base on an algorithm and determine the trailers into which each would be loaded. For the sake of the project three different trailers mainly: A, B & C would be implemented. After having received confirmation about the availability of the forklift, the information of the trailer to be loaded would be communicated to the latter via wireless communication. The second part would be the implementation of the autonomous forklift itself. The forklift would initially be found at the parking zone, where it would inform the PC about its availability and wait for any load to be present at the loading area. After having received confirmation of the presence and the specific trailer to be loaded, the forklift would follow a predefined marked path towards the loading area. Along the path the latter would use its sensor as a non-contact form of obstacle detection. In case of any obstacle present for a prolonged time the PC would be informed of the situation by wireless.

Page | 3

Autonomous Forklift
At the loading area, the forklift would lower its forks, load the pallet and continue motion along the path towards the trailers. While being on the path the AGV would continue to monitor any obstacle. On reaching the junction to the specific trailer, the forklift would do a 90 0 turn on itself and enter. This time the latter would use its sensor as a distance measuring device. The sensor would measure the distance between the forklift and the walls of the trailer or that between the forklift and any previous load already present in the trailer. The AGV would continue to move forward until the measured distance would be equal to that of the sum of the width of the pallet and the minimum clearance required between pallets or pallets and trailer wall. At this moment the forklift would lower its forks and reverse until it reaches the junction again. The AGV would then send an RF message to the PC, informing the latter that it has successfully delivered the load. Then after a 900 turn the former would continue along the path while detecting obstacles as mentioned above. On reaching the parking zone, the forklift would stop and inform the PC via RF about its availability for any further task. The AGV would continue to wait until a message about any new load is received. On reception of the message the above loop would be repeated until the trailers are full.

1.4 Thesis Structure


Chapter 2: The literature review is a summarization of the different researches done in the field of autonomous guided vehicles. Discussions are also made about how the various features of AGVs already implemented can be applied to the project. Chapter 3: The conceptual design deals with the selection of the various components, microcontroller and material that would be used to implement the whole system. The characteristics and features of each component are discussed and selection is mostly done by the decision matrix method. Chapter 4: The mechanical design is a step-by-step process showing the building of the AGV based on 3D Designs and components selected from chapter 3. Chapter 5: The electronic design deals with the implementation and interfacing of the various ICs, sensors, motors and transceiver with the Arduino boards for both the forklift and central PC. Chapter 6: The software design gives an in depth explanation of the function of the different programs by use of flowcharts, that would be run on the AGV and PC. Chapter 7: The implementation and testing details the various problems faced after having completely built the system and what specific solution was found for each one. Page | 4

Autonomous Forklift
CHAPTER 2 : LITTERATURE OVERVIEW

2.1 Introduction
This chapter enumerates the key points on current knowledge that have been published by scholars and researches in the specific field of autonomous guided forklifts and how these research work can be applied to the project.

2.2 Industrial Forklifts


A forklift is a powered truck that is used for lifting and transportation of materials. The latter developed since 1920s has become an indispensable piece of equipment in all manufacturing and warehousing companies. Forklifts are rated for specific weights and centre of gravity. One of the main advantages of forklifts is their increase manoeuvrability in making tight corners, which is due to rear wheel steering. Instability is the main problem concerning forklifts. The latter and a load are considered as a unit which has continuous varying centre of gravity for every movement of the load. Tip-over accidents is another concern that usually occurs when forklifts negotiate turns with raised loads, it's the combination of the centrifugal and gravitational forces that combine to cause these accidents [6]. Forklifts can be categorized according to the Industrial Truck Association, using this mode of classification the forklifts can be grouped into eight distinct classes. The most common type of forklifts is the counterbalanced ones. They use a heavy iron mass found at the rear that servers as a counterweight to compensate for the load. In the case of electric ones the large lead-acid battery is sufficient to counterweight the load.

2.3 Autonomous Navigation


The means of guidance for AGVs can be of many different types mainly: Wired which is the oldest means of guidance where a current carrying wire track is embedded into the floor. The Automated guided vehicle equipped with a magnetic sensor, senses the magnetic field generated by the current and the data obtained is used to navigate the robot along the path.

Page | 5

Autonomous Forklift
Laser navigation, that uses retro reflective tape mounted on poles or machines at strategic locations. The AGV is equipped with a laser mounted on a turret, the laser is transmitted and the time for the reflected signal to reach the AGV is calculated. By taking into account the time and angle of the transmitter the position of the latter is determined. Inertial navigation, which uses small magnetic rods buried into the floor of the factory. By detecting the magnetic field and the spacing between the rods the position of the AGV is determined. The latter is also equipped with gyroscopes to detect slight changes in direction which are then corrected. Guide tape navigation, which makes use of magnetic or coloured tape. Using the appropriate sensor the AGV can be guided along the path. One of the main advantages of this type of navigation is that the track can be easily modified and the latter does not require to be energized. Guide tape was the type of navigation selected for the project of the Autonomous Forklift as it is simple and can be easily implemented.

Figure 2.1: Forklift Overview

(Source: Figure 6 in [Wikipedia Forklift Truck, 2011])

Page | 6

Autonomous Forklift
2.4 Sorting
Sorting machines found in industries are usually large conveyor-based systems like the one developed by the SDI group in Holland [7] . The boxes found on the conveyor are sorted by reading the barcodes or RFID tags found on them and they are discharged along chutes into respective areas.

[8]

Figure 2.2: Barcode Sorting

(Source: Figure 4 in [Keyence, 2011])

They are later collected by AGVs and transported to the appropriate areas for storage or loaded into trucks. Using the same principle a PC equipped with a webcam would sort the packages by decoding the barcode found on them. After decoding the information extracted from the barcode will indicate into which trailer the package shall be loaded. This information will then be transmitted to the forklift via RF signal.

2.5 Guide Tape AGV


The E-Jet is an AGV developed by the S-Elektronik company found in Germany [9]. It uses black coloured tape to guide itself along the path. Although the guide tape method of navigation suffers from some drawbacks like, tape being easily damaged or covered with dirty. Its main advantage is that the course of the track can be easily modified and it is a cost efficient way compared to the other methods. The same method of navigation was selected for the project. The guide tape used was standard black adhesive electrical tape, which has a width of approximately 2.7 cm. The tape was glued on a white background for increased contrast. The sensors used for the detection of the line were light dependent resistors. Page | 7

Autonomous Forklift

[10]

Figure 2.3: Line Following AGV

(Source: Figure 1 in [S-Elektronik, 2011])

2.6 Trailer Loading AGV


Modern and more sophisticated AGVs recently developed by companies like Egemin and Daifuku Webb Company are now even capable of loading and unloading of overthe-road trailers [11]. The AGVs can move loads found on pallets in warehouse to trailer and vice versa. The main advantage is that the former can load and unload conventional trailers so the company does not need to buy specialized ones. One example of a trailer loading AGV is the Egemin Trailer Loader, shown in figure 2.4. The Egemin is capable of optimizing the space available in the trailer by leaving minimal clearances between pallets. And it is also able to load trailers using different loading patterns which are made possible by its guidance system that adapts itself to the length and width of each trailer. Being equipped with the latest security features the AGV is capable of working with both personnel and other manual forklifts without representing a risk for them [12]. The same concept of trailer loading was used for the project. But this time the sensor used was the ultrasonic sensor. The latter is used in two different ways, first to detect the distance between the wall of the container and the Autonomous forklift. Secondly it is used to detect obstacles such as personnel or other vehicles along the path. Upon detection the AGV would instantly come to a halt. As the type of microcontroller used for the project has low processing capabilities, only the single loading pattern would be implemented.

Page | 8

Autonomous Forklift

Figure 2.4: AGV Loading Trailer

(Source: Figure 1 in [Egemin Trailer loading Brochure, 2011])

Figure 2.5: Loading Pattern

(Source: Figure 10 & 11 in [Egemin Trailer loading Brochure, 2011]) Page | 9

Autonomous Forklift
CHAPTER 3 : CONCEPTUAL DESIGN

3.1 Introduction
The conceptual design of the complete system to be implemented will be discussed in this chapter. It will encompass all the various functions that should be performed by the system, and the most appropriate parts will be chosen using the decision matrix method. It should be kept in mind that the system should meet certain specific requirements that will greatly affect the choice and design of the components of the forklift. The requirements are as follows: 1. The obstacle sensor on the AGV should not be blocked by the forks of the latter. The sensor should be relatively accurate so as to be able to effectively measure distance between AGV and any obstacle. 2. The central PC should not only decode loads present in the loading area. But it should be able to differentiate whenever a load is present or absent. 3. Two-way communication should be possible between PC and AGV. So that the latter could inform the PC about its availability, tasks being performed and any obstacle present on path. The PC on its part should be able to inform the forklift about the presence of loads and the specific trailer into which loading should be done.

3.2 System Block Diagram


The system block diagrams for both the PC and the autonomous forklift were realized after the determination of the essential components required. The block diagrams realized provide a clear view of the overall system.

3.2.1 Central PC

The Figure 3.1 shows the various inputs and outputs that will be present in the decoding section of the project.

Page | 10

Autonomous Forklift

WEBCAM

BARCODE

MACHINE VISION

MICROCHIP

PUSH BUTTON A

PUSH BUTTON B

PUSH BUTTON C

LCD DISPLAY

WIRELESS TRANSMITTER
Figure 3.1: Central PC Block Diagram

3.2.2 Autonomous Forklift

All the different inputs, outputs and ICs related to the conception of the AGV are detail in the following block diagram. Page | 11

Autonomous Forklift

ULTRASOUND SENSOR

LINE FOLLOWER SENSOR

LIMIT SWITCH

MICROCHIP

TRANSCEIVER MODULE

SHIFT REGISTER

MOTOR DRIVER IC

MOTOR DRIVER IC

FORK MOTORS

DC MOTORS

BUZZER

Figure 3.2: AGV Block Diagram

Page | 12

Autonomous Forklift
3.3 System Flow Chart
The system flow charts represent the basic steps through which the PC and Forklift programs must undergo respectively so as to be able to complete their respective functions.
START

SET TRANSCEIVER TO RECEIVER

DELAY

IS FORKLIFT AVAILABLE?

DELAY

IS PACKAGE AVAILABLE?

N Y
DECODE

SEND INFORMATION TO MICROCONTROLLER

SET TRANSCEIVER TO TRANSMITTER

TRANSMIT INFORMATION TO FORKLIFT

Figure 3.3: PC Flowchart

Page | 13

Autonomous Forklift
START

SET TRANSCEIVER TO TRANSMITTER

TRANSMIT AVAILABILTY

SET TRANSCEIVER TO RECEIVER

N
DELAY

IS PACKAGE AVAILABLE?

Y
SET DESTINATION

LINE FOLLOWER

IS LOADING AREA REACHED?

Y
LOAD PALLETE

LINE FOLLOWER

N
IS DESTINATION REACHED?

Page | 14

Autonomous Forklift
Y
TURN LEFT ENTER TRAILER

LINE FOLLOWER

N
MIN.CLEARANCE REACHED?

Y
UNLOAD PALLETE

EXIT TRAILER TURN RIGHT

LINE FOLLOWER

IS PARKING AREA REACHED?

Y
STOP

Figure 3.4: AGV Flowchart

3.4 Conceptual Design


The selection process of the different parts forming the whole automated system will be described in the following section. The selection will be based on the advantages Page | 15

Autonomous Forklift
offered by each component but mainly on their ability to be easily integrated in the design.

3.5 Central PC Design


When considering the design of the central PC part it should be taken into account that the latter will perform two main functions mainly: 1. The differentiation between the presence and absence of loads, and their sorting. 2. The establishment of two-way communication between PC and AGV. 3.5.1 Sorting

The different loads present at the loading area would have to be sorted in order to be successfully loaded in to the specific trailer. To be able to accomplish this task the sorting system would have to meet certain requirements: Accurate: The system must be able to differentiate between the loads without making errors. Fast and reliable: The information found on the pallet should be obtainable instantly to be transmitted to the AGV. Reconfigurable: Reprogramming of the system should be possible to include more trailers and loads. Low cost: The method of sorting should be relatively cheap as it would be included to thousands of pallets. Track of inventory: A record of the loads leaving the warehouse should be easy to keep.

The different systems of sorting available are discussed below and based on the decision matrix method the best choice was made.

3.5.1.1 Barcode

Barcoding is a popular type of sorting used in industries to differentiate loads and keep track of inventory [13]. In our system, barcodes can be easily glued to pallets and using an appropriate barcode reader the loads can be easily sorted. The information obtained by the reader would be decoded and transmitted to the AGV.

Page | 16

Autonomous Forklift
Advantages of barcoding : 1. Inexpensive to design and print. 2. Fast and reliable. 3. Accurate. 4. Improves inventory control. Disadvantages of barcoding: 1. Label prone to damages. 2. Reader requires direct line of sight to decrypt barcode.

Figure 3.5: Typical Barcode

3.5.1.2 RFID Tags

Radio frequency identifiers also known as RFID are being developed as a new form of sorting. This kind of method uses radio waves to establish communication between the tags and the reader [14]. In context with the project the tags could be incorporated to the pallets and decoded using appropriate equipment. Advantages of RFID: 1. Modification of data present on tag. 2. Higher data holding capacity. 3. Accurate. 4. Fast and reliable. 5. Improves inventory control. 6. Reader can read multiple tags and does not require direct line of sight.

Disadvantages of RFID: 1. Very high cost of tags and appropriate reader. 2. Radio waves may pose problem with certain materials. 3. Tags can fail.

Page | 17

Autonomous Forklift

[15]

Figure 3.6: Typical RFID Tag

(Source: Figure 2 in [Small Business Trends, 2012])

3.5.1.3 Selection for Sorting After having performed a thorough search on the above types of sorting Pughs method was used as a means of comparison.

Table 3.1: Decision matrix for Sorting.

Barcodes Accuracy Reliability Modifications Reading Speed Price Pluses RESULTS Minuses ++ ++ + + ++ 8 0

RFID ++ + ++ ++ -7 2

Barcoding was found to be the most appropriate system to be used for the sorting process, as it meets all the requirements and has a very low cost of implementation.

Page | 18

Autonomous Forklift
3.5.2 Barcode Reader

After the selection of barcoding as the method of sorting, a question about the type of reader to be used arises. There are two types of barcode reading devices available, a typical barcode reader or machine vision software.

3.5.2.1 Typical Barcode Reader

The laser barcode readers are the most common variety used. They provide fast and accurate information which can be easily transferred to a PC for processing. If implemented for the project the reader would be connected to the PC most likely via USB. The information obtained would then be shifted to the microcontroller, for the latter to take the required actions. Advantages of barcode reader: 1. Fast and accurate. 2. Easily interfaced with PC. Disadvantages of barcode reader: 1. Have to be used in conjunction with other sensor to detect presence of load. 2. Barcode has to be in motion for reader to pick up information.

[16]

Figure 3.7: Handheld Barcode Scanner

(Source: Figure 1 in [Buzzle, 2012])

Page | 19

Autonomous Forklift
3.5.2.2 Machine Vision

A PC equipped with a camera and the appropriate software can easily perform the decoding of barcodes. The software Roborealm would most likely be selected for the task, as the latter can perform the decrypting process and identify the presence of loads without the need of external sensors [17]. The decrypted information would then be transmitted to the microcontroller. Advantages of Roborealm: 1. Very fast decoding. 2. Can support 9 types of barcodes. 3. Does not require pallets to be in motion to decrypt the information. 4. Can be easily interfaced with microcontrollers. 5. Does not require additional sensors to detect presence of loads. Disadvantages of Roborealm: 1. Prone to errors in low light conditions. 2. A license has to be purchased yearly for its use.

3.5.2.3 Selection for Barcode Reader

For the determination of the most appropriate piece of equipment, the use of the decision matrix was not required. As one of the major drawbacks of a typical barcode reader is that the pallet should be in motion, most likely on a conveyor. Whereas in the context of this project the load would simply be place on the loading area, therefore the most suitable method would be the machine vision.

3.5.3 Wireless Communicator

Two-way wireless communication should be possible between PC and AGV. The PC should be able to transmit information about the trailer to be loaded whenever a pallet is present. In the same manner the forklift should be able to send data every time it is available and to inform the PC about any obstacle present on the path. The most appropriate means of wireless communication are discussed below.

Page | 20

Autonomous Forklift
3.5.3.1 Wi-Fi Module

Wi-Fi is a widely used communication protocol in industries as it can be easily implemented. The Wi-Fi modules such as the GainSpan WiFi Breakout could be interfaced with the AGV and as most computers are now equipped with Wi-Fi, there would be no need to purchase further equipment [18]. Advantages of GainSpan WiFi: 1. Ability to integrate with existing infrastructure. 2. Very long range (300 m). 3. Low battery consumption.

Disadvantages of GainSpan WiFi: 1. Expensive. 2. Lack of libraries present for implementation.

Figure 3.8: Wi-Fi Module

(Source: Figure 1 in [Sparkfun, 2011])

3.5.3.2 ZigBee

ZigBee is a type of wireless protocol designed to transmit data through RF signals especially in harsh manufacturing environments. The XBee is a module based on the ZigBee protocol using a frequency of 2.4GHz to transmit data [19]. For the project two XBee modules could be used, one would be connected to the PC and the other one to the forklift. Advantages of XBee: 1. Supports multiple network topologies. 2. Low battery consumption.

Page | 21

Autonomous Forklift
3. Low latency. 4. 128-bit encryption. 5. Easy implementation. Disadvantages of XBee: 1. Medium range (100 m). 2. Modules relatively expensive.

[20]

Figure 3.9: XBee Module

(Source: Figure 1 in [Sparkfun, 2011])

3.5.3.3 Nordic Transceiver

The nRF24L01+ wireless module developed by the Nordic Semiconductors company is an ultra-low power RF transceiver [21]. As the XBee modules, it uses a frequency of 2.4 GHz to send information. Two of these modules could be included in the system so as to establish communication between the PC and AGV. Advantages of Nordic transceiver: 1. Ultra-low power. 2. Fast transmission of data. 3. Supports multiple topologies. 4. Low cost.

Disadvantages of Nordic transceiver: 1. Low range. 2. Lack of libraries present for implementation.

Page | 22

Autonomous Forklift

[22]

Figure 3.10: nRF24L01+ Wireless Module

(Source: Figure 1 in [Iteadstudio, 2012])

3.5.3.4 Selection for Wireless Communicator

A decision matrix was built so as to compare the different types of communication available and select the most appropriate one for the project.

Table 3.2: Decision matrix for Wireless Communicator.

Wi-Fi Range Power Consumption Ease of Implementation Support of Networks Cost Pluses RESULTS Minuses ++ -+ + -4 4

XBee + + ++ ++ 6 1

Nordic ++ + ++ ++ 7 1

Based on the above table the nRF24L01+ Nordic wireless module was selected as the most suitable transceiver for the system.

Page | 23

Autonomous Forklift
3.6 Autonomous Forklift Design
Before starting the selection of components for the AGV, it should be kept in mind that there are certain key functions that the forklift should be able to perform mainly: 1. Establishing two-way communication, so as to be able to inform the central PC about its current status. 2. Following a predefined path for delivery of pallet in appropriate trailer. 3. Accurate detection of obstacle along path. 4. Precise determination of distance for unloading of pallet in trailers.

For wireless communication the Nordic transceiver selected was used.

3.6.1 Obstacle Detection

For increased security the forklift would have to be equipped with a non-contact form of obstacle detection sensor while moving on the predefined path. The sensor should also be able to measure distances accurately so that the AGV can precisely deliver the load in the trailer. The latter would measure the distance between the forklift and the walls of the trailer or that between the forklift and any previous load already present in the trailer as shown in the Figure 3.11.

Figure 3.11: AGV Measuring Distance

The AGV would continue to move forward, until the measured distance would be equal to that of the sum of the width of the pallet and the minimum clearance required between pallets or pallet and trailer wall. Page | 24

Autonomous Forklift
The two means of obstacle detection considered were the infrared proximity sensor and ultrasound sensor.

3.6.1.1 Infrared Proximity Sensor

The sensor works on the simple principle that an IR light is emitted and on hitting an object the latter is reflected back to the receiver. Depending on the angle between the emitted and reflected light an analog voltage is output. [23]

Figure 3.12: Infrared Proximity Sensor

(Source: Figure 2 in [Acroname, 2011])

(Source: Figure 1 in [Sparkfun, 2012])[24]

Advantages of infrared sensor: 1. Cheap. 2. Can be easily interfaced. Disadvantages of infrared sensor: 1. Low range from 10 to 80 cm only. 2. Low accuracy. 3. The relationship between analog voltage and distance is non-linear. 4. If the distance to the obstacle is less than 10 cm, the output voltage from the sensor corresponds to that of a longer range. (refer to Figure 3.13)

Page | 25

Autonomous Forklift

Figure 3.13: Graph of Analog Voltage against Distance

(Source: Figure 5 in [Acroname, 2011])

3.6.1.2 Ultrasound Sensor

The ultrasound sensor considered was the HC-SR04 Ultrasonic Range Finder. The principle of operation of the sensor is that, a sound wave is generated by applying logic 1 to the Trigger pin on the latter for a few milliseconds. On hitting the obstacle the wave is reflected back to the sensor. When the reflected wave is detected, the Echo pin generates a logic output of 1. To measure the distance between the obstacle, the time in-between the Trigger and Echo is calculated. Then using the relationship between speed, time and distance, the value of distance is calculated. [25]

Figure 3.14: HC-SR04 Module

(Source: Figure 1 in [Jaktek, n.d])

Page | 26

Autonomous Forklift
Advantages of HC-SR04: 1. Cheap. 2. Can be easily interfaced. 3. Very large range from 2 to 400 cm. 4. Extremely accurate. (0.3 cm)

Disadvantage of HC-SR04: 1. Effective angle of detection is limited to 15o

3.6.1.3 Selection of Obstacle Detector

The HC-SR04 Ultrasonic Range Finder was the obvious choice to be made due to the numerous advantages it offers but also due to the fact that the Infrared Proximity Sensor cannot be used for ranges below 10 cm. Measuring distances below 10 cm will be imperative, especially for the trailer loading function.

3.6.2 Navigation System

In this section the numerous types of navigation available for robots will be discussed and a choice about the most appropriate form will be made. The requirements that should be met by the navigation system are as follows: It should be relatively cheap. The track should be easily modifiable to accommodate new trailers. The AGV should be able to follow the predefined path accurately.

The systems that meet the above requirements are the line following and autonomous navigation by use of GPS.

3.6.2.1 Line Following

The easiest way to implement line following for the project would be to use black electrical tape. The black tape would be used to define the path that the forklift would need to follow. The specific places where the AGV would need to load, unload or perform turns would be defined by junctions. To detect the junctions and the line the

Page | 27

Autonomous Forklift
forklift would either be equipped with LDR and led pairs or IR emitter and receiver pairs.

Advantages of line following: 1. Very cheap. 2. Path can be easily altered. 3. Easy implementation.

Disadvantage of line following: 1. Tape can be easily damaged or covered with dirt.

3.6.2.2 Autonomous Navigation

The global positioning system (GPS) is a satellite based system that provides accurate information about the location of any device. This information provided is in the form of longitudinal and latitudinal values. The AGV would be given specific points through which it should navigate. The latter should be equipped with a GPS and compass module to be able to operate properly. [26]

Advantages of GPS navigation: 1. Ability to work in any condition. 2. Path can be easily altered. 3. Easy implementation.

Disadvantages of GPS navigation: 1. Costs of modules are high. 2. Low precision with a maximum deviation of 5m from targeted location.

3.6.2.3 Selection of Navigation System

The selected form of navigation was the line following method; the choice was made clear by the low precision of the GPS modules considered. As in an industry a difference of 5m from the designated position would be troublesome.

Page | 28

Autonomous Forklift
3.6.3 Steering System

The different types of steering available for robots will be considered in this segment. But before starting it should be kept in mind that the forklift would have to follow certain requirements based on the project design: Ability to rotate on itself 360o. Relatively stable. Precision turning. Easily programmable.

The different types of steering are argued below and a choice for the best alternative was made.

3.6.3.1 Differential Steering

Differential steering is the most common form of steering used for robots. The term differential comes from the fact that the direction of motion of the robot is affected by the speed and direction of rotation of each wheel. Two independent wheels driven by motors would be placed on each side of the forklift. Alterations in the speed of rotation of the motors by PWM and direction of rotation, would affect the direction of motion. [27]

Advantages of differential steering: 1. Ability to spin on its own axis by reversing one wheel relative to the other. 2. Easily programmable.

Disadvantage of differential steering: 1. While making turns the speed of rotation of each wheel should be precisely controlled.

Page | 29

Autonomous Forklift

Figure 3.15: Direction of Motion Relative Wheels

(Source: Figure 2 in [Robotoid, n.d])

3.6.3.2 Ackerman Steering

The Ackerman steering is a type of steering initially developed for horse drawn carriages that was later adapted to cars. It avoids tires to slip sideways while doing a curved path as all the wheels have their axes set on the radius of a circle with a common center. The rear wheels would be controlled by a single motor, which would control the forward and backward motion. While the direction of the front ones, would be controlled by a servo or stepper motor. [28]

Advantages of Ackerman steering: 1. Easily programmable. 2. Most appropriate for high speed robots.

Page | 30

Autonomous Forklift
Disadvantages of Ackerman steering: 1. Unable to spin on its own axis. 2. Increases wear on wheels. 3. Difficult to implement.

Figure 3.16: Ackerman Steering

(Source: Figure 11 in [Beam-wiki, 2012])

3.6.3.3 Omnidirectional Steering

This type of steering makes use of the mecanum wheels. Each of the wheels is connected to a separate motor and depending on the speed and direction of rotation of each motor the forklift would move in any direction. This type of steering has already been implemented on certain real size forklifts as shown in Figure 3.17. [29]

Advantages of omnidirectional steering: 1. Exceptional maneuverability. 2. Low torque of motors is needed and minimum friction is generated while performing a 360o rotation.

Disadvantages of omnidirectional steering: 1. High cost. 2. Difficult to program.

Page | 31

Autonomous Forklift

Figure 3.17: Forklift with Mecanum Wheels

(Source: Figure 2 in [Gizmodir, 2012]) [30]

Figure 3.18: Direction of Motion Relative to Wheels

(Source: Figure 3 in [Humanoid-robotics, 2012]) [31]

Page | 32

Autonomous Forklift
3.6.3.4 Selection of Steering System

Table 3.3: Decision matrix for Steering System

Differential Maneuverability Stability Ease of Programing In-place Rotation Cost Pluses RESULTS Minuses + + ++ + ++ 7 0

Ackerman ++ + -+ 4 3

Omnidirectional ++ ++ + ++ 7 1

The differential steering was the perfect choice for the AGV. Normally casters are used to balance the system but due to their high price and the fact that they have to be used in pairs for a stable structure. A more adapted system of tracks and wheels from Tamiya was preferred, as show in Figure 3.19. One of the main advantages of the latter is that it can be easily adapted to any kind of robot.

Figure 3.19: Tamiya Tracks and Wheels

(Source: Figure 1 in [Superdroidrobots, 2012]) [32] Page | 33

Autonomous Forklift
3.6.4 Motor Selection

After the selection of the steering system, the required torque that should be developed by each motor was calculated based on the following features. The mass of the forklift together with the load was evaluated to be 2 Kg. The radius of the driving wheel is equal to 1.5cm. The AGV would normally operate on a flat surface but for the project an inclination of 5o was considered. The efficiency of motors was approximated to 65%. A travelling speed of 5cm/s was chosen for the forklift. [33]

Figure 3.20: Forces Exerted on a Wheel

(Source: Figure 4 in [Robotshop, 2008])

For calculations refer to Appendix B. The results obtained were as follows:


Table 3.4: Motor Torque Calculation

Mass of Forklift Radius of Wheel Travelling Speed Rotations of Wheel Acceleration Inclination Efficiency of Motors

2 Kg 0.015 m 5 cm/s 31.83 rpm 0.1 m2/s 5o 65% Page | 34

Autonomous Forklift
Torque Required by AGV Torque Required per Wheel Torque Required per Wheel 0.44 Nm 0.22 Nm 2243.37 gf.cm

The Tamiya Double Gearbox was preferred against geared motors due to the numerous advantages it offers. Advantages: 1. Can be built in numerous configurations depending on Torque and speed requirements. 2. It consists of two dc motors whose speed and direction of rotation can be altered independently. 3. Very low price compared to geared motors.

According to Tamiyas specification sheet the gear ratio selected for the AGV was 344.2:1. This type of configuration offers a Torque of 2276 gf.cm and a Rotational speed of 38 rpm. This is more than sufficient to drive the forklift.

Figure 3.21: Tamiya Double Gearbox

(Source: Figure 1 in [Tamiya, 2008]) [34]

Page | 35

Autonomous Forklift
3.6.5 Microcontroller Selection

After the selection of all the components making up the AGV and the central PC a clear idea about the different components and number of inputs and outputs needed was made. Both the central PC and the Autonomous Forklift would be using a microcontroller, which should be able to perform certain tasks.

3.6.5.1 Central PC Microcontroller

They requirements that should be met by the microcontroller connected to the PC are as follows: 1. It should be an interface between the machine vision software and the transceiver. 2. It should be able to present data on a LCD for the user. (HD44780) 3. It should have the ability to be re-actualized by the user. (push buttons)

To act as interface the controller should either be connected via USB or serial port. An analysis of the different types of inputs needed was made and is shown in the Table 3.5.
Table 3.5: Components of Central PC

Components Nordic Transceiver LCD Push Buttons

Num. of ports 5 6 3

Type Digital Output Digital Output Analog Input

A total of 11 digital outputs and 3 analog inputs were required.

3.6.5.2 Autonomous Forklift Microcontroller

The number of inputs and outputs required for each of the selected components composing the forklift are detailed in the Table 3.6.

Page | 36

Autonomous Forklift
Table 3.6: Components of AGV

Components Nordic Transceiver Motor Driver (2) Ultrasound Sensor LDR (4) Limit Switch (2) Buzzer

Num. of ports 5 12 2 4 2 1

Type Digital Output Digital Output Digital Input & Output Analog Input Analog Input Analog Input

A total of 18 digital outputs, 6 analog inputs and 1 digital input would be required for the AGV. Out of the 18 digital outputs, 2 need to be capable of pulse width modulation (PWM). Two different types of microcontrollers were considered and based on their respective advantages a decision was made.

3.6.5.3 PIC 16F877A

The popular microcontroller PIC16F877A together with the development board from Olimex was investigated as an option.

Figure 3.22: Olimex Board

(Source: Figure 1 in [Sparkfun.com, 2011])

Page | 37

Autonomous Forklift
The properties of the PIC16F877A chip are as follows: 14KB Flash program memory. 256 byte EEPROM Data. 368 bytes RAM. 8 Analog inputs. 35 Digital Inputs or Outputs. 2 PWM ports out of the 35.

Advantages of PIC16F877A: 1. Widely used. 2. Huge number of ports available. Disadvantages of PIC16F877A: 1. Limited library available for implementation with components. 2. Limited number of PWM outputs. 3. No online reference available. 4. Can only be programmed through serial RS 232 port. (Most modern PCs are equipped with only USB). 5. Cost of PIC and development board relatively high. 6. Difficult to program.

3.6.5.4 ATmega 328

The second microcontroller that was considered was the ATmega 328 that comes with the Arduino Duemilanove Board. The Duemilanove is a modern development board that is becoming increasing popular among hobbyist.

The properties of the ATmega 328 chip are as follows: 32KB Flash program memory. 1KB EEPROM Data. 2KB RAM. 6 Analog Inputs. 14 Digital Inputs or Outputs. 6 PWM ports out of the 14.

Page | 38

Autonomous Forklift

Figure 3.23: Arduino Duemilanove Board

(Source: Figure 1 in [Arduino.cc, 2009])

Advantages of Arduino Duemilanove: 1. Huge library available online for components. 2. Can be easily programmed via USB. 3. Relatively cheap. 4. Huge number of PWM ports. 5. Can be easily interfaced with software.

implementation with various

Disadvantage of Arduino Duemilanove: 1. Limited number of digital input or output ports.

3.6.5.5 Selection of Microcontroller

To select the most appropriate microcontroller for the project a decision matrix was used.

Page | 39

Autonomous Forklift
Table 3.7: Decision matrix for Microcontroller Selection

PIC 16F877A Ease of Programing Num. of Ports Interface with components Connectivity Cost Pluses RESULTS Minuses -++ -+ 3 5

ATmega 328 ++ -++ ++ ++ 8 2

The Arduino Duemilanove was the microcontroller carefully chosen even if the latter has only 14 digital input or output ports and the required number for the project was 18. To increase the number of ports a shift register was used.

3.6.6 Material Selection

Different materials have been considered for the construction of the robot. The main requirements of the material are: 1. 2. 3. 4. 5. Durability. Good machinability. Corrosion resistant. Light weight. Good toughness.

Page | 40

Autonomous Forklift
Table 3.8: Decision matrix for Material Selection

Stainless Steel Durability Machinability Light weight Toughness Cost Pluses RESULTS Minuses ++ -+ ++ -5 4

Plywood + + ++ -++ 6 2

High-density polyethylene (HDPE) ++ ++ ++ ++ + 9 0

It was clear from the decision matrix that HDPE is the most appropriate material. HDPE can be easily found in kitchen cutting boards and it possesses all the required characteristics.

Page | 41

Autonomous Forklift
CHAPTER 4 : MECHANICAL DESIGN

4.1 Introduction
After the selection of the components and the material from which the AGV would be build, this chapter will address the building of the different sub-systems that would compose the forklift.

4.2 Mechanical Structure


Before starting the construction of the structure, there were certain requirements that should be met for the good functioning of the whole system.

Requirements: 1. The ultrasound sensor should not be blocked by the forks. 2. The height of the line following sensor should be adjustable. 3. The width of the forklift should not exceed 7 cm as this corresponds to the width of the Tamiya Double Gearbox.

4.3 3D Design
Based on the above considerations a 3D design of the AGV was made using Google SketchUp to get a better understanding of the structure.

Page | 42

Autonomous Forklift

Figure 4.1: 3D Design Side View

Figure 4.2: 3D Design Back View

Page | 43

Autonomous Forklift

Figure 4.3: 3D Design Front View

4.4 Structural Construction


The following section encompasses the building process of the forklift based on the 3D designs.

4.4.1 Design of Parts

The different parts that would form part of the structure of the AGV were drawn on a piece of HDPE of thickness 0.4 cm.

Page | 44

Autonomous Forklift

Figure 4.4: HDPE Cutting Board

The dimension of each part is as follows:


Table 4.1: Dimension of Parts

Part TOP BOTTOM SIDE A SIDE B FORKS

Length /cm 12 10 12 12 7

Width /cm 7 7 4 4 2

Thickness /cm 0.4 0.4 0.4 0.4 0.4

Page | 45

Autonomous Forklift
The height of the base of the forklift would be 4 cm which would be enough to accommodate the ultrasound sensor.

4.5 Construction of Base


After the parts were cut apart, they were glued together to form the base of the AGV as shown below in Figure 4.5.

Figure 4.5: Unglued Base of AGV

A hinge was integrated on the bottom part so as to be able to control the height of the line following sensor.

Figure 4.6: Base with Hinge

Page | 46

Autonomous Forklift
The battery and sonar sensor were then glued into place as show in Figure 4.7.

Figure 4.7: Battery and Sonar Sensor

Figure 4.8: 3D Design Battery and Sonar Sensor

Page | 47

Autonomous Forklift
4.6 Assembly of Gearbox
The Tamiya Double Gearbox selected in the motor selection unit, was mounted according to the selected ratio of 344.2:1 by using the instruction sheet from the supplier.

Figure 4.9: Unassembled Tamiya Double Gearbox

(Source: Figure 1 in [TowerHobbies, 2012]) [35]

Figure 4.10: Assembled Tamiya Gearbox

Page | 48

Autonomous Forklift
4.7 Construction of Top Part
The top side of the AGV was sectioned into two parts so that the wires from the line sensors, ultrasound and battery could be connected to the microcontroller and other components found on the upper levels.

Figure 4.11: Top Side AGV

Holes were also drilled so as to incorporate two switches.

Figure 4.12: Top Side with Holes

Page | 49

Autonomous Forklift
4.8 Assembly of Tracks and Wheels
Two holes were drilled on to each of the sides of the base (SIDES A & B). The wheels together with the tracks were then screwed into place. Wall plugs were also glued on the top of the structure, so as to serve as support for the perfboards.

Figure 4.13: 3D Design AGV Top Side

4.9 Assembly of Forks


The requirements that should be met by the lifting mechanism are as follows: 1. Simple mechanism. 2. Light weight so as not to destabilize the AGV. 3. Easily programmable. For lifting mechanisms usually the ball screw method is used but due to its heavy weight and complexity it was not chosen.

Page | 50

Autonomous Forklift
A simpler alternative was selected; a modest CD drive. The latter was dismantled and the tray mechanism removed. The mechanism was then glued vertically to the front of the forklift. Limit switches were also glued to the forks so as to detect the position of the latter, whether they were up or down.

Figure 4.14: Forks

Page | 51

Autonomous Forklift
CHAPTER 5 : ELECTRONIC DESIGN

5.1 Introduction
The electronic design of the forklift and the central PC will be reviewed in this chapter. The different connections and functions of the various ICs and equipment will be discussed thoroughly.

5.2 Forklift Electronic Design


The following section will deal with only the electronic part of the AGV. 5.2.1 Ultrasound Sensor

The ultrasound sensor, HC-SR04 consists of four pins. Two of which are connected to the power source while the rest are connected to two digital ports on the microcontroller for normal functioning. The Table 5.1 shows the ports allocation.
Table 5.1: HC-SR04 Port Allocation

HC-SR04 Vcc Gnd Echo Trig

Port Allocation +5V source Ground Arduino digital pin 5 Arduino digital pin 6

Figure 5.1: HC-SR04 Module

(Source: Figure 1 in [Jaktek, n.d]) [25] Page | 52

Autonomous Forklift
The schematic in Figure 5.2 shows the HC-SR04 connected to the Arduino ATmega 328.

Figure 5.2: Schematic of HC-SR04 and Arduino

5.2.2 Battery

There were certain requirements that were taken into account while selecting the appropriate battery for the AGV. Requirements: 1. 2. 3. 4. Rechargeable. Width less than 7cm. Relatively heavy so as to counter balance the weight of the forklift. Minimum voltage of 5V which is the rated voltage of the motors.

The battery selected was a rechargeable 6V NiCd. The battery normally processes an external recharge dock, but for better convenience the latter was dismantled. And the recharging circuit integrated into the forklift itself.

Page | 53

Autonomous Forklift

Figure 5.3: Dismantled Charging Dock

After being dismantled all the components were de-soldered. The terminals were connected to the battery and the other components re-soldered on a perfboard as shown in Figure 5.4.

Figure 5.4: Battery Components Re-soldered

A two-way switch was also integrated, so that by controlling its position we can control whether the battery is charging or delivering power to the motors. To differentiate between the two functions status two leds were used.

Page | 54

Autonomous Forklift

Figure 5.5: Battery with Two-way Switch

The Figure 5.6 shows the whole schematic diagram of the battery circuit.

Figure 5.6: Schematic of Battery Circuit

Page | 55

Autonomous Forklift
5.2.3 Line Following Sensor

The method of navigation selected was the line following, this would normally consist of a strip of black tape glued onto a white background for an increased contrast. To differentiate between the black and white areas two types of sensors were investigated mainly: Light Dependent Resistors (LDRs) working together with leds. Infrared detectors and emitters.

5.2.3.1 LDRs and Leds

The leds when turned ON will emit light which on striking the surface will be reflected back. This reflected light is then detected by the LDRs. The intensity of the light reflected will greatly depend on the type of surface it stroke. The resistances of the LDRs will then vary according to the intensity of the reflected light. By monitoring these resistances the AGV will discern its position.

Advantages of LDRs: 1. Can be easily implemented. 2. Cheap. 3. Easily programed.

Disadvantages of LDRs: 1. Affected by ambient light condition. 2. Must be close to the surface for optimum result.

5.2.3.2 IR Emitters and Detectors

The IR emitter emits infrared light that will strike the surface. If the latter is white the light is reflected back and is detected by the detector. But if it is black the infrared light is absorbed and none is reflected. Again by monitoring the detectors the position of the forklift is known. Advantages of IR: 1. Less affected by ambient light.

Page | 56

Autonomous Forklift
Disadvantages of IR: 1. Expensive. 2. Not easy to implement and program.

5.2.3.3 Implementation of Sensor

After a quick comparison the LDR and led pair was the type of sensors selected due to their easy implementation and programming. To overcome the problem caused by ambient light a simple program was implemented, refer to Software Design.

Figure 5.7: LDR and Led Pairs

The choice made was to have two LDRs on each side so as to be able to detect junctions in the path. And two other LDRs were centered in the middle so as to be able to detect the dark line. Figure 5.8 shows the line sensor soldered on a perfboard.

Figure 5.8: Line Sensor on AGV

Page | 57

Autonomous Forklift

Figure 5.9: Path of Light

The Figure 5.9 shows the path taken by light to reach the LDRs. Whenever the forklift goes off centered, the intensity of the light being reflected to one of the LDRs increases dramatically. And based on the readings obtained from the latter, corrective actions are taken by the microcontroller.

Figure 5.10: Schematic of LDRs and Leds

Page | 58

Autonomous Forklift
5.2.4 Voltage Regulators

To power up the different components and ICs, the forklift would incorporate three voltage regulators that would be found on the first level.

Figure 5.11: AGV Different Levels

Table 5.2: Voltage Regulators

Voltage Regulator LM7805 LM7805 LM317

Input Voltage 6V (NiCd Battery) 9V (Battery) 5V (from LM7805)

Output Voltage +5V +5V +3.3V

Use Motors ICs, LDRs, Limit switch & Ultrasound Transceiver

Page | 59

Autonomous Forklift
5.2.4.1 LM7805

The first voltage regulator would be used to power the three motors (2-differential steering, 1-forks). Its schematic is shown in Figure 5.12.

Figure 5.12: Schematic of Voltage Regulator 1

The first capacitor C8 ensures that there are no ripples in the voltage being supplied from the 6V battery. The second capacitor C9, on its part acts as a load balancer to ensure a smooth output voltage of +5V from the regulator. Whenever the regulator is supplying current to the motors LED5 will be ON. [36] The second voltage regulator would be used to power up the ICs and various components. Again LED13 this time will light up when it is delivering power. Its schematic is shown in Figure 5.13.

Page | 60

Autonomous Forklift

Figure 5.13: Schematic of Voltage Regulator 2

5.2.4.2 LM317

The LM317 is a variable output voltage regulator, where the value of the output voltage depends on the values of the resistance R1 and R2.

Figure 5.14: LM317 Voltage Regulator

(Source: Figure 1 in [WhatCircuits, 2012]) [37] Page | 61

Autonomous Forklift
Using the formula: Vout = 1.25(1 + R2/R1) And the fact that Vout should be equal to 3.3V and that R1 was chosen as 1K, the value of R2 was calculated as follows. R2= (0.8 Vout-1) R1 = (0.83.3 1) 1000 = 1.64 K As it is impossible to have a resistor of 1.64 K, a 10 K potentiometer was chosen instead. The Figure below shows the schematic diagram of the circuit.

Figure 5.15: Schematic of LM317

Page | 62

Autonomous Forklift
5.2.5 L293D Dual H-Bridge

The L293D Dual H-Bride is a motor driver that was used to control the three motors present on the AGV. It was selected mainly because of the following features [38]: 1. 2. 3. 4. It can supply motors with voltages in the range of 4.5 to 36V. It can provide a maximum of 1A to each motor. It has two enable pins that can be used for PWM. It can be easily interfaced with the Arduino.

The Figure 5.16 shows the pin layout of the L293D motor driver IC.

Figure 5.16: L293D Pin Layout

The Table 5.3 gives an idea of the different pins present on the IC and their different functions.

Page | 63

Autonomous Forklift
Table 5.3: L293D Features

Pin Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Name Enable 1 Input 1 Output 1 0V 0V Output 2 Input 2 +V motor Enable 2 Input 3 Output 3 0V 0V Output 4 Input 4 +V

Function To control motor 1 by PWM To control direction of rotation of motor 1 Connected to terminal of motor 1 Connected to GND or heat sink Connected to GND or heat sink Connected to terminal of motor 1 To control direction of rotation of motor 1 Connected to motor supply voltage To control motor 2 by PWM To control direction of rotation of motor 2 Connected to terminal of motor 2 Connected to GND or heat sink Connected to GND or heat sink Connected to terminal of motor 2 To control direction of rotation of motor 2 Connected to +5V IC supply

By changing the logic at the inputs 1 and 2, the direction of rotation of motors 1 would be altered. The same would happen with motor 2 once the logic at inputs 3 and 4 were changed. The Table 5.4 shows the different logics and their results on the motors.

Page | 64

Autonomous Forklift
Table 5.4: L293D Logic

Enable ( EN1/EN2) High High High High Low

Input 1/3 Low High Low High Not applicable

Input 2/4 High Low Low High Not applicable

Function Clockwise Anti-clockwise Stop Stop Stop

Two L293D ICs were required by the AGV, one to control the two motor for the steering and the other one to control the motor of the forks. 5.2.6 Shift Register

Due to the fact that the Arduino possesses only 14 digital Input/ Output pins and 18 were required to control the forklift, a shift register was used. The shift register used is the 74HC595, it was used to increase the number of output ports on the microcontroller. The 74HC595 needs to be connected to 3 digital pins from the Arduino and it provides 8 digital output pins. Several shift registers can be interconnected together so as to provide more output pins to the microcontroller, without utilizing any more than the initial 3 pins. The Figure5.17 shows the pin layout of the shift register.

Figure 5.17: 74HC595 Pin Layout

Page | 65

Autonomous Forklift
The Table 5.5 gives an idea of the different pins present on the IC and their different functions.
Table 5.5: Motor Driver IC Features

Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Name Q1 Q2 Q3 Q4 Q5 Q6 Q7 GND Q7 MR SH_CP ST_CP OE DS Q0 Vcc

Function Output 1 Output 2 Output 3 Output 4 Output 5 Output 6 Output 7 Ground Serial Out Master Reclear Shift register clock pin Storage register clock pin Output Enable Serial data input Output 0 IC power supply

The shift register 74HC595 uses the shiftOut function of the Arduino to control which output pins to activate and which one to deactivate. The Arduino simply shifts out numbers to the chip that corresponds to each pin as shown in the Table 5.6.

Table 5.6: ShiftOut Numbers

Output Pin Number to be shifted

Q0

Q1

Q2

Q3

Q4

Q5

Q6

Q7

16

32

64

128

Page | 66

Autonomous Forklift
So for example to activate output pin Q2 with logic 1, we shiftOut 4 and for pin Q6 we shiftOut 64. But to activate two pins at the same time for example Q0 and Q4, we shiftOut 17 which corresponds to: 1+16.Using this simple principle multiple pins can be activated. The Table 5.7 shows the different connections of the 74HC595.
Table 5.7: Motor Driver IC Features

Pin on 74HC595 Q1 Q2 Q3 Q4 Q5 Q6 Q7 GND Q7 MR SH_CP ST_CP OE DS Q0 Vcc

Connected to Pin Input 2 Input 3 Input 4 Input 1 Input 2 Buzzer Ground supply +5V Digital Output 4 Digital Output 2 Ground supply Digital Output 3 Input 1 +5V

Connected to IC L293D (steering motors) L293D (steering motors) L293D (steering motors) L293D (fork motor) L293D (fork motor) ATmega chip ATmega chip ATmega chip L293D (steering motors) -

The Figure 5.18 shows the connections between the shift register and the L293D IC used for the differential steering. It can be noted that EN1 and EN2 would be connected to the Arduino pins 9 and 10 respectively. They will be used to control the motors via PWM. While the other pins found on the motor IC would be controlled via the shift register, which will control the direction of rotation of each motor.

Page | 67

Autonomous Forklift

Figure 5.18: Schematic of 74HC595 and L293D (steering)

The Figure 5.19 shows the connections between the L293D and the two steering motors.

Figure 5.19: Schematic of L293D and Steering Motors

A 0.1F capacitor was included across each motor to act as a short circuit for highfrequency electrical noises. This reduces the unwanted fluctuations in voltage along the motor wiring, especially at start up. [39]

Page | 68

Autonomous Forklift
The Figure 5.20 shows the connections between the shift register and the L293D used to control the fork motor. This time it can be noted that the enable pin EN1 would be directly connected to a +5V source as PWM is not required for the fork motor. The outputs Q4and Q5 of the shift register would control the direction of rotation of the fork motor via the pins IN1 and IN2 respectively.

Figure 5.20: Schematic of 74HC595 and L293D (fork)

The Figure 5.21 represents the connections between the L293D and the fork motor.

Page | 69

Autonomous Forklift

Figure 5.21: Schematic of L293D and Fork Motor

The Table 5.8 shows the different numbers that are shifted out and their consequences on the different motors.
Table 5.8: Motor Direction Relative to ShiftOut

Steering Motors Number to be shifted 0 1 4 5 6 9 10 16 32 64 M1 (Right) STOP FORWARD STOP FORWARD BACKWARD FORWARD BACKWARD STOP STOP STOP M2 (Left) STOP STOP FORWARD FORWARD FORWARD BACKWARD BACKWARD STOP STOP STOP

Fork Motor

Buzzer

STOP STOP STOP STOP STOP STOP STOP DOWN UP STOP

OFF OFF OFF OFF OFF OFF OFF OFF OFF ON

Page | 70

Autonomous Forklift

Figure 5.22: Schematic of Arduino and Shift Register

5.2.7 Transceiver

The Nordic transceiver selected would be found on the third level of the AGV together with the microcontroller. The transceiver module and its schematic are shown in Figure 5.23.

Figure 5.23: Transceiver Module and Schematic

The Table 5.9 gives a description of the different pins on the Nordic and the digital pins to which they are connected.

Page | 71

Autonomous Forklift
Table 5.9: Nordic Transceiver Connections.

Pin Number 1 2 3 4 5 6 7

Name GND 3.3V CE CSN SCK MOSI MISO

Connect to Ground +3.3V (LM317) Arduino digital pin 7 Arduino digital pin 8 Arduino digital pin 13 Arduino digital pin 11 Arduino digital pin 12

The Figure 5.24 shows the connections between the Arduino and the Transceiver.

Figure 5.24: Schematic of Arduino and Transceiver

Page | 72

Autonomous Forklift
5.2.8 Limit Switch

Limit switches were integrated into the forks mechanism so as to be able to identify when the latter has reached the required height. They were connected to the Arduinos Analog input 4 and 5, as shown in the Figure 5.25.

Figure 5.25: Schematic of Arduino and Limit Switches

5.2.9 Microcontroller

The Arduino microcontroller would be found on the third level of the AGV. A summarization of the different allocated ports is shown in Table 5.10 and in Figure 5.26 respectively. Note that the digital pins D0 and D1 were not used to connect components, as they are used for serial communication between PC and the Arduino via USB.

Page | 73

Autonomous Forklift
Table 5.10: Different Connections of Arduino

Arduino Pin D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 A0 A1 A2 A3 A4 A5

Connected To Pin ST_CP (12) DS (14) SH_CP (11) Echo Trig CE (3) CSN (4) EN 1 (1) EN 2 (9) MOSI (6) MISO (7) SCK (5) -

Component

74HC595 74HC595 74HC595 Ultrasound Ultrasound Transceiver Transceiver L293D L293D Transceiver Transceiver Transceiver Left LDR Center Left LDR Center Right LDR Right LDR Limit Switch Limit Switch

Page | 74

Autonomous Forklift

Figure 5.26: Different Connections of Arduino

5.3 Central PC Electronic Design


An Arduino Nano which is a variant and breadboard friendly version of the Arduino Duemilanove would be used to implement display of information and wireless communication between PC and AGV.

5.3.1 LCD

To display information about the status of the forklift and the type of load available, a 204 character LCD with HD44780 parallel interface chipset was used [40].

Page | 75

Autonomous Forklift

Figure 5.27: LCD Module

(Source: Figure 1 in [Sparkfun, 2010])

The LCD was connected to the Arduino Nano as show in the Figure 5.28.

Figure 5.28: Schematic of Arduino and LCD

A 10 K potentiometer was also included so as to control the brightness of the display. Page | 76

Autonomous Forklift
5.3.2 Nordic Transceiver

The Transceiver connected to the central PC is the same as the one used for the AGV. Except that different ports on the Arduino Nano were used, as shown in Figure 5.29.

Figure 5.29: Schematic of Arduino and Transceiver

5.3.3 Push Buttons Switches

Three push button switches were also integrated into the system so as to re-initialize the count of the pallets whenever a new trailer would be available. The buttons were connected to the microcontroller via the analogue input pins 0, 1 and 2 as shown in Figure 5.30.

Page | 77

Autonomous Forklift

Figure 5.30: Schematic of Push Buttons and Arduino

5.3.4 Microcontroller

The Arduino Nano would be found on a breadboard and the latter would be connected via jumper wires to the various components. A summarization of the different allocated ports is shown in Table 5.11 and in Figure 5.31 respectively. Note that digital pins D0 and D1 would be used as serial communication between the PC and the Arduino Nano. They are used to transfer data from the machine vision software to the microcontroller.

Page | 78

Autonomous Forklift
Table 5.11: Different Connections of Arduino Nano

Arduino Pin D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 A0 A1 A2 A3 A4 A5

Connected To Pin DB7 DB6 DB5 DB4 E RS CE (3) CSN (4) MOSI (6) MISO (7) SCK (5) -

Component LCD LCD LCD LCD LCD LCD Transceiver Transceiver Transceiver Transceiver Transceiver Switch 1 Switch 2 Switch 3 -

Page | 79

Autonomous Forklift

Figure 5.31: Different Connections of Arduino Nano

Page | 80

Autonomous Forklift
CHAPTER 6 : SOFTWARE DESIGN

6.1 Introduction
The software design chapter will deal with the different programs used for the programming of each part. The functions of each key component will be explained in detail by the use of flowcharts. The chapter will be divided into two parts, mainly the software design of the central PC and that of the forklift respectively.

6.2 Central PC Software Design


There are various tasks that have to be completed by the PC in a stepwise way, each of them are discussed in greater detail in the following sections.

6.2.1 Machine Vision

The first process would involve the decoding of the barcodes found on the pallets. As selected in the conceptual design chapter, the machine vision technique was preferred. The software used is Roborealm, which is a powerful image analysis and processing program [41]. The flowchart below describes how the software will process the data. The complete program is shown in Appendix G.

START

CAPTURE IMAGE N IS LOAD PRESENT?

Page | 81

Autonomous Forklift

DECODE IMAGE

SEND TRAILER INFO TO ARDUINO NANO VIA SERIAL


Figure 6.1: Machine Vision Flowchart

6.2.2 Arduino Nano

After having received information about the presence of a new load, the microcontroller will then wait until it receives confirmation from the forklift that the latter is available. The Arduino will also access its database to see if the trailer into which the pallet has to be deposited is full (A trailer can contain only a maximum of three pallets). If the AVG is available and the trailer is empty, information is sent to the forklift for it to come and collect the load. The push buttons implemented are used to re-actualize the pallet count whenever a new trailer is available.

START

DELAY N

IS INFO AVAILABLE?

Y DISPLAY TO LCD Y

Page | 82

Autonomous Forklift

N DELAY IS AGV AVAILABLE?

IS COUNTER < 4? Y N INCREMENT COUNTER

CHECK PUSHBUTTON STATUS

SEND INFO TO FORKLIFT

IS BUTTON HIGH?

DELAY N

RE-ACTUALIZE COUNTER
Figure 6.2: Arduino Nano Flowchart

Page | 83

Autonomous Forklift
6.3 Forklift Software Design
The program uploaded to the AGV is explained in more detail in the section below. The program consists of two main parts the setup program and the main loop.

6.3.1 Setup Program

The setup program defines all the input and output ports associated with the different components. But a sub-program was also included, so as to calibrate the center LDRs. As it was discussed in the Electronic Design section LDRs are affected by ambient light conditions. To calibrate the latter, the AGV is first place in the middle of the path and then the sub-program explained in Figure 6.3 is run. Note that the typical values of the LDRs under any light condition, is less than 4.

START

COUNTER = 0

REF_LDR_CR=5 REF_LDR_CL=5

IS COUNTER >30 ?

N STOP

Page | 84

Autonomous Forklift

READ LDR_CR READ LDR_CL

IS REF_LDR_CL > LCDR_CL? Y N

SET REF_LDR_CL = LDR_CL

IS REF_LDR_CR > LCDR_CR?

Y SET REF_LDR_CR = LDR_CR

INCREMENT COUNTER

DELAY
Figure 6.3: Setup Program Flowchart

Page | 85

Autonomous Forklift
The Table 6.1 shows the shows the values of the LDRs in different conditions, after having run the sub-program.
Table 6.1: Typical LDR Values

LDRs Position LDR value LEFT On Black Surface On White Surface 1 6 CENTER-LEFT REF_LDR_CL > REF_LDR_CL CENTER-RIGHT REF_LDR_CR > REF_LDR_CR RIGHT 1 5

6.3.2 Main Loop Program

After having run the setup program, the main loop program would be run indefinitely on the microcontroller. The main loop would go through the following steps explained in Figure 6.4. Each of the steps would be discussed in greater detail in the following sections. The main loop program will be based on the predefined path in Appendix F.

START

STOP

RADIO AVAILABILITY

RADIO PACKAGE

FWD

Page | 86

Autonomous Forklift

FWD_JUNCTION

LOWER FORK

FWD NO ULTRASOUND

RAISE FORK

TURN CLOCKWISE

FWD

TARGET

TURN ANTICLOCKWISE

FWD DELIVERY

LOWER FORK

Page | 87

Autonomous Forklift

REV

TURN CLOCKWISE

LOCATION

TURN CLOCKWISE
Figure 6.4: Main Loop Flowchart

6.3.2.1 Stop

The stop function is used to set the inputs of the H-bridges and buzzer with the logic 0 via the shift register. START

SET DIR=0

SHIFTOUT DIR

STOP

Figure 6.5: Stop Flowchart

Page | 88

Autonomous Forklift
6.3.2.2 Radio Availability

This function informs the central PC that the forklift is available for operation.

START

SET TRANSCEIVER TO TRANSMITTER MODE

TRANSMIT AVAILABILITY

STOP

Figure 6.6: Radio Availability Flowchart

6.3.2.3 Radio Package

The following loop is repeated until information about the presence of a load and the specific trailer into which it has to be loaded is available.

Page | 89

Autonomous Forklift

START

SET TRANSCEIVER TO RECEIVER MODE

N IS LOAD AVAILABLE?

TRAILER TO BE LOADED

TRAILER A

TRAILER B

TRAILER C

SET DESTINATION=1 LOCATION=1

SET DESTINATION=2 LOCATION=2

SET DESTINATION=3 LOCATION=3

STOP

Figure 6.7: Radio Package Flowchart

Page | 90

Autonomous Forklift
6.3.2.4 Forward The control of the forward drive of the robot is based on the readings obtained from the central LDRs. START

SET DIR=5

SHIFTOUT DIR

Y STOP IS LDR LEFT =1?

OBSTACLE DETECTION FUNCTION

IS LDR_CL> REF_LDR_CL ?
N

SET MOTOR LEFT = PWM MOTOR RIGHT=0 Y SET MOTOR LEFT = 0 MOTOR RIGHT=PWM

IS LDR_CR> REF_LDR_CR ? N SET MOTOR LEFT = PWM MOTOR RIGHT=PWM


Figure 6.8: Forward Flowchart

Page | 91

Autonomous Forklift
6.3.2.5 Obstacle Detection

It is used to detect any obstruction found within 25cm of the AGV. In case of an obstacle the latter stops immediately and if the path is not cleared within a predefined time period the central PC is informed and a buzzer is sounded. START

TRIGGER SOUNDWAVE

LISTEN FOR ECHO

CALCULATE DISTANCE

RETURN PWM =200

IS DISTANCE >25 CM?

N START COUNTER

RETURN PWM =0

DELAY

Page | 92

Autonomous Forklift

INCREMENT COUNTER

IS DISTANCE >25 CM?


N

DELAY

IS COUNTER > 30?

Y SET RADIO TO TRANSMITTER MODE

TRANSMIT OBSTACLE INFO TO PC

BUZZER

DELAY
Figure 6.9: Obstacle Detection Flowchart

Page | 93

Autonomous Forklift
6.3.2.6 Forward Junction

The forklift detects the junctions in the line so that it becomes aware of its position. But for the latter not to detect the same junction twice the Forward Junction function is used.

START

SET MOTOR LEFT =225 MOTOR RIGHT=225

DELAY

SET MOTOR LEFT =0 MOTOR RIGHT=0

STOP
Figure 6.10: Forward Junction Flowchart

Page | 94

Autonomous Forklift
6.3.2.7 Lower Fork

START

SET DIR=16

SHIFTOUT DIR

N IS LIMIT SWITCH 1 CLOSED?

Y SET DIR=0

SHIFTOUT DIR

STOP
Figure 6.10: Lower Fork Flowchart

6.3.2.8 Forward No Ultrasound

This is simply a forward function without ultrasound, so that the AGV does not detect the load as an obstacle.

Page | 95

Autonomous Forklift

START

SET DIR=5

SHIFTOUT DIR

Y STOP IS LDR LEFT =1?

IS LDR_CL> REF_LDR_CL ?
N

SET MOTOR LEFT = PWM MOTOR RIGHT=0

IS LDR_CR> REF_LDR_CR ?

SET MOTOR LEFT = 0 MOTOR RIGHT=PWM

SET MOTOR LEFT = PWM MOTOR RIGHT=PWM


Figure 6.12: Forward No Ultrasound Flowchart

Page | 96

Autonomous Forklift
6.3.2.9 Raise Fork

START

SET DIR=32

SHIFTOUT DIR

IS LIMIT SWITCH 2 CLOSED?

Y SET DIR=0

SHIFTOUT DIR

STOP

Figure 6.13: Raise Fork Flowchart

Page | 97

Autonomous Forklift
6.3.2.10 Turn Clockwise START

SET DIR=6

SHIFTOUT DIR

SET MOTOR LEFT =200 MOTOR RIGH=200

DELAY

IS LDR_CL> REF_LDR_CL ?

N SET MOTOR LEFT =0 MOTOR RIGHT=0

STOP

Figure 6.14: Turn Clockwise Flowchart

Page | 98

Autonomous Forklift
6.3.2.11 Target

The target function is used as a counter so that the AGV knows which trailer to load. The junctions in the path, is used as a means to increment the function. The value set for DESTINATION in the Radio Package function is used for comparison.

START

SET JUNCTION=1

IS JUNCTION= DESTINATION?

STOP N CALL FORWARD JUNCTION FUNCTION

CALL FORWARD FUNCTION

INCREMENT JUNCTION
Figure 6.15: Target Flowchart

Page | 99

Autonomous Forklift
6.3.2.12 Turn Anticlockwise

START

SET DIR=9

SHIFTOUT DIR

SET MOTOR LEFT =200 MOTOR RIGH=200

DELAY

IS LDR_CR> REF_LDR_CR

N SET MOTOR LEFT =0 MOTOR RIGHT=0

STOP
Figure 6.16: Turn Anticlockwise Flowchart

Page | 100

Autonomous Forklift
6.3.2.13 Sonar Delivery

The sonar delivery function is used to monitor distance inside the trailer.

START

TRIGGER SOUNDWAVE

LISTEN FOR ECHO

CALCULATE DISTANCE

IS DISTANCE >15 CM? N RETURN MOTION =0


Figure 6.17: Sonar Delivery Flowchart

Y RETURN MOTION=1

6.3.2.14 Forward Delivery

The forward delivery function makes use of the sonar sensor as a distance measuring device. The forklift continues to move forward until the required distance between itself and the walls of the container or a previous load is not reached.

Page | 101

Autonomous Forklift

START

SET DIR=5

SHIFTOUT DIR

CALL SONAR DELIVERY FUNCTION

STOP N

IS MOTION =1?

Y Y IS LDR_CL> REF_LDR_CL ? N

SET MOTOR LEFT =150 MOTOR RIGHT=0

IS LDR_CR> REF_LDR_CR ?
N SET MOTOR LEFT =150 MOTOR RIGHT=150
Figure 6.18: Forward Delivery Flowchart

Y SET MOTOR LEFT = 0 MOTOR RIGHT=150

Page | 102

Autonomous Forklift
6.3.2.15 Reverse START

SET DIR=10

SHIFTOUT DIR

Y STOP IS LDR LEFT =1?

IS LDR_CL> REF_LDR_CL ? N

SET MOTOR LEFT = 0 MOTOR RIGHT=175

IS LDR_CR> REF_LDR_CR ?
N

Y SET MOTOR LEFT = 175 MOTOR RIGHT=0

SET MOTOR LEFT=175 MOTOR RIGHT=175


Figure 6.19: Reverse Flowchart

Page | 103

Autonomous Forklift
6.3.2.16 Location

The location is similar to the target function, but instead of detecting the trailer to be loaded. The location function is used to return the AGV to its initial position (parking area). START

SET PARKING = 4

IS PARKING = LOCATION?

STOP
N CALL FORWARD JUNCTION FUNCTION

CALL FORWARD FUNCTION

INCREMENT LOCATION
Figure 6.20: Location Flowchart

Page | 104

Autonomous Forklift
CHAPTER 7 : IMPLEMENTATION AND TESTING

7.1 Introduction
After having completed the mechanical, electronic and software design of both the central PC and forklift, they were both implemented and tested. The different problems encountered and solutions found are described in detail in Table 7.1 after the system was tested as a whole unit.

7.2 Problems and Solutions


Table 7.1: Problems and Solutions

Components or Functions

Problems

Causes

Solutions

LDR

Ultrasound

The readings obtained The current being from the LDRs were supplied to the LDRs fluctuating too much from the voltage in constant light regulator was too low. intensity The sensor indicated Again the current being obstacles found at 0cm supplied to the sensor form the AGV was too low. Due to the fact that the Arduino had now to power the LDRs and ultrasound.

Instead of connecting the supply to the voltage regulator it was connected to the +5V output pin on the microcontroller As the 9V battery could not supply the Arduino with enough current, it was replaced with four 1.5V batteries in series. Instead of using a paper background, a white melamine board which is more reflective was used. The orientation was changed and a fourth pair of wheels was added to the AGV.

Arduino Battery

Microcontroller had low current problem.

Line Follower

The AGV could not follow the black tape path. The tracks kept coming off the wheels, when the AGV was performing turns.

The black tape was glued on white paper and the latter was not reflecting enough light to the LDRs. The bad orientation of the wheels and lack of tension in the tracks.

Wheels and Track

All of the above problems were successfully solved and no further ones were found when the AGV was tested around the predefined path. Page | 105

Autonomous Forklift
7.3 Central PC
7.3.1 Machine Vision

The Roborealm program that was implemented was tested with barcodes generated using the code 128 barcode symbology. The program performed as intended by successfully being able to sort between the three different types of barcodes. The decode information was then passed to the Arduino Nano via USB.

Figure 7.1: Trailer A Barcode

Figure 7.2: Results of Roborealm

Page | 106

Autonomous Forklift
7.3.2 Arduino Nano The Nanos program worked flawlessly, it was able to establish wireless communications with the forklift and display essential information about the current status of the system via the 204 LCD. The data displayed by the LCD were the statuses of the AGV, the load present and the count of pallets already loaded in the trailers. Push buttons were also implemented to re-actualize the count as shown in figure 7.3.

Figure 7.3: Nano Interfaced with LCD and Transceiver

Page | 107

Autonomous Forklift
7.4 Forklift
After its complete construction the forklift was tested as a whole system. The software and electronic part worked faultlessly even if some slight minor modifications in the software were required. The connections between the shift register and the two motor ICs work as anticipated allowing a change in direction of the wheels, the upward and downward motion of the forks and finally the operation of the buzzer also. The AGV was able to follow the predefined path (Appendix F) and detect the junctions in the line to identify its position based on the readings obtained from the LDRs. The ultrasound sensor on board detected obstacles within a range of 25cm, which proved efficient along the path. But for better results while performing the trailer loading function this was reduced to 15cm, that corresponds to the sum of the width of the pallet and the minimum clearance required. The Nordic transceiver implemented on the first level of the AGV, operated as anticipated allowing the latter to establish two-way communication. The figure 7.4 shows the forklift after complete implementation with the fourth pair of wheels added.

Figure 7.4: Autonomous Forklift

Page | 108

Autonomous Forklift
CHAPTER 8 : CONCLUSION AND FUTHER WORKS

8.1 Conclusion
The aim set for this project was the design and implementation of a system capable of sorting loads and loading them into specific trailers by observing a loading pattern. Since the system is meant to operate in a human environment the design includes the necessary features to ensure the safety of any person who may be in the proximity of the forklift. To be able to meet the set aim a system comprising of two sub-systems mainly a central PC and forklift were investigated in the conceptual design. Where the problem of the selection of the most appropriate parts were addressed using the decision matrix method. A 3D design of the AGV was also prepared so as to a have better understanding of the mechanical design, which had to meet certain requirements such as preventing the forks from blocking the ultrasound sensor used for obstacle detection and trailer loading. The electronic design forms the major part of this thesis, here a problem of lack of output ports on the microcontroller selected; Arduino Duemilanove was encountered and solved by the use of a shift register. The latter was used to control the direction of rotation of the steering motors, forks motor and buzzer. This chapter also encompasses the implementation of the battery recharging circuit, sonar sensor, transceiver, motor ICs and line sensor (led and LDRs) for the AGV. For the central PC the electronic design on its part, involved the implementation of the transceiver and LCD module with the Arduino Nano. The software design consisted of three main programs, mainly; the machine vision used for the sorting process, the Arduino Nano (microcontroller connected to PC) for wireless communication and information display and that of the Arduino Duemilanove used for controlling the AGV. After implementation of the whole system, tests were carried to check whether the system was able to carry out all the required tasks successfully. The central PC is capable to sort out loads by use of machine vision and transmit the required data via RF. While on its part the, forklift designed is a line following robot that on reception of the information moved from its parking to the loading zone, where the latter collected the load. Along the way a non-contact form of obstacle detection using ultrasound was used for increased safety. After having loaded the pallet, the AGV continued on its path towards the specific trailer. This time, the Page | 109

Autonomous Forklift
forklift used the ultrasound sensor to measure distance, so as to precisely load the trailer according to a predefined loading pattern. Having successfully delivered the load the forklift returned to its parking zone to wait for further instructions from the central PC. The testing of the system concluded the successful realization of all the aims and objectives set in the introductory chapter.

8.2 Further Works


After completion of the project and having a clear idea of how the present system works, some of the new ways suggested to improve the system are as follows: 1. Design and implementation a charging area at the parking zone so that the AGVs can recharge their batteries without human intervention. 2. Use of wireless camera instead of LDRs for line following purposes. 3. Construction of more similar AGVs so that they can share the work load. 4. Substitution of track and wheels system by Omni directional wheels even if they are a lot more expensive. 5. Design of a graphical user interface for the operator to control the sorting process more efficiently.

Page | 110

Autonomous Forklift

BIBLIOGRAPHY
REFERENCES

1. Wikipedia (2011) Automated Guided Vehicle, [online] Available at: http://en.wikipedia.org/wiki/Automated_guided_vehicle [Accessed: 27th Aug 2011]. 2. Groover, M. (2001) Automation, Production Systems, and ComputerIntegrated Manufacturing, 2nd ed. New Jersey: Prentice Hall, p.282-283. 3. JBT Corporation (2011) AGV safety, [online] Available at: http://www.jbtcagv.com/en/knowledge/safety [Accessed: 28th Nov 2011]. 4. Wikimheda (2011) Automated Guided Vehicles, [online] Available at: http://www.wikimheda.org/wiki/AGV [Accessed: 27th Aug 2011]. 5. JBT Corporation (2011) AGV safety, [online] Available at: http://www.jbtcagv.com/en/knowledge/safety [Accessed: 28th Nov 2011]. 6. Wikimheda (2011) Forklift Truck, [online] Available at: http://www.wikimheda.org/wiki/Forklift_truck [Accessed: 25 Aug 2011]. 7. SDI (2011) Carton and box sorter machine, [online] Available at: http://www.sdipromech.com/index.php/sorting_systems/carton_box_sorting% 20machine [Accessed: 28th Nov 2011]. 8. Keyence Corporation (2011) Card Box Conveyors, [online]. Available at: http://www.keyence.co.uk/products/barcode/barcode/bl700/bl700_applications _1_1.php [Accessed: 29 November 11]. 9. S-Elektronik (2011) E-Jet, [online] Available at: http://www.selektronik.de/77-0-E-JET+english.html [Accessed: 29th Nov 2011]. 10. S-Elektronik, (2011), E-Jet [online]. Available at: http://www.selektronik.de/77-0-E-JET+english.html [Accessed: 29 November 11]. 11. Daifuku Webb Company (2009) SmartLoader, [online] Available at: http://www.jervisbwebb.com/Products/automatic_trailer_loading.aspx?pid=19 0&qs=1_3 [Accessed: 29th Nov 2011]. 12. Egemin (2011) Automatic Trailer Loading Solutions, [online] Available at: http://www.egeminusa.com/pages/solutions/agv_solutions_atl.html [Accessed: 29th Nov 2011]. 13. Verifiedlabel (2012) Top Eight Benefits of Barcodes - Verified, Inc.. [online] Available at: http://www.verifiedlabel.com/knowledgecenter/know_barcodes.aspx [Accessed: 22 Feb 2012]. 14. Bin95.com (2012) RFID Training Download (RFID Training Technology course download). [online] Available at: http://www.bin95.com/BarCode_RFID.htm [Accessed: 22 Feb 2012].

Page | 111

Autonomous Forklift
15. Small Business Trends (2012) QR Codes, Barcodes and RFID: Whats the Difference? [image online] Available at: http://smallbiztrends.com/2011/02/qr-codes-barcodes-rfid-difference.html [Accessed: 22 Feb 2012]. 16. Buzzle (2012) What is Barcode Scanner. [image online] Available at: http://www.buzzle.com/articles/what-is-barcode-scanner.html [Accessed: 22 Feb 2012]. 17. Roborealm (2005) Barcode Reader. [online] Available at: http://www.roborealm.com/help/Barcode.php [Accessed: 22 Feb 2012]. 18. Sparkfun (2011) GainSpan WiFi Breakout - SparkFun Electronics. [online] Available at: http://www.sparkfun.com/products/10505 [Accessed: 22 Feb 2012]. 19. Digi (2003) ZigBee Wireless Standard - Technology - Digi International. [online] Available at: http://www.digi.com/technology/rf-articles/wirelesszigbee [Accessed: 22 Feb 2012]. 20. Sparkfun (2011) XBee 1mW Wire Antenna - Series 1 (802.15.4) - SparkFun Electronics. [online] Available at: http://www.sparkfun.com/products/8665 [Accessed: 22 Feb 2012]. 21. Nordicsemi (2000) nRF24L01+ - 2.4GHz RF - Products - Nordic Semiconductor. [online] Available at: http://www.nordicsemi.com/kor/Products/2.4GHz-RF/nRF24L01P [Accessed: 22 Feb 2012]. 22. Iteadstudio (2012) 2.4G Wireless nRF24L01+ Module. [image online] Available at: http://iteadstudio.com/store/index.php?main_page=product_info&cPath=7&pr oducts_id= [Accessed: 22 Feb 2012]. 23. Acroname.com (2011) Sharp IR Rangers Information. [online] Available at: http://www.acroname.com/robotics/info/articles/sharp/sharp.html [Accessed: 7 Mar 2012]. 24. Sparkfun.com (2012) Infrared proximity sensor. [image online] Available at: http://dlnmh9ip6v2uc.cloudfront.net/images/products/00242-1_i_ma.jpg [Accessed: 7 Mar 2012]. 25. Jaktek.com (n.d.) HC-SR04 Ultrasonic Sensor | JAKTEK. [online] Available at: http://jaktek.com/?wpsc-product=hc-sr04-ultrasonic-sensor [Accessed: 8 Mar 2012]. 26. En.wikipedia.org (2012) Global Positioning System - Wikipedia, the free encyclopedia. [online] Available at: http://en.wikipedia.org/wiki/Global_Positioning_System [Accessed: 9 Mar 2012]. 27. Robotoid.com (n.d.) My First Robot - Getting Started with Robotics. [online] Available at: http://www.robotoid.com/my-first-robot/rbb-bot-phase1part1.html [Accessed: 9 Mar 2012].

Page | 112

Autonomous Forklift
28. Beam-wiki.org (2012) Steering Techniques - BEAM Robotics Wiki. [online] Available at: http://www.beam-wiki.org/wiki/Steering_Techniques [Accessed: 10 Mar 2012]. 29. En.wikipedia.org (2011) Mecanum wheel - Wikipedia, the free encyclopedia. [online] Available at: http://en.wikipedia.org/wiki/Mecanum_wheel [Accessed: 10 Mar 2012]. 30. Gizmodir (2012) Airtrax Sidewinder Omni. [image online] Available at: http://www.gizmodir.com/wp-content/uploads/2011/05/Directional-LiftTrucks.jpg [Accessed: 10 Mar 2012]. 31. Humanoid-robotics (2012) Robot Kit with Mecanum Wheels. [image online] Available at: http://www.humanoidrobotics.com/product_images/uploaded_images/mechanum3.jpg [Accessed: 10 Mar 2012]. 32. Superdroidrobots (2012) Track and Wheel Set. [image online] Available at: http://www.superdroidrobots.com/images/TAM-008-000.gif [Accessed: 10 Mar 2012]. 33. Robotshop.com (2008) Drive Motor Sizing Tutorial - RobotShop Learning Center. [online] Available at: http://www.robotshop.com/ca/drive-motortutorial.html [Accessed: 10 Mar 2012]. 34. Tamiya (2012) Double Gearbox. [image online] Available at: http://www.tamiyausa.com/images/product/430/89918/header_89918.jpg [Accessed: 10 Mar 2012]. 35. TowerHobbies (2012) Tamiya Double Gearbox. [image online] Available at: http://pics.towerhobbies.com/image/t/tamx8118.jpg [Accessed: 11 Mar 2012]. 36. Brain, M. (2000) HowStuffWorks "How Electronic Gates Work". [online] Available at: http://electronics.howstuffworks.com/digital-electronics4.htm [Accessed: 12 Mar 2012]. 37. WhatCircuits (2012) LM317 calculator. [image online] Available at: http://www.whatcircuits.com/online_tools/images/lm317.png [Accessed: 12 Mar 2012]. 38. Sparkfun.com (n.d.) H-Bridge Motor Driver 1A - SparkFun Electronics. [online] Available at: http://www.sparkfun.com/products/315 [Accessed: 12 Mar 2012]. 39. Beam-wiki.org (2012) Reducing Motor Noise - BEAM Robotics Wiki. [online] Available at: http://www.beamwiki.org/wiki/Reducing_Motor_Noise#Single_Capacitor_Filtering [Accessed: 13 Mar 2012]. 40. Sparkfun.com (2010) Basic 20x4 Character LCD - Black on Green 5V SparkFun Electronics. [online] Available at: http://www.sparkfun.com/products/256 [Accessed: 13 Mar 2012]. 41. Roborealm.com (2000) Robotic Machine Vision Software. [online] Available at: http://www.roborealm.com/ [Accessed: 14 Mar 2012]. 42. Arduino.cc (n.d.) Arduino - PWM. [online] Available at: http://arduino.cc/it/Tutorial/PWM [Accessed: 25 Mar 2012]. Page | 113

Autonomous Forklift

APPENDIX
APPENDIX A

Page | 114

Autonomous Forklift

Class 1 forklift - Electric Motor Rider Trucks


Lift Code 1 - Counterbalanced rider type, stand up Lift Code 4 - Three wheel electric truck, sit down Lift Code 5 - Counterbalanced rider type, cushion tires, sit down Lift Code 6 - Counterbalanced rider, pneumatic or either tire type, sit down, high or low platform

Class 2 forklift - Electric Motor Narrow Aisle Trucks


Lift Code 1 - High lift straddle Lift Code 2 - Order picker Lift Code 3 - Reach type outrigger Lift Code 4 - Side loaders, turret trucks, swing mast and convertible turret/stock pickers Lift Code 6 Low lift pallet and platform (rider)

Class 3 forklift - Electric Motor Hand Trucks


Lift Code 1 - Low lift platform Lift Code 2 - Low lift walkie pallet Lift Code 3 - Tractors (draw bar pull under 999 lbs.) Lift Code 4 - Low lift walkie/center control Lift Code 5 - Reach type outrigger Lift Code 6 - High lift straddle Lift Code 7 - High lift counterbalanced Lift Code 8 - Low Lift Walkie/Rider Pallet

Class 4 forklift - Internal Combustion Engine Trucks - Cushion Tires Only

Lift Code 3 - Fork, counterbalanced (cushion tire)

Class 5 forklift - Internal Combustion Engine Trucks - Pneumatic Tires Only

Lift Code 4 - Fork, counterbalanced (pneumatic tire)

Class 6 forklift - Electric and Internal Combustion Engine Tow Tractors Page | 115

Autonomous Forklift

Lift Code 1 - Sit-down rider (draw bar pull over 999 lbs.)

Class 7 forklift - Rough Terrain Fork Lift Trucks

Lift Code 1 - All rough terrain lift trucks

Class 8 forklift - Personnel and Burden Carriers

Lift Code 1 - All personnel and burden carriers

APPENDIX B MOTOR TORQUE CALCULATION

Resolving the forces in the X-Y plane.

m.gx=mg sin ()
= 2 9.81 sin (5o) =1.710 N

m.gy=mg cos ()
= 2 9.81 cos (5o) =19. 55 N
For the forklift not to slide down the incline there must be friction between the wheel and surface.

Page | 116

Autonomous Forklift

Rotations of wheel = (speed 60) / circumference of wheel = (0.05 60) / 0.0152 = 31.83 rpm Torque = Force due to friction radius of wheel T =fR

Resolution of forces along the X plane. Fx = M.a = M. gx + f M.a = M.g sin () + T/R

T = {a + g sin ()} M R = {0.1 + 9.81 sin (5o)} 2 0.015 = 0.0286 Nm (for 2 motors)

Torque required by each motor is: T/2 = 0.0143 Nm Considering that each motor would have an efficiency of 65% Require Torque by each motor = (100 /65) 0.0143 = 0.0220 Nm

Page | 117

Autonomous Forklift
APPENDIX C PWM Pulse width modulation (PWM) was the method used for the project to control the cruising speed of the AGV. The latter was required to have a relatively fast travelling speed while moving along the path and a slow one while performing turns and delivering pallets in the trailers. PWM is a technique used to alter the voltage delivered to the motors, by supplying the latter with an average voltage generated from a fixed one (5V). Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion of the time the signal spends on versus the time that the signal spends off. The duration of "on time" is called the pulse width.

For the Arduino the function that is used to generate the PWM is called analogWrite. A call to analogWrite() is on a scale of 0 - 255, such that analogWrite(255) requests a 100% duty cycle (always on), and analogWrite(127) is a 50% duty cycle (on half the time). [42]

Page | 118

Autonomous Forklift

APPENDIX D ELECTRONIC CIRCUITS

Central PC:

Page | 119

Autonomous Forklift
Forklift:

Page | 120

Autonomous Forklift

Page | 121

Autonomous Forklift

Page | 122

Autonomous Forklift

Page | 123

Autonomous Forklift
APPENDIX E 3D DRAWINGS & PICTURES

TOP VIEW

Page | 124

Autonomous Forklift

BOTTOM VIEW

Page | 125

Autonomous Forklift

SIDE VIEW

Page | 126

Autonomous Forklift

BACK VIEW

Page | 127

Autonomous Forklift

FRONT VIEW

Page | 128

Autonomous Forklift
APPENDIX F PREDEFINED PATH

Page | 129

Autonomous Forklift
APPENDIX G PROGRAMMING

Central PC: Roborealm:

Arduino Nano:

#include <SPI.h> #include "nRF24L01.h" #include "RF24.h" #include "printf.h" #include <LiquidCrystal.h>

LiquidCrystal lcd(7, 6, 5, 4, 3, 2); RF24 radio(9,10); const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL }; char val; int availability=0; int numA=0; // number of pallets int numB=0; Page | 130

Autonomous Forklift
int numC=0; int present =0;

void setup() { lcd.begin(20,4); Serial.begin(9600); printf_begin();

radio.begin();

radio.setRetries(15,15);

radio.setPayloadSize(8);

radio.openWritingPipe(pipes[0]); radio.openReadingPipe(1,pipes[1]); lcd.setCursor (0,1); lcd.print("PALLETE:"); lcd.setCursor (0,2); lcd.print("TRAILER:"); lcd.setCursor (8,2); lcd.print("A"); lcd.setCursor (14,2); lcd.print("B"); lcd.setCursor(19,2); lcd.print("C");

Page | 131

Autonomous Forklift

radio.startListening();

radio.printDetails(); }

void loop() { if ( radio.available() ) { unsigned long package; bool done = false; while (!done) { done = radio.read( &package, sizeof(unsigned long) );

switch (package) { case 80 ://P Serial.println("FORKLIFT AVAILABLE"); lcd.setCursor (0,0); lcd.print("FORKLIFT AVAILABLE "); availability =1; break;

Page | 132

Autonomous Forklift
case 68://D Serial.println("PALLETE DELIVERED"); lcd.setCursor (0,0); lcd.print("PALLETE DELIVERED "); break;

case 79://O Serial.println("OBSTACLE DETECTED"); lcd.setCursor (0,0); lcd.print("OBSTACLE DETECTED "); break;

case 88://X Serial.println("PERFORMING ACTION"); lcd.setCursor (0,0); lcd.print("PERFORMING ACTION "); break; }

delay(20); }

if ( Serial.available() >0) { val = Serial.read();

Page | 133

Autonomous Forklift

switch (val) { case 'A': numA++; Serial.print(numA); Serial.println("\t Pallet A "); lcd.setCursor (8,1); lcd.print("A present =65; break; ");

case 'B': numB++; Serial.print(numB); Serial.println("\t Pallet B"); lcd.setCursor (8,1); lcd.print("B present =66; break; ");

case 'C': numC++; Serial.print(numC); Serial.println("\t Pallet C"); lcd.setCursor (8,1); lcd.print("C ");

Page | 134

Autonomous Forklift
present =67; break;

case 'U': Serial.println("Pallet UNAVAILABLE"); lcd.setCursor (8,1); lcd.print("UNAVAILABLE"); present =0; break; } }

if ( availability ==1 && numA >=1 && numA <=3 && present==65) { delay(500); Serial.println("message sent to forklift"); radio.stopListening();

unsigned long pallete = 65; //A bool ok = radio.write( &pallete, sizeof(unsigned long) ); availability =0; present =0; radio.startListening();

if ( availability ==1 && numB >=1 && numB <=3 && present==66)

Page | 135

Autonomous Forklift
{ delay(500); Serial.println("message sent to forklift"); radio.stopListening();

unsigned long pallete = 66; //B bool ok = radio.write( &pallete, sizeof(unsigned long) ); availability =0; present=0; radio.startListening();

if ( availability ==1 && numC >=1 && numC <=3 && present==67) { delay(500); Serial.println("message sent to forklift"); radio.stopListening();

unsigned long pallete = 67; //C bool ok = radio.write( &pallete, sizeof(unsigned long) ); availability =0; present=0; radio.startListening();

Page | 136

Autonomous Forklift
lcd.setCursor(8,3); lcd.print(numA); lcd.setCursor(14,3); lcd.print(numB); lcd.setCursor(19,3); lcd.print(numC); { int sensorA= analogRead (A1); int sensorB= analogRead (A2); int sensorC= analogRead (A0);

if (sensorA > 1000) { numA=0; delay (1000); }

if (sensorB > 1000) { numB=0; delay (1000); } if (sensorC > 1000) { numC=0; delay (1000); } }

Page | 137

Autonomous Forklift
Forklift:

#include <SPI.h> #include "nRF24L01.h" #include "RF24.h" #include "printf.h"

//Pin connected to ST_CP of 74HC595 int latchPin = 2; //Pin connected to SH_CP of 74HC595 int clockPin = 4; ////Pin connected to DS of 74HC595 int dataPin = 3; //Direction int dir=0; int pwm=255; int timer=0;

//SONAR int Trig=6; int Echo=5; long duration,cm;

//LDR int LDR_R=0; int LDR_L=0; int LDR_CL=0;

Page | 138

Autonomous Forklift
int LDR_CR=0;

//

int referenceCL=5; int newval_CL; int referenceCR=5; int newval_CR; // int destination=0; int package2=0; int junction=0; int motion=0; int locations=0; int parking; int obstacle=0; int message_sent=0; int counter=0; int Limit_S=0;

RF24 radio(7,8);

const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };

Page | 139

Autonomous Forklift
void setup(void) {

Serial.begin(9600); pinMode(clockPin, OUTPUT); pinMode(dataPin, OUTPUT); pinMode(latchPin, OUTPUT); pinMode(9,OUTPUT); //motor right pinMode(10,OUTPUT); //motor left

digitalWrite(latchPin, LOW);

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH);

printf_begin(); radio.begin();

radio.setRetries(15,15);

radio.setPayloadSize(8);

radio.openWritingPipe(pipes[1]); radio.openReadingPipe(1,pipes[0]);

Page | 140

Autonomous Forklift

radio.startListening(); // radio listen

radio.printDetails(); { while (counter !=30) { newval_CL = analogRead(A1); newval_CR = analogRead(A2); newval_CL=map( newval_CL,0,1023,0,10); newval_CR=map( newval_CR,0,1023,0,20);

if (referenceCL > newval_CL) { referenceCL = newval_CL; }

if (referenceCR >newval_CR) { referenceCR = newval_CR; } delay(500); counter++;

Page | 141

Autonomous Forklift
Serial.print("centre_left="); Serial.print(referenceCL); Serial.print("centre_right="); Serial.print(referenceCR); delay(2000); }

void loop(void) {

Stp(); radio_Availability(); radio_Package(); radio_Action(); Setfwd(); Fwd(); //w ultra Fwd_Junction(); Stp(); Lower(); delay(2000); Stp(); Setfwd(); Fwd_noultra(); //without ultra Stp(); delay(2000);

Page | 142

Autonomous Forklift
Raise(); delay(2000); Stp(); Setturn_cw(); Turn_cw(); Stp(); delay(2000); Setfwd(); Fwd(); Target(); fwd_1(); Stp(); Setturn_acw(); Turn_acw(); Stp(); delay(1000); Setfwd(); Fwd_Delivery(); Stp(); delay(2000); Lower(); delay(2000); Stp(); radio_Delivery(); Stp(); delay(1000); Setrev();

Page | 143

Autonomous Forklift
Rev(); Stp(); Raise(); delay(2000); Stp(); Setfwd(); fwd_2(); Stp(); Setturn_cw(); Turn_cw_left(); Stp(); Setfwd(); Fwdclear(); Fwd(); Location(); Stp(); Setturn_cw(); Turn_cw(); Stp();

void Stp() { dir =0; digitalWrite(latchPin, LOW);

Page | 144

Autonomous Forklift
shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); }

void radio_Availability() {

radio.stopListening(); unsigned long stat = 80 ; bool ok = radio.write( &stat, sizeof(unsigned long) ); delay (20); radio.startListening();

void radio_Package() { while ( package2==0) {

if ( radio.available() ) { unsigned long package; bool done = false; while (!done) {

Page | 145

Autonomous Forklift
done = radio.read( &package, sizeof(unsigned long) ); }

switch (package) { case 65: destination=1; locations=1; package2++; break; case 66: destination=2; locations=2; package2++; break; case 67: destination=3; locations=3; package2++; break; } } } }

void radio_Action()

Page | 146

Autonomous Forklift
{ radio.stopListening(); unsigned long stat = 88 ; bool ok = radio.write( &stat, sizeof(unsigned long) ); delay (20); radio.startListening(); package2=0; }

void Setfwd() { dir =5; digitalWrite(latchPin, LOW);

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); }

void Fwd() { LDR_L = analogRead(A0); LDR_R = analogRead(A3); LDR_L=map( LDR_L,0,1023,0,10); LDR_R=map( LDR_R,0,1023,0,50);

Page | 147

Autonomous Forklift
while ( LDR_L !=1) { timer= millis()%2000; if( timer==0) { sonar(); } LDR_L = analogRead(A0); LDR_CL = analogRead(A1); LDR_CR = analogRead(A2); LDR_R = analogRead(A3); LDR_L=map( LDR_L,0,1023,0,10); LDR_CL=map( LDR_CL,0,1023,0,10); LDR_CR=map( LDR_CR,0,1023,0,20); LDR_R=map( LDR_R,0,1023,0,50);

if (LDR_CL > referenceCL)//2//3 { analogWrite(10,pwm); analogWrite(9,0); // sonar();

else if ( LDR_CR > referenceCR)//3//2 {

Page | 148

Autonomous Forklift
analogWrite(9,pwm); analogWrite(10,0); // sonar();

else { analogWrite(10,pwm); analogWrite(9,pwm); //sonar();

analogWrite(9,0); analogWrite(10,0);

void sonar() { pinMode(Trig,OUTPUT); //sending of soundwave digitalWrite(Trig,LOW); delayMicroseconds(2); digitalWrite(Trig,HIGH);

Page | 149

Autonomous Forklift
delayMicroseconds(10); digitalWrite(Trig,LOW);

pinMode(Echo,INPUT);// reflected sondwave duration =pulseIn (Echo,HIGH); // time duration in between cm = microsecondsToCentimeters(duration);

if (cm > 25 || cm ==0) { pwm = (225); if (message_sent==1) { radio_Action(); message_sent=0; }

} else { pwm=0; obstacle++; if (obstacle==30) { radio.stopListening(); unsigned long stat = 68 ; bool ok = radio.write( &stat, sizeof(unsigned long) ); delay (20);

Page | 150

Autonomous Forklift
radio.startListening(); buzzer(); obstacle=0; message_sent=1; }

} }

long microsecondsToCentimeters(long microseconds) {

return microseconds / 29 / 2; }

void buzzer () { Stp(); dir =64; digitalWrite(latchPin, LOW);

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); delay (5000); Stp();

Page | 151

Autonomous Forklift
Setfwd(); }

void Fwd_Junction() {

analogWrite(9,225); analogWrite(10,225);

delay(500);

analogWrite(9,0); analogWrite(10,0);

void Lower() { dir =16; digitalWrite(latchPin, LOW);

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); delay(300);

Page | 152

Autonomous Forklift
Limit_S=analogRead(A5);

while (Limit_S <500) { Limit_S=analogRead(A5); } dir =0; digitalWrite(latchPin, LOW);

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); }

void Fwd_noultra() { LDR_L = analogRead(A0); LDR_R = analogRead(A3); LDR_L=map( LDR_L,0,1023,0,10); LDR_R=map( LDR_R,0,1023,0,50); while ( LDR_L !=1) {

LDR_L = analogRead(A0); LDR_CL = analogRead(A1); LDR_CR = analogRead(A2); LDR_R = analogRead(A3);

Page | 153

Autonomous Forklift
LDR_L=map( LDR_L,0,1023,0,10); LDR_CL=map( LDR_CL,0,1023,0,10); LDR_CR=map( LDR_CR,0,1023,0,20); LDR_R=map( LDR_R,0,1023,0,50);

if (LDR_CL > referenceCL)//2//3 { analogWrite(10,225); analogWrite(9,0); // sonar();

else if ( LDR_CR > referenceCR)//3//2 { analogWrite(9,225); analogWrite(10,0); // sonar();

else { analogWrite(10,225); analogWrite(9,225); //sonar();

Page | 154

Autonomous Forklift

analogWrite(9,0); analogWrite(10,0);

void Raise() { dir =32; digitalWrite(latchPin, LOW);

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); delay(300);

Limit_S=analogRead(A5);

while (Limit_S <500) { Limit_S=analogRead(A5); }

Page | 155

Autonomous Forklift
dir =0; digitalWrite(latchPin, LOW);

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); }

void Setturn_cw() //cw { delay(250); dir =6; digitalWrite(latchPin, LOW);

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); }

void Turn_cw() { analogWrite(9,200); analogWrite(10,200); delay (2000);

LDR_CR = analogRead(A2);

Page | 156

Autonomous Forklift
LDR_CR=map( LDR_CR,0,1023,0,20);

while (LDR_CR >referenceCR) //2//3 here:2 { analogWrite(9,175); analogWrite(10,175); LDR_CR = analogRead(A2); LDR_CR=map( LDR_CR,0,1023,0,20);

} analogWrite(9,0); analogWrite(10,0);

void Target() { junction++;

while ( junction != destination) { Fwd_Junction(); Fwd(); //w ultra junction++; } }

Page | 157

Autonomous Forklift

void Setturn_acw() //acw { delay(250); dir =9; digitalWrite(latchPin, LOW);

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); }

void Turn_acw() { analogWrite(9,200); analogWrite(10,200); delay (800); LDR_CL = analogRead(A1); LDR_CL=map( LDR_CL,0,1023,0,10); while ( LDR_CL >referenceCL) //3//2 { LDR_CL = analogRead(A1); LDR_CL=map( LDR_CL,0,1023,0,10);

analogWrite(9,200); analogWrite(10,200);

Page | 158

Autonomous Forklift
}

delay(300); //

analogWrite(9,0); analogWrite(10,0);

void Fwd_Delivery() { sonar_d(); while ( motion ==1) { timer= millis()%750; if( timer==0) { sonar_d(); } LDR_L = analogRead(A0); LDR_CL = analogRead(A1); LDR_CR = analogRead(A2); LDR_R = analogRead(A3); LDR_L=map( LDR_L,0,1023,0,10); LDR_CL=map( LDR_CL,0,1023,0,10);

Page | 159

Autonomous Forklift
LDR_CR=map( LDR_CR,0,1023,0,20); LDR_R=map( LDR_R,0,1023,0,50);

if (LDR_CL > referenceCL)//2//3 { analogWrite(10,150); analogWrite(9,0); // sonar();

else if ( LDR_CR > referenceCR)//3//2 { analogWrite(9,150); analogWrite(10,0); // sonar();

else { analogWrite(10,150); analogWrite(9,150); //sonar();

Page | 160

Autonomous Forklift

analogWrite(9,0); analogWrite(10,0);

void sonar_d() { pinMode(Trig,OUTPUT); //sending of soundwave digitalWrite(Trig,LOW); delayMicroseconds(2); digitalWrite(Trig,HIGH); delayMicroseconds(10); digitalWrite(Trig,LOW);

pinMode(Echo,INPUT);// reflectedd sondwave duration =pulseIn (Echo,HIGH); // time duration in between cm = microsecondsToCentimeters(duration);

if (cm > 14) { motion = 1;

Page | 161

Autonomous Forklift
} else { motion =0;

} //Serial.println(duration); Serial.println(cm); //delay(300); }

void radio_Delivery() { radio.stopListening(); unsigned long stat = 68 ; bool ok = radio.write( &stat, sizeof(unsigned long) ); delay (20); radio.startListening();

void Setrev() { delay(250); dir =58; digitalWrite(latchPin, LOW);

Page | 162

Autonomous Forklift

shiftOut(dataPin, clockPin, MSBFIRST, dir);

digitalWrite(latchPin, HIGH); }

void Rev () { LDR_L = analogRead(A0); LDR_R = analogRead(A3); LDR_L=map( LDR_L,0,1023,0,10); LDR_R=map( LDR_R,0,1023,0,50); while ( LDR_L !=1) { analogWrite(10,175); analogWrite(9,175); LDR_L = analogRead(A0); LDR_L=map( LDR_L,0,1023,0,10);

analogWrite(9,0); analogWrite(10,0);

Page | 163

Autonomous Forklift
void Location() { parking=4; locations++; while ( locations!= parking) { Fwd_Junction(); Fwd(); //w ultra locations++;

} }

void Turn_cw_left() { analogWrite(9,175); analogWrite(10,175); delay (1500);

LDR_CR = analogRead(A2); LDR_CR=map( LDR_CR,0,1023,0,20);

while (LDR_CR >referenceCR) //2//3 here:2 { analogWrite(9,175); analogWrite(10,175);

Page | 164

Autonomous Forklift
LDR_CR = analogRead(A2); LDR_CR=map( LDR_CR,0,1023,0,20);

analogWrite(9,0); analogWrite(10,0);

void Fwdclear() { LDR_L = analogRead(A0); LDR_R = analogRead(A3); LDR_L=map( LDR_L,0,1023,0,10); LDR_R=map( LDR_R,0,1023,0,50); while ( LDR_L ==1) {

LDR_L = analogRead(A0); LDR_CL = analogRead(A1); LDR_CR = analogRead(A2); LDR_R = analogRead(A3); LDR_L=map( LDR_L,0,1023,0,10); LDR_CL=map( LDR_CL,0,1023,0,10); LDR_CR=map( LDR_CR,0,1023,0,20);

Page | 165

Autonomous Forklift
LDR_R=map( LDR_R,0,1023,0,50);

if (LDR_CL > referenceCL)//2//3 { analogWrite(10,200); analogWrite(9,0); // sonar();

else if ( LDR_CR > referenceCR)//3//2 { analogWrite(9,200); analogWrite(10,0); // sonar();

else { analogWrite(10,200); analogWrite(9,200); //sonar();

Page | 166

Autonomous Forklift
}

analogWrite(9,0); analogWrite(10,0);

void fwd_1() { analogWrite(9,200); analogWrite(10,200); delay(250); analogWrite(9,0); analogWrite(10,0); }

void fwd_2() { analogWrite(9,175); analogWrite(10,175); delay(800); analogWrite(9,0); analogWrite(10,0); }

Page | 167

Autonomous Forklift
APPENDIX H COST OF MATERIALS

Component Arduino Duemilanove Arduino Nano HD44780 204 LCD Toggle switch Push button switch Ultrasonic HC-SR04 Tamiya double gearbox Tamiya track & wheel set USB PC webcam NRF24L01 (transceiver) IC L293D IC 74HC595 10K potentiometer LM7805 LM317 LDR PCB 90mm70mm PCB 90mm12mm Capacitors, Resistors & Resonators Led HDPE board Buzzer TOTAL/Rs

Quantity 1 1 1 3 7 1 1 1 1 2 2 1 10 2 1 5 4 1 10 1 1

Cost/Rs 540.00 600.00 315.00 60.00 35.00 180.00 420.00 210.00 135.00 210.00 120.00 45.00 60.00 55.00 30.00 90.00 100.00 30.00 150.00 50.00 90.00 15.00 3540.00

Page | 168

Autonomous Forklift
APPENDIX I DATASHEETS

Page | 169

Tech Support: services@elecfreaks.com

Ultrasonic Ranging Module HC - SR04


Product features:
Ultrasonic ranging module HC - SR04 provides 2cm - 400cm non-contact measurement function, the ranging accuracy can reach to 3mm. The modules includes ultrasonic transmitters, receiver and control circuit. The basic principle of work: (1) Using IO trigger for at least 10us high level signal, (2) The Module automatically sends eight 40 kHz and detect whether there is a pulse signal back. (3) IF the signal back, through high level , time of high output IO duration is the time from sending ultrasonic to returning. Test distance = (high level timevelocity of sound (340M/S) / 2,

Wire connecting direct as following:


5V Supply Trigger Pulse Input Echo Pulse Output 0V Ground

Electric Parameter
Working Voltage Working Current Working Frequency Max Range Min Range MeasuringAngle Trigger Input Signal Echo Output Signal Dimension DC 5 V 15mA 40Hz 4m 2cm 15 degree 10uS TTL pulse Input TTL lever signal and the range in proportion 45*20*15mm

Vcc Trig

Echo

GND

Timing diagram
The Timing diagram is shown below. You only need to supply a short 10uS pulse to the trigger input to start the ranging, and then the module will send out an 8 cycle burst of ultrasound at 40 kHz and raise its echo. The Echo is a distance object that is pulse width and the range in proportion .You can calculate the range through the time interval between sending trigger signal and receiving echo signal. Formula: uS / 58 = centimeters or uS / 148 =inch; or: the range = high level time * velocity (340M/S) / 2; we suggest to use over 60ms measurement cycle, in order to prevent trigger signal to the echo signal.

Attention:
The module is not suggested to connect directly to electric, if connected electric, the GND terminal should be connected the module first, otherwise, it will affect the normal work of the module. When tested objects, the range of area is not less than 0.5 square meters and the plane requests as smooth as possible, otherwise ,it will affect the results of measuring. www.Elecfreaks.com

A7800 SERIES POSITIVE-VOLTAGE REGULATORS


SLVS056J MAY 1976 REVISED MAY 2003

D D D

3-Terminal Regulators Output Current up to 1.5 A Internal Thermal-Overload Protection


KC (TO-220) PACKAGE (TOP VIEW)

D D D

High Power-Dissipation Capability Internal Short-Circuit Current Limiting Output Transistor Safe-Area Compensation
KTE PACKAGE (TOP VIEW)

COMMON

COMMON

OUTPUT COMMON INPUT


KCS (TO-220) PACKAGE (TOP VIEW)

OUTPUT COMMON INPUT

COMMON

OUTPUT COMMON INPUT

description/ordering information
This series of fixed-voltage integrated-circuit voltage regulators is designed for a wide range of applications. These applications include on-card regulation for elimination of noise and distribution problems associated with single-point regulation. Each of these regulators can deliver up to 1.5 A of output current. The internal current-limiting and thermal-shutdown features of these regulators essentially make them immune to overload. In addition to use as fixed-voltage regulators, these devices can be used with external components to obtain adjustable output voltages and currents, and also can be used as the power-pass element in precision regulators. ORDERING INFORMATION
TJ VO(NOM) (V) PACKAGE POWER-FLEX (KTE) 5 TO-220 (KC) TO-220, short shoulder (KCS) POWER-FLEX (KTE) 8 TO-220 (KC) TO-220, short shoulder (KCS) 10 0C to 125C 12 POWER-FLEX (KTE) TO-220 (KC) POWER-FLEX (KTE) TO-220 (KC) TO-220, short shoulder (KCS) POWER-FLEX (KTE) 15 TO-220 (KC) TO-220, short shoulder (KCS) 24 POWER-FLEX (KTE) TO-220 (KC) Reel of 2000 Tube of 50 Tube of 20 Reel of 2000 Tube of 50 Tube of 20 Reel of 2000 Tube of 50 Reel of 2000 Tube of 50 Tube of 20 Reel of 2000 Tube of 50 Tube of 20 Reel of 2000 Tube of 50 ORDERABLE PART NUMBER A7805CKTER A7805CKC A7805CKCS A7808CKTER A7808CKC A7808CKCS A7810CKTER A7810CKC A7812CKTER A7812CKC A7812CKCS A7815CKTER A7815CKC A7815CKCS A7824CKTER A7824CKC TOP-SIDE MARKING A7805C A7805C A7808C A7808C A7810C A7810C A7812C A7812C A7815C A7815C A7824C

A7824C Package drawings, standard packing quantities, thermal data, symbolization, and PCB design guidelines are available at www.ti.com/sc/package.

Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
Copyright 2003, Texas Instruments Incorporated

PRODUCTION DATA information is current as of publication date. Products conform to specifications per the terms of Texas Instruments standard warranty. Production processing does not necessarily include testing of all parameters.

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

A7800 SERIES POSITIVE-VOLTAGE REGULATORS


SLVS056J MAY 1976 REVISED MAY 2003

APPLICATION INFORMATION
+V 0.33 F A78xx +VO 0.1 F

Figure 1. Fixed-Output Regulator

+ VI

IN

A78xx COM

OUT IL

VO

Figure 2. Positive Regulator in Negative Configuration (VI Must Float)

Input

A78xx IO 0.33 F R2 R1

Output

0.1 F

NOTE A: The following formula is used when Vxx is the nominal output voltage (output to common) of the fixed regulator: VO

+V )
xx

V xx R1

)I

R2

Figure 3. Adjustable-Output Regulator

Input 0.33 F

A78xx VO(Reg) R1 Output IO IO = (VO/R1) + IO Bias Current

Figure 4. Current Regulator

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

LM317 3-TERMINAL ADJUSTABLE REGULATOR


SLVS044O SEPTEMBER 1997 REVISED JULY 2003

D D

Output Voltage Range Adjustable From 1.25 V to 37 V Output Current Greater Than 1.5 A
KC (TO-220) PACKAGE (TOP VIEW)

D D D

Internal Short-Circuit Current Limiting Thermal Overload Protection Output Safe-Area Compensation
KTE PACKAGE (TOP VIEW)

OUTPUT

OUTPUT

INPUT OUTPUT ADJ

INPUT OUTPUT ADJUST

KCS (TO-220) PACKAGE (TOP VIEW)

DCY (SOT-223) PACKAGE (TOP VIEW)

OUTPUT

OUTPUT

INPUT OUTPUT ADJ

INPUT OUTPUT ADJUST

description/ordering information
The LM317 is an adjustable three-terminal positive-voltage regulator capable of supplying more than 1.5 A over an output-voltage range of 1.25 V to 37 V. It is exceptionally easy to use and requires only two external resistors to set the output voltage. Furthermore, both line and load regulation are better than standard fixed regulators. ORDERING INFORMATION
TJ PACKAGE POWER-FLEX (KTE) 0C to 125C SOT-223 SOT 223 (DCY) TO-220 (KC) TO-220, short shoulder (KCS) Reel of 2000 Tube of 80 Reel of 2500 Tube of 50 Tube of 20 ORDERABLE PART NUMBER LM317KTER LM317DCY LM317DCYR LM317KC LM317KCS TOP-SIDE MARKING LM317 L3 LM317

Package drawings, standard packing quantities, thermal data, symbolization, and PCB design guidelines are available at www.ti.com/sc/package.

Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
Copyright 2003, Texas Instruments Incorporated

PRODUCTION DATA information is current as of publication date. Products conform to specifications per the terms of Texas Instruments standard warranty. Production processing does not necessarily include testing of all parameters.

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

LM317 3-TERMINAL ADJUSTABLE REGULATOR


SLVS044O SEPTEMBER 1997 REVISED JULY 2003

APPLICATION INFORMATION
D1 (Note E) 1N4002

VI

Input

LM317

Output

VO (Note C) R1 240

Adjust IAdj Vref = 1.25 V

D2 (Note E) 1N4002 CO (Note B) 1.0 F

Ci (Note A) 0.1 F

R2

CADJ (Note D)

NOTES: A. Ci is not required, but is recommended, particularly if the regulator is not in close proximity to the power-supply filter capacitors. A 0.1-F disc or 1-F tantalum provides sufficient bypassing for most applications, especially when adjustment and output capacitors are used. B. CO improves transient response, but is not needed for stability. C. VO is calculated as shown:

VO

+V

ref

) R ) (I R
2 1

Adj

R 2)

Because IAdj typically is 50 A, it is negligible in most applications. D. CADJ is used to improve ripple rejection; it prevents amplification of the ripple as the output voltage is adjusted higher. If CADJ is used, it is best to include protection diodes. E. If the input is shorted to ground during a fault condition, protection diodes provide measures to prevent the possibility of external capacitors discharging through low-impedance paths in the IC. By providing low-impedance discharge paths for CO and CADJ, respectively, D1 and D2 prevent the capacitors from discharging into the output of the regulator.

Figure 1. Adjustable Voltage Regulator

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

L293, L293D QUADRUPLE HALF-H DRIVERS


SLRS008B SEPTEMBER 1986 REVISED JUNE 2002

D D D D D D D D D D

Featuring Unitrode L293 and L293D Products Now From Texas Instruments Wide Supply-Voltage Range: 4.5 V to 36 V Separate Input-Logic Supply Internal ESD Protection Thermal Shutdown High-Noise-Immunity Inputs Functional Replacements for SGS L293 and SGS L293D Output Current 1 A Per Channel (600 mA for L293D) Peak Output Current 2 A Per Channel (1.2 A for L293D) Output Clamp Diodes for Inductive Transient Suppression (L293D)

N, NE PACKAGE (TOP VIEW)

1,2EN 1A 1Y HEAT SINK AND GROUND 2Y 2A VCC2

1 2 3 4 5 6 7 8

16 15 14 13 12 11 10 9

VCC1 4A 4Y HEAT SINK AND GROUND 3Y 3A 3,4EN

DWP PACKAGE (TOP VIEW)

description
The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed to provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. Both devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads in positive-supply applications.

1,2EN 1A 1Y NC NC NC HEAT SINK AND GROUND NC NC 2Y 2A VCC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14

28 27 26 25 24 23 22 21 20 19 18 17 16 15

VCC1 4A 4Y NC NC NC HEAT SINK AND GROUND NC NC 3Y 3A 3,4EN

All inputs are TTL compatible. Each output is a complete totem-pole drive circuit, with a Darlington transistor sink and a pseudo-Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN. When an enable input is high, the associated drivers are enabled and their outputs are active and in phase with their inputs. When the enable input is low, those drivers are disabled and their outputs are off and in the high-impedance state. With the proper data inputs, each pair of drivers forms a full-H (or bridge) reversible drive suitable for solenoid or motor applications. On the L293, external high-speed output clamp diodes should be used for inductive transient suppression. A VCC1 terminal, separate from VCC2, is provided for the logic inputs to minimize device power dissipation. The L293and L293D are characterized for operation from 0C to 70C.

Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
Copyright 2002, Texas Instruments Incorporated

PRODUCTION DATA information is current as of publication date. Products conform to specifications per the terms of Texas Instruments standard warranty. Production processing does not necessarily include testing of all parameters.

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

L293, L293D QUADRUPLE HALF-H DRIVERS


SLRS008B SEPTEMBER 1986 REVISED JUNE 2002

block diagram
VCC1 1 0 1 0 1 2 1 3 4 M 5 6 2 1 0 7 8 3 10 9 4 14 13 12 11

16 15 1 0 M

1 0 1 0 M

VC NOTE: Output diodes are internal in L293D. TEXAS INSTRUMENTS AVAILABLE OPTIONS PACKAGE TA PLASTIC DIP (NE) L293NE L293DNE

0C to 70C

AVAILABLE OPTIONS PACKAGED DEVICES TA SMALL OUTLINE (DWP) L293DWP L293DDWP PLASTIC DIP (N) L293N L293DN

0C to 70C

The DWP package is available taped and reeled. Add the suffix TR to device type (e.g., L293DWPTR).

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

L293, L293D QUADRUPLE HALF-H DRIVERS


SLRS008B SEPTEMBER 1986 REVISED JUNE 2002

FUNCTION TABLE (each driver) INPUTS OUTPUT A H L X EN H H L Y H L Z

H = high level, L = low level, X = irrelevant, Z = high impedance (off) In the thermal shutdown mode, the output is in the high-impedance state, regardless of the input levels.

logic diagram
1A 1,2EN 2A 2 1 7

3A 3,4EN 4A

10 9 15

schematics of inputs and outputs (L293)


EQUIVALENT OF EACH INPUT VCC1 Current Source

Input

GND

POST OFFICE BOX 655303

1Y

2Y

11

3Y

14

4Y

TYPICAL OF ALL OUTPUTS VCC2

Output

GND

DALLAS, TEXAS 75265

L293, L293D QUADRUPLE HALF-H DRIVERS


SLRS008B SEPTEMBER 1986 REVISED JUNE 2002

APPLICATION INFORMATION
VCC2 SES5001 M1 SES5001 M2 3A 10 8 1/2 L293 4, 5, 12, 13 GND 9 4A 15 EN 14 16 VCC1 H H L EN 3A H L X Run Free-running motor stop M1 Fast motor stop 4A H L X Run Fast motor stop Free-running motor stop M2

11

L = low, H = high, X = dont care

Figure 4. DC Motor Controls (connections to ground and to supply voltage)


VCC2 2 SES5001

M 2 SES5001 2A 7 8 1/2 L293 4, 5, 12, 13 GND 1 6 3 2 16 VCC1 1A EN H H H H L EN L = low, H = high, X = dont care 1A L H L H X 2A H L L H X FUNCTION Turn right Turn left Fast motor stop Fast motor stop Fast motor stop

Figure 5. Bidirectional DC Motor Control

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

SN54HC595, SN74HC595 8 BIT SHIFT REGISTERS WITH 3 STATE OUTPUT REGISTERS


SCLS041G DECEMBER 1982 REVISED FEBRUARY 2004

D 8-Bit Serial-In, Parallel-Out Shift D Wide Operating Voltage Range of 2 V to 6 V D High-Current 3-State Outputs Can Drive Up D D D D D
To 15 LSTTL Loads Low Power Consumption, 80-A Max ICC Typical tpd = 13 ns 6-mA Output Drive at 5 V Low Input Current of 1 A Max Shift Register Has Direct Clear

SN54HC595 . . . J OR W PACKAGE SN74HC595 . . . D, DB, DW, N, OR NS PACKAGE (TOP VIEW)

QB QC QD QE QF QG QH GND

1 2 3 4 5 6 7 8

16 15 14 13 12 11 10 9

VCC QA SER OE RCLK SRCLK SRCLR QH

description/ordering information
The HC595 devices contain an 8-bit serial-in, parallel-out shift register that feeds an 8-bit D-type storage register. The storage register has parallel 3-state outputs. Separate clocks are provided for both the shift and storage register. The shift register has a direct overriding clear (SRCLR) input, serial (SER) input, and serial outputs for cascading. When the output-enable (OE) input is high, the outputs are in the high-impedance state. Both the shift register clock (SRCLK) and storage register clock (RCLK) are positive-edge triggered. If both clocks are connected together, the shift register always is one clock pulse ahead of the storage register. ORDERING INFORMATION
TA PDIP N PACKAGE Tube of 25 Tube of 40 SOIC D 40C to 85C SOIC DW SOP NS SSOP DB CDIP J 55 C 125C 55C to 125 C CFP W LCCC FK Reel of 2500 Reel of 250 Tube of 40 Reel of 2000 Reel of 2000 Reel of 2000 Tube of 25 Tube of 150 Tube of 55 ORDERABLE PART NUMBER SN74HC595N SN74HC595D SN74HC595DR SN74HC595DT SN74HC595DW SN74HC595DWR SN74HC595NSR SN74HC595DBR SNJ54HC595J SNJ54HC595W SNJ54HC595FK HC595 HC595 HC595 SNJ54HC595J SNJ54HC595W HC595 TOP-SIDE MARKING SN74HC595N SN54HC595 . . . FK PACKAGE (TOP VIEW)

QC QB NC VCC QA QD QE NC QF QG
4 5 6 7 8 3 2 1 20 19 18 17 16 15 14 9 10 11 12 13

SER OE NC RCLK SRCLK

QH

GND NC Q H

NC No internal connection

SNJ54HC595FK Package drawings, standard packing quantities, thermal data, symbolization, and PCB design guidelines are available at www.ti.com/sc/package.

Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
PRODUCTION DATA information is current as of publication date. Products conform to specifications per the terms of Texas Instruments standard warranty. Production processing does not necessarily include testing of all parameters.

On products compliant to MIL PRF 38535, all parameters are tested unless otherwise noted. On all other products, production processing does not necessarily include testing of all parameters.

Copyright 2004, Texas Instruments Incorporated

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

SRCLR

SCLS041G DECEMBER 1982 REVISED FEBRUARY 2004

SN54HC595, SN74HC595 8 BIT SHIFT REGISTERS WITH 3 STATE OUTPUT REGISTERS


FUNCTION TABLE INPUTS SER X X X L H X SRCLK X X X X SRCLR X X L H H X RCLK X X X X X OE H L X X X X FUNCTION Outputs QAQH are disabled. Outputs QAQH are enabled. Shift register is cleared. First stage of the shift register goes low. Other stages store the data of previous stage, respectively. First stage of the shift register goes high. Other stages store the data of previous stage, respectively. Shift-register data is stored in the storage register.

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

SN54HC595, SN74HC595 8 BIT SHIFT REGISTERS WITH 3 STATE OUTPUT REGISTERS


SCLS041G DECEMBER 1982 REVISED FEBRUARY 2004

logic diagram (positive logic)


OE RCLK SRCLR SRCLK SER 13 12 10 11 14 1D C1 R 3R C3 3S

15

QA

2S 2R C2 R

3R C3 3S

QB

2S 2R C2 R

3R C3 3S

QC

2S 2R C2 R

3R C3 3S

QD

2S 2R C2 R

3R C3 3S

QE

2S 2R C2 R

3R C3 3S

QF

2S 2R C2 R

3R C3 3S

QG

2S 2R C2 R Pin numbers shown are for the D, DB, DW, J, N, NS, and W packages.

3R C3 3S

QH QH

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

SCLS041G DECEMBER 1982 REVISED FEBRUARY 2004

SN54HC595, SN74HC595 8 BIT SHIFT REGISTERS WITH 3 STATE OUTPUT REGISTERS


timing diagram
SRCLK

SER

RCLK

SRCLR

OE

QA

QB

QC

QD

QE

QF

QG

QH

QH NOTE:

implies that the output is in 3-State mode.

POST OFFICE BOX 655303

DALLAS, TEXAS 75265

HD44780U (LCD-II)
(Dot Matrix Liquid Crystal Display Controller/Driver)

ADE-207-272(Z) '99.9 Rev. 0.0 Description


The HD44780U dot-matrix liquid crystal display controller and driver LSI displays alphanumerics, Japanese kana characters, and symbols. It can be configured to drive a dot-matrix liquid crystal display under the control of a 4- or 8-bit microprocessor. Since all the functions such as display RAM, character generator, and liquid crystal driver, required for driving a dot-matrix liquid crystal display are internally provided on one chip, a minimal system can be interfaced with this controller/driver. A single HD44780U can display up to one 8-character line or two 8-character lines. The HD44780U has pin function compatibility with the HD44780S which allows the user to easily replace an LCD-II with an HD44780U. The HD44780U character generator ROM is extended to generate 208 5 8 dot character fonts and 32 5 10 dot character fonts for a total of 240 different character fonts. The low power supply (2.7V to 5.5V) of the HD44780U is suitable for any portable battery-driven product requiring low power dissipation.

Features
5 8 and 5 10 dot matrix possible Low power operation support: 2.7 to 5.5V Wide range of liquid crystal display driver power 3.0 to 11V Liquid crystal drive waveform A (One line frequency AC waveform) Correspond to high speed MPU bus interface 2 MHz (when VCC = 5V) 4-bit or 8-bit MPU interface enabled 80 8-bit display RAM (80 characters max.) 9,920-bit character generator ROM for a total of 240 character fonts 208 character fonts (5 8 dot) 32 character fonts (5 10 dot)

HD44780U
Pin Functions
Signal RS No. of Lines 1 I/O I Device Interfaced with MPU Function Selects registers. 0: Instruction register (for write) Busy flag: address counter (for read) 1: Data register (for write and read) Selects read or write. 0: Write 1: Read Starts data read/write. Four high order bidirectional tristate data bus pins. Used for data transfer and receive between the MPU and the HD44780U. DB7 can be used as a busy flag. Four low order bidirectional tristate data bus pins. Used for data transfer and receive between the MPU and the HD44780U. These pins are not used during 4-bit operation. Clock to latch serial data D sent to the extension driver Clock to shift serial data D Switch signal for converting the liquid crystal drive waveform to AC Character pattern data corresponding to each segment signal Common signals that are not used are changed to non-selection waveforms. COM9 to COM16 are non-selection waveforms at 1/8 duty factor and COM12 to COM16 are non-selection waveforms at 1/11 duty factor. Segment signals Power supply for LCD drive VCC V5 = 11 V (max) VCC: 2.7V to 5.5V, GND: 0V When crystal oscillation is performed, a resistor must be connected externally. When the pin input is an external clock, it must be input to OSC1.

R/W

MPU

E DB4 to DB7

1 4

I I/O

MPU MPU

DB0 to DB3

I/O

MPU

CL1 CL2 M D

1 1 1 1

O O O O O

Extension driver Extension driver Extension driver Extension driver LCD

COM1 to COM16 16

SEG1 to SEG40 40 V1 to V5 VCC, GND OSC1, OSC2 5 2 2

LCD Power supply Power supply Oscillation resistor clock

nRF24L01+
Single Chip 2.4GHz Transceiver

Product Specification v1.0


Key Features
Worldwide 2.4GHz ISM band operation 250kbps, 1Mbps and 2Mbps on air data rates Ultra low power operation 11.3mA TX at 0dBm output power 13.5mA RX at 2Mbps air data rate 900nA in power down 26A in standby-I On chip voltage regulator 1.9 to 3.6V supply range Enhanced ShockBurst Automatic packet handling Auto packet transaction handling 6 data pipe MultiCeiver Drop-in compatibility with nRF24L01 On-air compatible in 250kbps and 1Mbps with nRF2401A, nRF2402, nRF24E1 and nRF24E2 Low cost BOM 60ppm 16MHz crystal 5V tolerant inputs Compact 20-pin 4x4mm QFN package

Applications
Wireless PC Peripherals Mouse, keyboards and remotes 3-in-1 desktop bundles Advanced Media center remote controls VoIP headsets Game controllers Sports watches and sensors RF remote controls for consumer electronics Home and commercial automation Ultra low power sensor networks Active RFID Asset tracking systems Toys

All rights reserved. Reproduction in whole or in part is prohibited without the prior written permission of the copyright holder. September 2008

nRF24L01+ Product Specification 1.1 Features

Features of the nRF24L01+ include: Radio Worldwide 2.4GHz ISM band operation 126 RF channels Common RX and TX interface GFSK modulation 250kbps, 1 and 2Mbps air data rate 1MHz non-overlapping channel spacing at 1Mbps 2MHz non-overlapping channel spacing at 2Mbps Transmitter Programmable output power: 0, -6, -12 or -18dBm 11.3mA at 0dBm output power Receiver Fast AGC for improved dynamic range Integrated channel filters 13.5mA at 2Mbps -82dBm sensitivity at 2Mbps -85dBm sensitivity at 1Mbps -94dBm sensitivity at 250kbps RF Synthesizer Fully integrated synthesizer No external loop filer, VCO varactor diode or resonator Accepts low cost 60ppm 16MHz crystal Enhanced ShockBurst 1 to 32 bytes dynamic payload length Automatic packet handling Auto packet transaction handling 6 data pipe MultiCeiver for 1:6 star networks Power Management Integrated voltage regulator 1.9 to 3.6V supply range Idle modes with fast start-up times for advanced power management 26A Standby-I mode, 900nA power down mode Max 1.5ms start-up from power down mode Max 130us start-up from standby-I mode Host Interface 4-pin hardware SPI Max 10Mbps 3 separate 32 bytes TX and RX FIFOs 5V tolerant inputs Compact 20-pin 4x4mm QFN package

Revision 1.0

Page 8 of 78

nRF24L01+ Product Specification 2 2.1 Pin Information Pin assignment


DVDD IREF
16

VSS

VDD

20

19

18

CE

VSS
17

15

VDD

CSN

14

VSS

nRF24L01+
SCK
3 13

ANT2

QFN20 4X4 MOSI


4 12

ANT1

MISO

11

VDD_PA

10

IRQ

VDD

VSS

XC2

Figure 2. nRF24L01+ pin assignment (top view) for the QFN20 4x4 package

Revision 1.0

Page 10 of 78

XC1

nRF24L01+ Product Specification 2.2 Pin functions


Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Name CE CSN SCK MOSI MISO IRQ VDD VSS XC2 XC1 VDD_PA Pin function Digital Input Digital Input Digital Input Digital Input Digital Output Digital Output Power Power Analog Output Analog Input Power Output RF RF Power Power Analog Input Power Power Power Output Power Description Chip Enable Activates RX or TX mode SPI Chip Select SPI Clock SPI Slave Data Input SPI Slave Data Output, with tri-state option Maskable interrupt pin. Active low Power Supply (+1.9V - +3.6V DC) Ground (0V) Crystal Pin 2 Crystal Pin 1 Power Supply Output (+1.8V) for the internal nRF24L01+ Power Amplifier. Must be connected to ANT1 and ANT2 as shown in Figure 32. Antenna interface 1 Antenna interface 2 Ground (0V) Power Supply (+1.9V - +3.6V DC) Reference current. Connect a 22k resistor to ground. See Figure 32. Ground (0V) Power Supply (+1.9V - +3.6V DC) Internal digital supply output for de-coupling purposes. See Figure 32. Ground (0V)

ANT1 ANT2 VSS VDD IREF VSS VDD DVDD VSS

Table 1. nRF24L01+ pin function

Revision 1.0

Page 11 of 78

S-ar putea să vă placă și