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
Page | i
TABLE OF CONTENTS
Table of Contents INTRODUCTION ............................................................................. 1 CHAPTER 1 :
Advantages of AGVs........................................................................................ 2 1.1
Problem Definition & Aims.............................................................................. 2 1.2
System Description .......................................................................................... 3 1.3
Thesis Structure................................................................................................ 4 1.4
CHAPTER 2 : LITTERATURE OVERVIEW ........................................................... 5
2.1 Introduction ................................................................................................. 5
2.2 Industrial Forklifts ....................................................................................... 5
2.3 Autonomous Navigation .............................................................................. 5
2.4 Sorting......................................................................................................... 7
2.5 Guide Tape AGV......................................................................................... 7
2.6 Trailer Loading AGV .................................................................................. 8
CONCEPTUAL DESIGN ................................................................ 10 CHAPTER 3 :
Introduction .................................................................................................... 10 3.1
System Block Diagram ................................................................................... 10 3.2
3.2.1 Central PC ........................................................................................................... 10
3.2.2 Autonomous Forklift ........................................................................................... 11
System Flow Chart ......................................................................................... 13 3.3
Conceptual Design ......................................................................................... 15 3.4
Central PC Design .......................................................................................... 16 3.5
3.5.1 Sorting ................................................................................................................ 16
3.5.2 Barcode Reader .................................................................................................. 19
3.5.3 Wireless Communicator...................................................................................... 20
Autonomous Forklift Design .......................................................................... 24 3.6
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
Autonomous Forklift
Page | ii
MECHANICAL DESIGN ................................................................ 42 CHAPTER 4 :
Introduction .................................................................................................... 42 4.1
Mechanical Structure ...................................................................................... 42 4.2
3D Design ...................................................................................................... 42 4.3
Structural Construction ................................................................................... 44 4.4
4.4.1 Design of Parts.................................................................................................... 44
Construction of Base ...................................................................................... 46 4.5
Assembly of Gearbox ..................................................................................... 48 4.6
Construction of Top Part ................................................................................ 49 4.7
Assembly of Tracks and Wheels ..................................................................... 50 4.8
Assembly of Forks ......................................................................................... 50 4.9
ELECTRONIC DESIGN.................................................................. 52 CHAPTER 5 :
Introduction .................................................................................................... 52 5.1
Forklift Electronic Design .............................................................................. 52 5.2
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
Central PC Electronic Design ......................................................................... 75 5.3
5.3.1 LCD ..................................................................................................................... 75
5.3.2 Nordic Transceiver .............................................................................................. 77
5.3.3 Push Buttons Switches ........................................................................................ 77
5.3.4 Microcontroller .................................................................................................. 78
SOFTWARE DESIGN ..................................................................... 81 CHAPTER 6 :
Introduction .................................................................................................... 81 6.1
Central PC Software Design ........................................................................... 81 6.2
6.2.1 Machine Vision ................................................................................................... 81
6.2.2 Arduino Nano ..................................................................................................... 82
Forklift Software Design ................................................................................ 84 6.3
Autonomous Forklift
Page | iii
6.3.1 Setup Program .................................................................................................... 84
6.3.2 Main Loop Program ............................................................................................ 86
IMPLEMENTATION AND TESTING .......................................... 105 CHAPTER 7 :
Introduction .................................................................................................. 105 7.1
Problems and Solutions ................................................................................ 105 7.2
Central PC .................................................................................................... 106 7.3
7.3.1 Machine Vision ................................................................................................. 106
7.3.2 Arduino Nano ................................................................................................... 107
Forklift ......................................................................................................... 108 7.4
CONCLUSION AND FUTHER WORKS ...................................... 109 CHAPTER 8 :
Conclusion ................................................................................................... 109 8.1
Further Works .............................................................................................. 110 8.2
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
Autonomous Forklift
Page | iv
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
Autonomous Forklift
Page | v
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
Autonomous Forklift
Page | vi
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
Autonomous Forklift
Page | vii
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
USB………………………………………………………………Universal Serial Bus
Autonomous Forklift
Page | viii
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.
I‟m 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.
Autonomous Forklift
Page | ix
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 University‟s “General Information to Students” Handbook (20…. /20….) and certify that the dissertation embodies the results of my
own work.
(ii) 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.
(iii) 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.
(iv) I am aware that I may have to forfeit the certificate/diploma/degree in the event that
plagiarism has been detected after the award.
(v) 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.
Signature: Date:
Autonomous Forklift
Page | x
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.
Autonomous Forklift
Page | 1
INTRODUCTION CHAPTER 1 :
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
1970‟s 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.
Autonomous Forklift
Page | 2
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.
Advantages of AGVs 1.1
The advantages offered by AGVs which have contributed to their increased popularity
are mainly: [5]
1. Improvement in safety with AGVs that move in a controlled and predictable
manner with safety sensors for obstacle detection.
2. Reduction of labor costs with fewer people to manoeuver forklifts and on the
loading dock.
3. Reduction in product damage with gentle and precise handling of loads.
4. Reduction in trailer waiting times with safe, reliable, and timely loading of
trailers.
5. Improvement of material tracking with computer controlled vehicles which
communicate with plant controls
6. No plant modifications or bulky conveyors needed as it accommodates standard,
over-the-road trailers and standard loading docks.
Problem Definition & Aims 1.2
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
Autonomous Forklift
Page | 3
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. Sorting of loads for delivery in specific trailer.
2. RF communication between central PC and forklift.
3. Ability of autonomous forklift to navigate through a predefined path.
4. Obstacle avoidance along path, through use of non-contact sensor for
increased security.
5. Loading of standard trailers in a specific pattern.
System Description 1.3
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.
Autonomous Forklift
Page | 4
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 900
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.
Thesis Structure 1.4
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.
Autonomous Forklift
Page | 5
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.
Autonomous Forklift
Page | 6
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])
Autonomous Forklift
Page | 7
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.
Autonomous Forklift
Page | 8
[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 over-
the-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.
Autonomous Forklift
Page | 9
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])
Autonomous Forklift
Page | 10
CONCEPTUAL DESIGN CHAPTER 3 :
Introduction 3.1
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.
System Block Diagram 3.2
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.
Autonomous Forklift
Page | 11
BARCODE MACHINE VISION
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.
WEBCAM
MICROCHIP
PUSH
BUTTON
A
PUSH
BUTTON
B
PUSH
BUTTON
C
LCD DISPLAY
WIRELESS
TRANSMITTER
Autonomous Forklift
Page | 12
Figure 3.2: AGV Block Diagram
MICROCHIP
ULTRASOUND
SENSOR
LINE FOLLOWER
SENSOR
TRANSCEIVER
MODULE
SHIFT
REGISTER
MOTOR
DRIVER IC
MOTOR
DRIVER IC
BUZZER
LIMIT
SWITCH
DC
MOTORS
FORK
MOTORS
Autonomous Forklift
Page | 13
System Flow Chart 3.3
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.
N
Y
N
Y
Figure 3.3: PC Flowchart
START
IS FORKLIFT
AVAILABLE?
SET
TRANSCEIVER
TO RECEIVER
DELAY
DECODE
SEND INFORMATION
TO MICROCONTROLLER
SET TRANSCEIVER
TO TRANSMITTER
TRANSMIT INFORMATION
TO FORKLIFT
DELAY IS PACKAGE
AVAILABLE?
Autonomous Forklift
Page | 14
N
Y
N
Y
N
START
SET TRANSCEIVER
TO TRANSMITTER
TRANSMIT
AVAILABILTY
SET TRANSCEIVER
TO RECEIVER
IS PACKAGE
AVAILABLE? DELAY
SET
DESTINATION
LINE
FOLLOWER
IS LOADING
AREA REACHED?
LOAD
PALLETE
LINE
FOLLOWER
IS DESTINATION
REACHED?
Autonomous Forklift
Page | 15
Y
N
Y
Y
Figure 3.4: AGV Flowchart
Conceptual Design 3.4
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
TURN LEFT ENTER
TRAILER
LINE
FOLLOWER
MIN.CLEARANCE
REACHED?
UNLOAD
PALLETE
EXIT TRAILER
TURN RIGHT
LINE
FOLLOWER
IS PARKING
AREA REACHED?
STOP
Autonomous Forklift
Page | 16
offered by each component but mainly on their ability to be easily integrated in the
design.
Central PC Design 3.5
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.
Autonomous Forklift
Page | 17
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.
Autonomous Forklift
Page | 18
[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 Pugh‟s
method was used as a means of comparison.
Table 3.1: Decision matrix for Sorting.
Barcodes RFID
Accuracy + + + +
Reliability + + +
Modifications + + +
Reading Speed + + +
Price + + - -
RESULTS
Pluses 8 7
Minuses 0 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.
Autonomous Forklift
Page | 19
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])
Autonomous Forklift
Page | 20
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.
Autonomous Forklift
Page | 21
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.
Autonomous Forklift
Page | 22
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.
Autonomous Forklift
Page | 23
[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 XBee Nordic
Range ++ + -
Power Consumption - - + ++
Ease of
Implementation
+ ++ +
Support of Networks + ++ ++
Cost - - - ++
RESULTS
Pluses 4 6 7
Minuses 4 1 1
Based on the above table the nRF24L01+ Nordic wireless module was selected as the
most suitable transceiver for the system.
Autonomous Forklift
Page | 24
Autonomous Forklift Design 3.6
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.
Autonomous Forklift
Page | 25
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)
Autonomous Forklift
Page | 26
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])
Autonomous Forklift
Page | 27
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
Autonomous Forklift
Page | 28
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.
Autonomous Forklift
Page | 29
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.
Autonomous Forklift
Page | 30
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.
Autonomous Forklift
Page | 31
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.
Autonomous Forklift
Page | 32
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]
Autonomous Forklift
Page | 33
3.6.3.4 Selection of Steering System
Table 3.3: Decision matrix for Steering System
Differential Ackerman Omnidirectional
Maneuverability + - ++
Stability + ++ ++
Ease of Programing ++ + +
In-place Rotation + - - ++
Cost ++ + -
RESULTS
Pluses 7 4 7
Minuses 0 3 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]
Autonomous Forklift
Page | 34
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 2 Kg
Radius of Wheel 0.015 m
Travelling Speed 5 cm/s
Rotations of Wheel 31.83 rpm
Acceleration 0.1 m2/s
Inclination 5o
Efficiency of Motors 65%
Autonomous Forklift
Page | 35
Torque Required by AGV 0.44 Nm
Torque Required per Wheel 0.22 Nm
Torque Required per Wheel 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 Tamiya‟s 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]
Autonomous Forklift
Page | 36
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 Num. of ports Type
Nordic Transceiver 5 Digital Output
LCD 6 Digital Output
Push Buttons 3 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.
Autonomous Forklift
Page | 37
Table 3.6: Components of AGV
Components Num. of ports Type
Nordic Transceiver 5 Digital Output
Motor Driver (×2) 12 Digital Output
Ultrasound Sensor 2 Digital Input & Output
LDR (×4) 4 Analog Input
Limit Switch (×2) 2 Analog Input
Buzzer 1 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])
Autonomous Forklift
Page | 38
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.
Autonomous Forklift
Page | 39
Figure 3.23: Arduino Duemilanove Board
(Source: Figure 1 in [Arduino.cc, 2009])
Advantages of Arduino Duemilanove:
1. Huge library available online for implementation with various
components.
2. Can be easily programmed via USB.
3. Relatively cheap.
4. Huge number of PWM ports.
5. Can be easily interfaced with software.
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.
Autonomous Forklift
Page | 40
Table 3.7: Decision matrix for Microcontroller Selection
PIC 16F877A ATmega 328
Ease of Programing - - ++
Num. of Ports ++ - -
Interface with
components
- - ++
Connectivity - ++
Cost + ++
RESULTS
Pluses 3 8
Minuses 5 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. Durability.
2. Good machinability.
3. Corrosion resistant.
4. Light weight.
5. Good toughness.
Autonomous Forklift
Page | 41
Table 3.8: Decision matrix for Material Selection
Stainless Steel
Plywood
High-density
polyethylene
(HDPE)
Durability ++ + ++
Machinability - - + ++
Light weight + ++ ++
Toughness ++ - - ++
Cost - - ++ +
RESULTS
Pluses 5 6 9
Minuses 4 2 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.
Autonomous Forklift
Page | 42
MECHANICAL DESIGN CHAPTER 4 :
Introduction 4.1
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.
Mechanical Structure 4.2
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.
3D Design 4.3
Based on the above considerations a 3D design of the AGV was made using Google
SketchUp to get a better understanding of the structure.
Autonomous Forklift
Page | 43
Figure 4.1: 3D Design Side View
Figure 4.2: 3D Design Back View
Autonomous Forklift
Page | 44
Figure 4.3: 3D Design Front View
Structural Construction 4.4
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.
Autonomous Forklift
Page | 45
Figure 4.4: HDPE Cutting Board
The dimension of each part is as follows:
Table 4.1: Dimension of Parts
Part Length /cm Width /cm Thickness /cm
TOP 12 7 0.4
BOTTOM 10 7 0.4
SIDE A 12 4 0.4
SIDE B 12 4 0.4
FORKS 7 2 0.4
Autonomous Forklift
Page | 46
The height of the base of the forklift would be 4 cm which would be enough to
accommodate the ultrasound sensor.
Construction of Base 4.5
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
Autonomous Forklift
Page | 47
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
Autonomous Forklift
Page | 48
Assembly of Gearbox 4.6
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
Autonomous Forklift
Page | 49
Construction of Top Part 4.7
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
Autonomous Forklift
Page | 50
Assembly of Tracks and Wheels 4.8
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
Assembly of Forks 4.9
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.
Autonomous Forklift
Page | 51
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
Autonomous Forklift
Page | 52
ELECTRONIC DESIGN CHAPTER 5 :
Introduction 5.1
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.
Forklift Electronic Design 5.2
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 Port Allocation
Vcc +5V source
Gnd Ground
Echo Arduino digital pin 5
Trig Arduino digital pin 6
Figure 5.1: HC-SR04 Module
(Source: Figure 1 in [Jaktek, n.d]) [25]
Autonomous Forklift
Page | 53
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. Rechargeable.
2. Width less than 7cm.
3. Relatively heavy so as to counter balance the weight of the forklift.
4. 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.
Autonomous Forklift
Page | 54
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.
Autonomous Forklift
Page | 55
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
Autonomous Forklift
Page | 56
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.
Autonomous Forklift
Page | 57
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
Autonomous Forklift
Page | 58
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
Autonomous Forklift
Page | 59
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 Input Voltage Output Voltage Use
LM7805 6V
(NiCd Battery)
+5V Motors
LM7805 9V
(Battery)
+5V ICs, LDRs, Limit
switch & Ultrasound
LM317 5V
(from LM7805)
+3.3V Transceiver
Autonomous Forklift
Page | 60
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.
Autonomous Forklift
Page | 61
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]
Autonomous Forklift
Page | 62
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.8×3.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
Autonomous Forklift
Page | 63
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. It can supply motors with voltages in the range of 4.5 to 36V.
2. It can provide a maximum of 1A to each motor.
3. It has two enable pins that can be used for PWM.
4. 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.
Autonomous Forklift
Page | 64
Table 5.3: L293D Features
Pin Number Name Function
1 Enable 1 To control motor 1 by
PWM
2 Input 1 To control direction of
rotation of motor 1
3 Output 1 Connected to terminal of
motor 1
4 0V Connected to GND or
heat sink
5 0V Connected to GND or
heat sink
6 Output 2 Connected to terminal of
motor 1
7 Input 2 To control direction of
rotation of motor 1
8 +V motor Connected to motor
supply voltage
9 Enable 2 To control motor 2 by
PWM
10 Input 3 To control direction of
rotation of motor 2
11 Output 3 Connected to terminal of
motor 2
12 0V Connected to GND or
heat sink
13 0V Connected to GND or
heat sink
14 Output 4 Connected to terminal of
motor 2
15 Input 4 To control direction of
rotation of motor 2
16 +V 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.
Autonomous Forklift
Page | 65
Table 5.4: L293D Logic
Enable
( EN1/EN2)
Input 1/3 Input 2/4 Function
High Low High Clockwise
High High Low Anti-clockwise
High Low Low Stop
High High High Stop
Low Not applicable Not applicable 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
Autonomous Forklift
Page | 66
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 Name Function
1 Q1 Output 1
2 Q2 Output 2
3 Q3 Output 3
4 Q4 Output 4
5 Q5 Output 5
6 Q6 Output 6
7 Q7 Output 7
8 GND Ground
9 Q7‟ Serial Out
10 MR Master Reclear
11 SH_CP Shift register clock pin
12 ST_CP Storage register clock pin
13 OE Output Enable
14 DS Serial data input
15 Q0 Output 0
16 Vcc 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
Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
Number
to be
shifted
1
2
4
8
16
32
64
128
Autonomous Forklift
Page | 67
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 Connected to Pin Connected to IC
Q1 Input 2 L293D (steering motors)
Q2 Input 3 L293D (steering motors)
Q3 Input 4 L293D (steering motors)
Q4 Input 1 L293D (fork motor)
Q5 Input 2 L293D (fork motor)
Q6 Buzzer -
Q7 - -
GND Ground supply -
Q7‟ - -
MR +5V -
SH_CP Digital Output 4 ATmega chip
ST_CP Digital Output 2 ATmega chip
OE Ground supply -
DS Digital Output 3 ATmega chip
Q0 Input 1 L293D (steering motors)
Vcc +5V -
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.
Autonomous Forklift
Page | 68
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.1µF capacitor was included across each motor to act as a short circuit for high-
frequency electrical noises. This reduces the unwanted fluctuations in voltage along
the motor wiring, especially at start up. [39]
Autonomous Forklift
Page | 69
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.
Autonomous Forklift
Page | 70
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
Number to be
shifted
Steering Motors
Fork
Motor
Buzzer
M1
(Right)
M2
(Left)
0 STOP STOP STOP OFF
1 FORWARD STOP STOP OFF
4 STOP FORWARD STOP OFF
5 FORWARD FORWARD STOP OFF
6 BACKWARD FORWARD STOP OFF
9 FORWARD BACKWARD STOP OFF
10 BACKWARD BACKWARD STOP OFF
16 STOP STOP DOWN OFF
32 STOP STOP UP OFF
64 STOP STOP STOP ON
Autonomous Forklift
Page | 71
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.
Autonomous Forklift
Page | 72
Table 5.9: Nordic Transceiver Connections.
Pin Number Name Connect to
1 GND Ground
2 3.3V +3.3V (LM317)
3 CE Arduino digital pin 7
4 CSN Arduino digital pin 8
5 SCK Arduino digital pin 13
6 MOSI Arduino digital pin 11
7 MISO 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
Autonomous Forklift
Page | 73
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 Arduino‟s
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.
Autonomous Forklift
Page | 74
Table 5.10: Different Connections of Arduino
Arduino Pin Connected To Pin Component
D0 -
D1 -
D2 ST_CP (12) 74HC595
D3 DS (14) 74HC595
D4 SH_CP (11) 74HC595
D5 Echo Ultrasound
D6 Trig Ultrasound
D7 CE (3) Transceiver
D8 CSN (4) Transceiver
D9 EN 1 (1) L293D
D10 EN 2 (9) L293D
D11 MOSI (6) Transceiver
D12 MISO (7) Transceiver
D13 SCK (5) Transceiver
A0 - Left LDR
A1 - Center Left LDR
A2 - Center Right LDR
A3 - Right LDR
A4 - Limit Switch
A5 - Limit Switch
Autonomous Forklift
Page | 75
Figure 5.26: Different Connections of Arduino
Central PC Electronic Design 5.3
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
20×4 character LCD with HD44780 parallel interface chipset was used [40]
.
Autonomous Forklift
Page | 76
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.
Autonomous Forklift
Page | 77
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.
Autonomous Forklift
Page | 78
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.
Autonomous Forklift
Page | 79
Table 5.11: Different Connections of Arduino Nano
Arduino Pin Connected To Pin Component
D0 - -
D1 - -
D2 DB7 LCD
D3 DB6 LCD
D4 DB5 LCD
D5 DB4 LCD
D6 E LCD
D7 RS LCD
D8 - -
D9 CE (3) Transceiver
D10 CSN (4) Transceiver
D11 MOSI (6) Transceiver
D12 MISO (7) Transceiver
D13 SCK (5) Transceiver
A0 - Switch 1
A1 - Switch 2
A2 - Switch 3
A3 - -
A4 - -
A5 - -
Autonomous Forklift
Page | 80
Figure 5.31: Different Connections of Arduino Nano
Autonomous Forklift
Page | 81
SOFTWARE DESIGN CHAPTER 6 :
Introduction 6.1
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.
Central PC Software Design 6.2
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.
N
Y
START
CAPTURE
IMAGE
IS LOAD
PRESENT?
Autonomous Forklift
Page | 82
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.
N
Y
Y
DECODE
IMAGE
SEND TRAILER
INFO TO ARDUINO
NANO VIA SERIAL
START
IS INFO
AVAILABLE? DELAY
DISPLAY TO LCD
Autonomous Forklift
Page | 83
N
Y
Y
N
N
Y
Figure 6.2: Arduino Nano Flowchart
INCREMENT
COUNTER
SEND INFO TO
FORKLIFT
CHECK PUSH-
BUTTON STATUS
IS COUNTER
< 4?
IS AGV
AVAILABLE? DELAY
IS BUTTON
HIGH? DELAY
RE-ACTUALIZE
COUNTER
Autonomous Forklift
Page | 84
Forklift Software Design 6.3
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.
Y
N
START
COUNTER = 0
REF_LDR_CR=5
REF_LDR_CL=5
IS COUNTER
>30 ?
STOP
Autonomous Forklift
Page | 85
Y N
Y N
Figure 6.3: Setup Program Flowchart
READ LDR_CR
READ LDR_CL
IS REF_LDR_CL >
LCDR_CL?
SET REF_LDR_CL
= LDR_CL
IS REF_LDR_CR >
LCDR_CR?
SET REF_LDR_CR
= LDR_CR
INCREMENT
COUNTER
DELAY
Autonomous Forklift
Page | 86
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
LDR value
LDRs Position
LEFT
CENTER-LEFT
CENTER-RIGHT
RIGHT
On Black
Surface
1
REF_LDR_CL
REF_LDR_CR
1
On White
Surface
6
> REF_LDR_CL
> REF_LDR_CR
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
Autonomous Forklift
Page | 87
RAISE FORK
FWD NO
ULTRASOUND
LOWER FORK
FWD_JUNCTION
TURN
CLOCKWISE
FWD
TARGET
TURN ANTI-
CLOCKWISE
FWD
DELIVERY
LOWER FORK
Autonomous Forklift
Page | 88
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.
Figure 6.5: Stop Flowchart
REV
TURN
CLOCKWISE
LOCATION
TURN
CLOCKWISE
START
SET DIR=0
SHIFTOUT DIR
STOP
Autonomous Forklift
Page | 89
6.3.2.2 Radio Availability
This function informs the central PC that the forklift is available for operation.
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.
START
SET TRANSCEIVER
TO TRANSMITTER
MODE
TRANSMIT
AVAILABILITY
STOP
Autonomous Forklift
Page | 90
N
Y
Figure 6.7: Radio Package Flowchart
START
SET TRANSCEIVER
TO RECEIVER
MODE
IS LOAD
AVAILABLE?
TRAILER TO
BE LOADED
TRAILER B TRAILER A TRAILER C
SET
DESTINATION=1
LOCATION=1
SET
DESTINATION=2
LOCATION=2
SET
DESTINATION=3
LOCATION=3
STOP
Autonomous Forklift
Page | 91
6.3.2.4 Forward
The control of the forward drive of the robot is based on the readings obtained from
the central LDRs.
Y
N
Y
N
Y
N
Figure 6.8: Forward Flowchart
START
IS LDR
LEFT =1? STOP
OBSTACLE
DETECTION
FUNCTION
IS LDR_CL>
REF_LDR_CL
? 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
SET DIR=5
SHIFTOUT DIR
Autonomous Forklift
Page | 92
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.
Y
N
START
TRIGGER
SOUNDWAVE
LISTEN FOR
ECHO
CALCULATE
DISTANCE
IS DISTANCE
>25 CM? RETURN
PWM =200
START
COUNTER
RETURN
PWM =0
DELAY
Autonomous Forklift
Page | 93
Y
N
N
Y
Figure 6.9: Obstacle Detection Flowchart
IS COUNTER
> 30?
IS DISTANCE
>25 CM?
INCREMENT
COUNTER
DELAY
SET RADIO TO
TRANSMITTER
MODE
TRANSMIT
OBSTACLE
INFO TO PC
BUZZER
DELAY
Autonomous Forklift
Page | 94
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.
Figure 6.10: Forward Junction Flowchart
START
SET MOTOR
LEFT =225
MOTOR
RIGHT=225
DELAY
SET MOTOR
LEFT =0
MOTOR
RIGHT=0
STOP
Autonomous Forklift
Page | 95
6.3.2.7 Lower Fork
N
Y
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.
START
SET DIR=16
SHIFTOUT DIR
IS LIMIT SWITCH
1 CLOSED?
SET DIR=0
SHIFTOUT DIR
STOP
Autonomous Forklift
Page | 96
Y
N
Y
N
Y
N
Figure 6.12: Forward No Ultrasound Flowchart
START
IS LDR
LEFT =1? STOP
IS LDR_CL>
REF_LDR_CL
? 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
SET DIR=5
SHIFTOUT DIR
Autonomous Forklift
Page | 97
6.3.2.9 Raise Fork
N
Y
Figure 6.13: Raise Fork Flowchart
SHIFTOUT DIR
IS LIMIT SWITCH
2 CLOSED?
SET DIR=0
SHIFTOUT DIR
STOP
START
SET DIR=32
Autonomous Forklift
Page | 98
6.3.2.10 Turn Clockwise
Y
N
Figure 6.14: Turn Clockwise Flowchart
START
SET DIR=6
SHIFTOUT DIR
SET MOTOR
LEFT =200
MOTOR
RIGH=200
DELAY
IS LDR_CL>
REF_LDR_CL
?
SET MOTOR
LEFT =0
MOTOR
RIGHT=0
STOP
Autonomous Forklift
Page | 99
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.
Y
N
Figure 6.15: Target Flowchart
START
SET
JUNCTION=1
IS JUNCTION=
DESTINATION?
CALL
FORWARD
JUNCTION
FUNCTION
CALL
FORWARD
FUNCTION
INCREMENT
JUNCTION
STOP
Autonomous Forklift
Page | 100
6.3.2.12 Turn Anticlockwise
Y
N
Figure 6.16: Turn Anticlockwise Flowchart
START
SET DIR=9
SHIFTOUT DIR
SET MOTOR
LEFT =200
MOTOR
RIGH=200
DELAY
IS LDR_CR>
REF_LDR_CR
SET MOTOR
LEFT =0
MOTOR
RIGHT=0
STOP
Autonomous Forklift
Page | 101
6.3.2.13 Sonar Delivery
The sonar delivery function is used to monitor distance inside the trailer.
N Y
Figure 6.17: Sonar Delivery Flowchart
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.
START
TRIGGER
SOUNDWAVE
LISTEN FOR
ECHO
CALCULATE
DISTANCE
IS DISTANCE
>15 CM?
RETURN
MOTION=1
RETURN
MOTION =0
Autonomous Forklift
Page | 102
N
Y
Y
N
Y
N
Figure 6.18: Forward Delivery Flowchart
START
IS MOTION
=1?
STOP
IS LDR_CL>
REF_LDR_CL
? SET MOTOR
LEFT =150
MOTOR
RIGHT=0
IS LDR_CR>
REF_LDR_CR
?
SET MOTOR
LEFT = 0
MOTOR
RIGHT=150 SET MOTOR
LEFT =150
MOTOR
RIGHT=150
SET DIR=5
SHIFTOUT DIR
CALL SONAR
DELIVERY FUNCTION
Autonomous Forklift
Page | 103
6.3.2.15 Reverse
Y
N
Y
N
Y
N
Figure 6.19: Reverse Flowchart
START
IS LDR
LEFT =1? STOP
IS LDR_CL>
REF_LDR_CL
? SET MOTOR
LEFT = 0
MOTOR
RIGHT=175
IS LDR_CR>
REF_LDR_CR
? SET MOTOR
LEFT = 175
MOTOR
RIGHT=0 SET MOTOR
LEFT=175
MOTOR
RIGHT=175
SET DIR=10
SHIFTOUT DIR
Autonomous Forklift
Page | 104
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).
Y
N
Figure 6.20: Location Flowchart
START
SET
PARKING = 4
IS PARKING =
LOCATION?
CALL
FORWARD
JUNCTION
FUNCTION
CALL
FORWARD
FUNCTION
INCREMENT
LOCATION
STOP
Autonomous Forklift
Page | 105
IMPLEMENTATION AND TESTING CHAPTER 7 :
Introduction 7.1
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.
Problems and Solutions 7.2
Table 7.1: Problems and Solutions
Components or
Functions
Problems Causes Solutions
LDR
The readings obtained
from the LDRs were
fluctuating too much
in constant light
intensity
The current being
supplied to the LDRs
from the voltage
regulator was too low.
Instead of connecting
the supply to the
voltage regulator it
was connected to the
+5V output pin on the
microcontroller
Ultrasound
The sensor indicated
obstacles found at 0cm
form the AGV
Again the current being
supplied to the sensor
was too low.
Arduino Battery
Microcontroller had
low current problem.
Due to the fact that the
Arduino had now to
power the LDRs and
ultrasound.
As the 9V battery
could not supply the
Arduino with enough
current, it was
replaced with four
1.5V batteries in
series.
Line Follower
The AGV could not
follow the black tape
path.
The black tape was
glued on white paper
and the latter was not
reflecting enough light
to the LDRs.
Instead of using a
paper background, a
white melamine board
which is more
reflective was used.
Wheels and Track
The tracks kept
coming off the wheels,
when the AGV was
performing turns.
The bad orientation of
the wheels and lack of
tension in the tracks.
The orientation was
changed and a fourth
pair of wheels was
added to the AGV.
All of the above problems were successfully solved and no further ones were found
when the AGV was tested around the predefined path.
Autonomous Forklift
Page | 106
Central PC 7.3
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
Autonomous Forklift
Page | 107
7.3.2 Arduino Nano
The Nano‟s 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 20×4 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
Autonomous Forklift
Page | 108
Forklift 7.4
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
Autonomous Forklift
Page | 109
CONCLUSION AND FUTHER WORKS CHAPTER 8 :
Conclusion 8.1
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
Autonomous Forklift
Page | 110
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.
Further Works 8.2
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.
Autonomous Forklift
Page | 111
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 Computer-
Integrated Manufacturing, 2nd ed. New Jersey: Prentice Hall, p.282-283.
3. JBT Corporation (2011) AGV safety, [online] Available at: http://www.jbtc-
agv.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.jbtc-
agv.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.s-
elektronik.de/77-0-E-JET+english.html [Accessed: 29th Nov 2011].
10. S-Elektronik, (2011), E-Jet [online]. Available at: http://www.s-
elektronik.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].
Autonomous Forklift
Page | 112
15. Small Business Trends (2012) QR Codes, Barcodes and RFID: What’s 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/wireless-
zigbee [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-phase1-
part1.html [Accessed: 9 Mar 2012].
Autonomous Forklift
Page | 113
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-Lift-
Trucks.jpg [Accessed: 10 Mar 2012].
31. Humanoid-robotics (2012) Robot Kit with Mecanum Wheels. [image online]
Available at: http://www.humanoid-
robotics.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-motor-
tutorial.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.beam-
wiki.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].
Autonomous Forklift
Page | 114
APPENDIX
APPENDIX A
Autonomous Forklift
Page | 115
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
Autonomous Forklift
Page | 116
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.
Autonomous Forklift
Page | 117
Rotations of wheel = (speed × 60) / circumference of wheel
= (0.05 ×60) / 0.015×2π
= 31.83 rpm
Torque = Force due to friction × radius of wheel
T = f × R
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
Autonomous Forklift
Page | 118
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]
Autonomous Forklift
Page | 119
APPENDIX D
ELECTRONIC CIRCUITS
Central PC:
Autonomous Forklift
Page | 120
Forklift:
Autonomous Forklift
Page | 121
Autonomous Forklift
Page | 122
Autonomous Forklift
Page | 123
Autonomous Forklift
Page | 124
APPENDIX E
3D DRAWINGS & PICTURES
TOP VIEW
Autonomous Forklift
Page | 125
BOTTOM VIEW
Autonomous Forklift
Page | 126
SIDE VIEW
Autonomous Forklift
Page | 127
BACK VIEW
Autonomous Forklift
Page | 128
FRONT VIEW
Autonomous Forklift
Page | 129
APPENDIX F
PREDEFINED PATH
Autonomous Forklift
Page | 130
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;
Autonomous Forklift
Page | 131
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");
Autonomous Forklift
Page | 132
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;
Autonomous Forklift
Page | 133
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();
Autonomous Forklift
Page | 134
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 ");
Autonomous Forklift
Page | 135
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)
Autonomous Forklift
Page | 136
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();
Autonomous Forklift
Page | 137
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);
Autonomous Forklift
Page | 138
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;
Autonomous Forklift
Page | 139
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 ;
Autonomous Forklift
Page | 140
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]);
Autonomous Forklift
Page | 141
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++;
Autonomous Forklift
Page | 142
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);
Autonomous Forklift
Page | 143
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();
Autonomous Forklift
Page | 144
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);
Autonomous Forklift
Page | 145
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)
Autonomous Forklift
Page | 146
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()
Autonomous Forklift
Page | 147
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);
Autonomous Forklift
Page | 148
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
Autonomous Forklift
Page | 149
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);
Autonomous Forklift
Page | 150
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);
Autonomous Forklift
Page | 151
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();
Autonomous Forklift
Page | 152
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);
Autonomous Forklift
Page | 153
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);
Autonomous Forklift
Page | 154
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();
Autonomous Forklift
Page | 155
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);
Autonomous Forklift
Page | 156
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);
Autonomous Forklift
Page | 157
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++;
Autonomous Forklift
Page | 158
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);
Autonomous Forklift
Page | 159
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);
Autonomous Forklift
Page | 160
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();
Autonomous Forklift
Page | 161
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;
Autonomous Forklift
Page | 162
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);
Autonomous Forklift
Page | 163
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);
Autonomous Forklift
Page | 164
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);
Autonomous Forklift
Page | 165
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);
Autonomous Forklift
Page | 166
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();
Autonomous Forklift
Page | 167
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);
Autonomous Forklift
Page | 168
APPENDIX H
COST OF MATERIALS
Component Quantity Cost/Rs
Arduino Duemilanove 1 540.00
Arduino Nano 1 600.00
HD44780 20×4 LCD 1 315.00
Toggle switch 3 60.00
Push button switch 7 35.00
Ultrasonic HC-SR04 1 180.00
Tamiya double gearbox 1 420.00
Tamiya track & wheel set 1 210.00
USB PC webcam 1 135.00
NRF24L01 (transceiver) 2 210.00
IC L293D 2 120.00
IC 74HC595 1 45.00
10K potentiometer 10 60.00
LM7805 2 55.00
LM317 1 30.00
LDR 5 90.00
PCB 90mm×70mm 4 100.00
PCB 90mm×12mm 1 30.00
Capacitors, Resistors &
Resonators
- 150.00
Led 10 50.00
HDPE board 1 90.00
Buzzer 1 15.00
TOTAL/Rs 3540.00
Autonomous Forklift
Page | 169
APPENDIX I
DATASHEETS
Tech Support: [email protected]
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 time×velocity of sound (340M/S) / 2,
Wire connecting direct as following:
5V Supply Trigger Pulse Input Echo Pulse Output 0V Ground
Electric Parameter
Working Voltage DC 5 V
Working Current 15mA
Working Frequency 40Hz
Max Range 4m
Min Range 2cm
MeasuringAngle 15 degree
Trigger Input Signal 10uS TTL pulse
Echo Output Signal Input TTL lever signal and the range in
proportion
Dimension 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 n ot 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 SERIESPOSITIVE-VOLTAGE REGULATORS
SLVS056J – MAY 1976 – REVISED MAY 2003
1POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
3-Terminal Regulators
Output Current up to 1.5 A
Internal Thermal-Overload Protection
High Power-Dissipation Capability
Internal Short-Circuit Current Limiting
Output Transistor Safe-Area Compensation
KTE PACKAGE(TOP VIEW)
OUTPUT
COMMON
INPUT
COMMONOUTPUT
KC (TO-220) PACKAGE(TOP VIEW)
INPUT
CO
MM
ON
COMMONOUTPUT
KCS (TO-220) PACKAGE(TOP VIEW)
INPUT
CO
MM
ON
CO
MM
ON
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 withsingle-point regulation. Each of these regulators can deliver up to 1.5 A of output current. The internalcurrent-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 obtainadjustable output voltages and currents, and also can be used as the power-pass element in precisionregulators.
ORDERING INFORMATION
TJVO(NOM)
(V) PACKAGE† ORDERABLEPART NUMBER
TOP-SIDEMARKING
POWER-FLEX (KTE) Reel of 2000 µA7805CKTER µA7805C
5 TO-220 (KC) Tube of 50 µA7805CKCµA7805C
TO-220, short shoulder (KCS) Tube of 20 µA7805CKCSµA7805C
POWER-FLEX (KTE) Reel of 2000 µA7808CKTER µA7808C
8 TO-220 (KC) Tube of 50 µA7808CKCµA7808C
TO-220, short shoulder (KCS) Tube of 20 µA7808CKCSµA7808C
10POWER-FLEX (KTE) Reel of 2000 µA7810CKTER µA7810C
0°C to 125°C
10TO-220 (KC) Tube of 50 µA7810CKC µA7810C
0°C to 125°CPOWER-FLEX (KTE) Reel of 2000 µA7812CKTER µA7812C
12 TO-220 (KC) Tube of 50 µA7812CKCµA7812C
TO-220, short shoulder (KCS) Tube of 20 µA7812CKCSµA7812C
POWER-FLEX (KTE) Reel of 2000 µA7815CKTER µA7815C
15 TO-220 (KC) Tube of 50 µA7815CKCµA7815C
TO-220, short shoulder (KCS) Tube of 20 µA7815CKCSµA7815C
24POWER-FLEX (KTE) Reel of 2000 µA7824CKTER µA7824C
24TO-220 (KC) Tube of 50 µA7824CKC µA7824C
† Package drawings, standard packing quantities, thermal data, symbolization, and PCB design guidelines are available atwww.ti.com/sc/package.
Please be aware that an important notice concerning availability, standard warranty, and use in critical applications ofTexas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
Copyright 2003, Texas Instruments IncorporatedPRODUCTION DATA information is current as of publication date.Products conform to specifications per the terms of Texas Instrumentsstandard warranty. Production processing does not necessarily includetesting of all parameters.
µA7800 SERIESPOSITIVE-VOLTAGE REGULATORS
SLVS056J – MAY 1976 – REVISED MAY 2003
7POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
APPLICATION INFORMATION
+VO+V
0.1 µF0.33 µF
µA78xx
Figure 1. Fixed-Output Regulator
OUTING
–VO
COM
+
–
VI IL
µA78xx
Figure 2. Positive Regulator in Negative Configuration (VI Must Float)
R1
0.33 µF
Input OutputµA78xx
0.1 µF
IO
R2
VO Vxx Vxx
R1 IQR2
NOTE A: The following formula is used when Vxx is the nominal output voltage (output to common) of the fixed regulator:
Figure 3. Adjustable-Output Regulator
VO(Reg)R1
Input
IO
IO = (VO/R1) + IO Bias Current
0.33 µF
µA78xx
Output
Figure 4. Current Regulator
LM3173-TERMINAL ADJUSTABLE REGULATOR
SLVS044O – SEPTEMBER 1997 – REVISED JULY 2003
1POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
Output Voltage Range Adjustable From1.25 V to 37 V
Output Current Greater Than 1.5 A
Internal Short-Circuit Current Limiting
Thermal Overload Protection
Output Safe-Area Compensation
OUTPUTINPUT
KCS (TO-220) PACKAGE(TOP VIEW)
ADJ
OU
TP
UT
OUTPUTINPUT
KC (TO-220) PACKAGE(TOP VIEW)
ADJ
OU
TP
UT
DCY (SOT-223) PACKAGE(TOP VIEW)
INPUT
OUTPUT
ADJUST
OU
TP
UT
KTE PACKAGE(TOP VIEW)
INPUT
OUTPUT
ADJUSTOU
TP
UT
description/ordering information
The LM317 is an adjustable three-terminal positive-voltage regulator capable of supplying more than 1.5 A overan output-voltage range of 1.25 V to 37 V. It is exceptionally easy to use and requires only two external resistorsto set the output voltage. Furthermore, both line and load regulation are better than standard fixed regulators.
ORDERING INFORMATION
TJ PACKAGE† ORDERABLEPART NUMBER
TOP-SIDEMARKING
POWER-FLEX (KTE) Reel of 2000 LM317KTER LM317
SOT 223 (DCY)Tube of 80 LM317DCY
L30°C to 125°C
SOT-223 (DCY)Reel of 2500 LM317DCYR
L3
TO-220 (KC) Tube of 50 LM317KCLM317
TO-220, short shoulder (KCS) Tube of 20 LM317KCSLM317
† Package drawings, standard packing quantities, thermal data, symbolization, and PCB design guidelines are availableat www.ti.com/sc/package.
Copyright 2003, Texas Instruments Incorporated
Please be aware that an important notice concerning availability, standard warranty, and use in critical applications ofTexas 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 Instrumentsstandard warranty. Production processing does not necessarily includetesting of all parameters.
LM3173-TERMINAL ADJUSTABLE REGULATOR
SLVS044O – SEPTEMBER 1997 – REVISED JULY 2003
4 POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
APPLICATION INFORMATION
LM317
R1240 Ω
IAdj
R2
Adjust
Ci (Note A)0.1 µF
CO (Note B)1.0 µF
VI VO (Note C)
NOTES: A. Ci is not required, but is recommended, particularly if the regulator is not in close proximityto the power-supply filter capacitors. A 0.1-µF disc or 1-µF tantalum provides sufficientbypassing for most applications, especially when adjustment and output capacitors areused.
B. CO improves transient response, but is not needed for stability.
C. VO is calculated as shown:
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 voltageis 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 toprevent 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 preventthe capacitors from discharging into the output of the regulator.
OutputInput
Vref = 1.25 V
VO Vref 1 R2
R1 (IAdj R2)
D1 (Note E)1N4002
D2 (Note E)1N4002
CADJ (Note D)
Figure 1. Adjustable Voltage Regulator
L293, L293DQUADRUPLE HALF-H DRIVERS
SLRS008B – SEPTEMBER 1986 – REVISED JUNE 2002
1POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
Featuring Unitrode L293 and L293DProducts 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 andSGS 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 InductiveTransient Suppression (L293D)
description
The L293 and L293D are quadruple high-currenthalf-H drivers. The L293 is designed to providebidirectional drive currents of up to 1 A at voltagesfrom 4.5 V to 36 V. The L293D is designed toprovide bidirectional drive currents of up to600-mA at voltages from 4.5 V to 36 V. Bothdevices are designed to drive inductive loads suchas relays, solenoids, dc and bipolar steppingmotors, as well as other high-current/high-voltageloads in positive-supply applications.
All inputs are TTL compatible. Each output is a complete totem-pole drive circuit, with a Darlington transistorsink and a pseudo-Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN anddrivers 3 and 4 enabled by 3,4EN. When an enable input is high, the associated drivers are enabled and theiroutputs are active and in phase with their inputs. When the enable input is low, those drivers are disabled andtheir outputs are off and in the high-impedance state. With the proper data inputs, each pair of drivers formsa 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 0°C to 70°C.
Copyright 2002, Texas Instruments IncorporatedPRODUCTION DATA information is current as of publication date.Products conform to specifications per the terms of Texas Instrumentsstandard warranty. Production processing does not necessarily includetesting of all parameters.
Please be aware that an important notice concerning availability, standard warranty, and use in critical applications ofTexas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
HEAT SINK ANDGROUND
HEAT SINK ANDGROUND
1
2
3
4
5
6
7
8
16
15
14
13
12
11
10
9
1,2EN1A1Y
2Y2A
VCC2
VCC14A4Y
3Y3A3,4EN
N, NE PACKAGE(TOP VIEW)
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
1,2EN1A1YNCNCNC
NCNC2Y2A
VCC2
VCC14A4YNCNCNC
NCNC3Y3A3,4EN
DWP PACKAGE(TOP VIEW)
HEAT SINK ANDGROUND
HEAT SINK ANDGROUND
L293, L293DQUADRUPLE HALF-H DRIVERS
SLRS008B – SEPTEMBER 1986 – REVISED JUNE 2002
2 POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
block diagram
10
3
4
5
6
7
8 9
10
11
12
13
14
15
161
210
1
10
2
4
3
M
M
M
10
10
10
VC
VCC1
NOTE: Output diodes are internal in L293D.
TEXAS INSTRUMENTSAVAILABLE OPTIONS
PACKAGE
TAPLASTIC
DIP(NE)
0°C to 70°CL293NEL293DNE
AVAILABLE OPTIONS
PACKAGED DEVICES
TASMALL
OUTLINE(DWP)
PLASTICDIP(N)
0°C to 70°CL293DWPL293DDWP
L293NL293DN
The DWP package is available taped and reeled. Addthe suffix TR to device type (e.g., L293DWPTR).
L293, L293DQUADRUPLE HALF-H DRIVERS
SLRS008B – SEPTEMBER 1986 – REVISED JUNE 2002
3POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
FUNCTION TABLE(each driver)
INPUTS† OUTPUTA EN Y
H H H
L H L
X 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 ofthe input levels.
logic diagram
ÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁ
ÁÁÁÁ
2
1
7
10
9
15
3
6
11
14
1A
1,2EN
2A
3A
3,4EN
4A
1Y
2Y
3Y
4Y
schematics of inputs and outputs (L293)
Input
VCC2
Output
GND
TYPICAL OF ALL OUTPUTSEQUIVALENT OF EACH INPUT
VCC1
CurrentSource
GND
L293, L293DQUADRUPLE HALF-H DRIVERS
SLRS008B – SEPTEMBER 1986 – REVISED JUNE 2002
9POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
APPLICATION INFORMATION
EN 3A M1 4A M2
H H Fast motor stop H Run
H L Run L Fast motor stop
L XFree-running motorstop
XFree-running motorstop
L = low, H = high, X = don’t care
EN 1A 2A FUNCTION
H L H Turn right
H H L Turn left
H L L Fast motor stop
H H H Fast motor stop
L X X Fast motor stop
L = low, H = high, X = don’t care
VCC2 SES5001
1/2 L293
4, 5, 12, 13
10
SES5001
VCC1
EN
1511 14
16
9
M2
M1
3A 4A
8
Figure 4. DC Motor Controls(connections to ground and to
supply voltage)
GND
2 × SES5001
1/2 L293
4, 5, 12, 13
367
8
1
216
VCC2
2 × SES5001
2A 1A
VCC1
EN
M
Figure 5. Bidirectional DC Motor Control
GND
SCLS041G − DECEMBER 1982 − REVISED FEBRUARY 2004
1POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
8-Bit Serial-In, Parallel-Out Shift
Wide Operating Voltage Range of 2 V to 6 V
High-Current 3-State Outputs Can Drive UpTo 15 LSTTL Loads
Low Power Consumption, 80- µA Max ICC Typical t pd = 13 ns
±6-mA Output Drive at 5 V
Low Input Current of 1 µA Max
Shift Register Has Direct Clear
description/ordering information
The ’HC595 devices contain an 8-bit serial-in,parallel-out shift register that feeds an 8-bit D-typestorage register. The storage register has parallel3-state outputs. Separate clocks are provided forboth the shift and storage register. The shiftregister has a direct overriding clear (SRCLR)input, serial (SER) input, and serial outputs forcascading. When the output-enable (OE) input ishigh, the outputs are in the high-impedance state.
Both the shift register clock (SRCLK) and storageregister clock (RCLK) are positive-edge triggered.If both clocks are connected together, the shiftregister always is one clock pulse ahead of thestorage register.
ORDERING INFORMATION
TA PACKAGE † ORDERABLEPART NUMBER
TOP-SIDEMARKING
PDIP − N Tube of 25 SN74HC595N SN74HC595N
Tube of 40 SN74HC595D
SOIC − D Reel of 2500 SN74HC595DR HC595
−40°C to 85°C
SOIC − D
Reel of 250 SN74HC595DT
HC595
−40°C to 85°C
SOIC − DWTube of 40 SN74HC595DW
HC595SOIC − DWReel of 2000 SN74HC595DWR
HC595
SOP − NS Reel of 2000 SN74HC595NSR HC595
SSOP − DB Reel of 2000 SN74HC595DBR HC595
CDIP − J Tube of 25 SNJ54HC595J SNJ54HC595J
−55°C to 125°C CFP − W Tube of 150 SNJ54HC595W SNJ54HC595W−55 C to 125 C
LCCC − FK Tube of 55 SNJ54HC595FK SNJ54HC595FK
† Package drawings, standard packing quantities, thermal data, symbolization, and PCB designguidelines are available at www.ti.com/sc/package.
Copyright 2004, Texas Instruments Incorporated !" # $%&" !# '%()$!" *!"&+*%$"# $ " #'&$$!"# '& ",& "&# &-!# #"%&"##"!*!* .!!"/+ *%$" '$&##0 *&# " &$&##!)/ $)%*&"&#"0 !)) '!!&"&#+
Please be aware that an important notice concerning availability, standard warranty, and use in critical applications ofTexas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
SN54HC595 . . . J OR W PACKAGESN74HC595 . . . D, DB, DW, N, OR NS PACKAGE
(TOP VIEW)
SN54HC595 . . . FK PACKAGE(TOP VIEW)
NC − No internal connection
1
2
3
4
5
6
7
8
16
15
14
13
12
11
10
9
QBQCQDQEQFQGQH
GND
VCCQASEROERCLKSRCLKSRCLRQH′
3 2 1 20 19
9 10 11 12 13
4
5
6
7
8
18
17
16
15
14
SEROENCRCLKSRCLK
QDQENCQFQG
Q NC
SR
CLR
H
GN
DN
C
CQ
B
VC
CQ
A
Q HQ
′
'*%$"# $')!" " 1 2 !)) '!!&"&# !& "&#"&*%)&## ",&.#& "&*+ !)) ",& '*%$"# '*%$"'$&##0 *&# " &$&##!)/ $)%*& "&#"0 !)) '!!&"&#+
SCLS041G − DECEMBER 1982 − REVISED FEBRUARY 2004
2 POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
FUNCTION TABLE
INPUTSFUNCTION
SER SRCLK SRCLR RCLK OEFUNCTION
X X X X H Outputs QA−QH are disabled.
X X X X L Outputs QA−QH are enabled.
X X L X X Shift register is cleared.
L ↑ H X XFirst stage of the shift register goes low.Other stages store the data of previous stage, respectively.
H ↑ H X XFirst stage of the shift register goes high.Other stages store the data of previous stage, respectively.
X X X ↑ X Shift-register data is stored in the storage register.
SCLS041G − DECEMBER 1982 − REVISED FEBRUARY 2004
3POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
logic diagram (positive logic)
3RC3
3S
1DC1
R
3RC3
3S
2RC2
R
2S
3RC3
3S
2RC2
R
2S
3RC3
3S
2RC2
R
2S
3RC3
3S
2RC2
R
2S
3RC3
3S
2RC2
R
2S
3RC3
3S
2RC2
R
2S
3RC3
3S
2RC2
R
2S
13
12
10
11
1415
1
2
3
4
5
6
7
9
QA
QB
QC
QD
QE
QF
QG
QH
QH′
OE
SRCLR
RCLK
SRCLK
SER
Pin numbers shown are for the D, DB, DW, J, N, NS, and W packages.
SCLS041G − DECEMBER 1982 − REVISED FEBRUARY 2004
4 POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
timing diagram
SRCLK
SER
RCLK
SRCLR
OE
ÎÎÎÎÎÎÎÎÎÎ
QA
ÎÎÎÎÎÎÎÎÎÎ
QB
ÎÎÎÎÎÎÎÎÎÎ
QC
ÎÎÎÎÎÎÎÎÎÎ
QD
ÎÎÎÎÎÎÎÎÎÎ
QE
ÎÎÎÎÎÎÎÎÎÎ
QF
ÎÎÎÎÎÎÎÎÎÎ
QG
ÎÎÎÎÎÎÎÎÎÎ
QH
QH’
ÎÎÎÎÎÎÎÎ
implies that the output is in 3-State mode.NOTE:
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 displayunder the control of a 4- or 8-bit microprocessor. Since all the functions such as display RAM, charactergenerator, and liquid crystal driver, required for driving a dot-matrix liquid crystal display are internallyprovided 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 replacean 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 productrequiring 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)
1
32 character fonts (5 × 10 dot)
HD44780U
Pin Functions
SignalNo. ofLines I/O
DeviceInterfaced with Function
RS 1 I MPU Selects registers.0: Instruction register (for write) Busy flag:
address counter (for read)1: Data register (for write and read)
R/W 1 I MPU Selects read or write.0: Write1: Read
E 1 I MPU Starts data read/write.
DB4 to DB7 4 I/O MPU Four high order bidirectional tristate data buspins. Used for data transfer and receive betweenthe MPU and the HD44780U. DB7 can be usedas a busy flag.
DB0 to DB3 4 I/O MPU Four low order bidirectional tristate data bus pins.Used for data transfer and receive between theMPU and the HD44780U.These pins are not used during 4-bit operation.
CL1 1 O Extension driver Clock to latch serial data D sent to the extensiondriver
CL2 1 O Extension driver Clock to shift serial data D
M 1 O Extension driver Switch signal for converting the liquid crystaldrive waveform to AC
D 1 O Extension driver Character pattern data corresponding to eachsegment signal
COM1 to COM16 16 O LCD Common signals that are not used are changedto non-selection waveforms. COM9 to COM16are non-selection waveforms at 1/8 duty factorand COM12 to COM16 are non-selectionwaveforms at 1/11 duty factor.
SEG1 to SEG40 40 O LCD Segment signals
V1 to V5 5 — Power supply Power supply for LCD driveVCC –V5 = 11 V (max)
VCC, GND 2 — Power supply VCC: 2.7V to 5.5V, GND: 0V
OSC1, OSC2 2 — Oscillationresistor clock
When crystal oscillation is performed, a resistormust be connected externally. When the pin inputis an external clock, it must be input to OSC1.
8
All rights reserved.Reproduction in whole or in part is prohibited without the prior written permission of the copyright holder.
September 2008
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 • 26µA 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
nRF24L01+ Product Specification
1.1 Features
Features of the nRF24L01+ include:
• RadioWorldwide 2.4GHz ISM band operation126 RF channelsCommon RX and TX interfaceGFSK modulation250kbps, 1 and 2Mbps air data rate1MHz non-overlapping channel spacing at 1Mbps2MHz non-overlapping channel spacing at 2Mbps
• TransmitterProgrammable output power: 0, -6, -12 or -18dBm11.3mA at 0dBm output power
• ReceiverFast AGC for improved dynamic rangeIntegrated channel filters13.5mA at 2Mbps-82dBm sensitivity at 2Mbps-85dBm sensitivity at 1Mbps-94dBm sensitivity at 250kbps
• RF SynthesizerFully integrated synthesizerNo external loop filer, VCO varactor diode or resonatorAccepts low cost ±60ppm 16MHz crystal
• Enhanced ShockBurst™1 to 32 bytes dynamic payload lengthAutomatic packet handlingAuto packet transaction handling6 data pipe MultiCeiver™ for 1:6 star networks
• Power ManagementIntegrated voltage regulator1.9 to 3.6V supply rangeIdle modes with fast start-up times for advanced power management26µA Standby-I mode, 900nA power down modeMax 1.5ms start-up from power down modeMax 130us start-up from standby-I mode
• Host Interface4-pin hardware SPIMax 10Mbps3 separate 32 bytes TX and RX FIFOs5V tolerant inputs
• Compact 20-pin 4x4mm QFN package
Revision 1.0 Page 8 of 78
nRF24L01+ Product Specification
2 Pin Information
2.1 Pin assignment
Figure 2. nRF24L01+ pin assignment (top view) for the QFN20 4x4 package
CE
CSN
SCK
MOSI
MISO
VDD
VSS
ANT2
ANT1
VDD_PA
IRQ
VDD
VSS
XC2
XC1
VSS
DVDD
VDD
VSS
IREF
1
2
3
4
5
15
14
13
12
11
6 7 8 9 10
1617181920
nRF24L01+
QFN20 4X4
Revision 1.0 Page 10 of 78
nRF24L01+ Product Specification
2.2 Pin functions
Table 1. nRF24L01+ pin function
Pin Name Pin function Description1 CE Digital Input Chip Enable Activates RX or TX mode2 CSN Digital Input SPI Chip Select 3 SCK Digital Input SPI Clock4 MOSI Digital Input SPI Slave Data Input5 MISO Digital Output SPI Slave Data Output, with tri-state option6 IRQ Digital Output Maskable interrupt pin. Active low7 VDD Power Power Supply (+1.9V - +3.6V DC)8 VSS Power Ground (0V)9 XC2 Analog Output Crystal Pin 2
10 XC1 Analog Input Crystal Pin 111 VDD_PA Power Output Power Supply Output (+1.8V) for the internal
nRF24L01+ Power Amplifier. Must be connected to ANT1 and ANT2 as shown in Figure 32.
12 ANT1 RF Antenna interface 113 ANT2 RF Antenna interface 214 VSS Power Ground (0V)15 VDD Power Power Supply (+1.9V - +3.6V DC)16 IREF Analog Input Reference current. Connect a 22kΩ resistor to
ground. See Figure 32.17 VSS Power Ground (0V)18 VDD Power Power Supply (+1.9V - +3.6V DC)19 DVDD Power Output Internal digital supply output for de-coupling pur-
poses. See Figure 32. 20 VSS Power Ground (0V)
Revision 1.0 Page 11 of 78