I propose a novel methodology towards a complete system working to assist users in a library. With this aim, the system must be capable to looking for a specific book in a shelf, asked by any user, and whether it is found, deliver it as soon as possible to the user. To get its objectives the system integrates automatic object recognition, visually guided grasping using Augmented Reality (AR), and force feedback, among other advanced capabilities. Implementation details about the main modules developed presently using Robotics. I developed a computer algorithm for the process and obtained remarkable improvement in accuracy from tests. An implementation using IR sensors and a new algorithm to enhance the accuracy of an operation process, book pick and place process. The side of the books from the robot point of view, oriented towards outside the shelf, is all of them, approximately, in the same spatial plane. The code picks up the data information from infrared sensing system and analyses these data to generate an actual book location at the end. Once the actual book location is generated, the robot updates the pick-up book position and executes picking-up the book. Finally, after success in preliminary results obtained in the Campus; I am encouraged to follow working in this way to obtain the complete prototype.
LIST OF TABLES
Table NO.
Table 2.1 Table 2.2 Table 2.3 Table 2.4 Table 5.1 Table 5.2 Table 5.3 Table 5.4 Table 5.5
TITLE
PIN DESCRIPTION PIN ALTERNATE FUNCTIONS PIN ALTERNATE FUNCTIONS 2 SWING COMPONENTS ADMIN TABLE BOOK TABLE BOOK SEARCH TABLE USER DATA TABLE USER AND PASSWORD TABLE
PAGE NO.
11 16 17 19 45 45 46 46 46
ii
LIST OF FIGURES
Figure NO.
Fig 1.1 Fig 1.2 Fig 1.3 Fig 1.4 Fig 2.1 Fig 2.2 Fig 2.3 Fig 2.4 Fig 3.1 Fig 4.1 Fig 4.2 Fig 4.3 Fig 4.4 Fig 4.5 Fig 4.6 Fig 4.7 Fig 4.8 Fig 4.9 Fig 4.10 Fig 4.11 Fig 4.12 Fig 5.1 Fig 5.2 Fig 5.3 Fig 5.4 Fig 5.5 APPENDIX -C
TITLE
MECHANICAL DESIGN QUICK RETURN MECHANISM SCREW ROD MECHANISM SPIRAL GEAR RF TRANSMITTER RF RECEIVER PERIPHERAL FEATURES ARCHITECTURE SYSTEM DESIGN HARDWARE DESIGN POWER SUPPLY TO MC POWER SUPPLY SYSTEM AT89S52 DC MOTOR CIRCUIT RS232 SYSTEM SIDE CIRCUIT ROBOT SIDE CIRCUIT PROTOCOL OF ROBOT PROTOCOL ON SENDER SIDE I-PUP (FRONT VIEW) I-PUP (SIDE VIEW) USE CASE DIAGRAM ACTIVITY DIAGRAM SEQUENCE DIAGRAM CLASS DIAGRAM COMM API SCREEN SHOTS
PAGE NO.
3 4 5 5 9 10 13 15 22 23 24 24 25 28 29 30 31 32 33 34 35 38 39 40 41 46 70
iii
LIST OF ABBREVATIONS
ACK CISC CTS EEPROM EPROM FET J2SE GPR ISR ATMEL PSP PWM RD/ WR RISC RTS SFR Acknowledgement Complex Instruction Set Computer Clear To Send Electrically Erasable Programmable Read Only Memory Erasable Programmable Read Only Memory Field Effect Transistor Java Software Enterprise General Purpose Register Interrupt service Routine Advanced Technology Memory and Logic Parallel Serial Port Pulse With Modulation Read/Write Reduced Instruction Set Computer Request To Send Special Function Register
iv
1. INTRODUCTION
A robot is an automatically guided machine, able to do tasks on its own. Another common characteristic is that by its appearance or movements, a robot often conveys a sense that it has intent or agency of its own. How computers simplified human work load, robots make it much simpler. Most of the applications like supermarket, library, tool Manufacture Company will have a pic and place work which is being handled by an intelligent human brains. The aim of this project is to replace that intelligent with a machine of same intelligence level. I-LiBot (Intelligent Librarian Robot) works in a known environment. Here the environment is the dimension of the room and size, location of the books and on a plain surface.
1.1 INTRODUCTION:
The main aim of this project i-LiBot is to replace all the functions and activities of a Librarian. The functions include book returning, book issuing, and Verify book. I-LiBot is a 4 legged walking robot with an arm mounted on its base. In this context, some of the capacities of robot may include, among others: This robot is a legged mobile robot. The books are identified with the help of RFID. Each book is tagged and differentiated with a tag number. Mapping techniques: The robot locates the book on the basis of point to point making in the room. So the room is understood by the robot as a graph and moves by marking the points. Human-robot interaction made possible with an application. The robot is completely autonomous system which does the functions by only listening to the commands from the application. Fully autonomy. The machine will create and complete all its tasks without human interaction. Motion planning and other artificial intelligence techniques is being used to figure out how the robot has to act. I thought if the intelligence of the human in the library system can be implemented on a robot, the work load on the human can be reduced. This system was designed from the inspiration from the ATM machine. There are many library robot systems being already implemented earlier. The 1
aim of this project is to focus on simplicity of the problem, cost efficient, simple installation and service, more intelligent machine, and an environment friendly machine.
1.1.1.1
Teleoperated communication
A Teleoperated Robot is a vehicle that is controlled by a human operator at a remote location via a communications link. All cognitive processes are provided by the operator based upon sensory feedback from either line-of-sight visual observation or remote sensory input such as video cameras. A basic example of the principles of teleoperation would be a toy remote control car. Each of the robot are controlled at a distance via a wired or wireless connection while the user provides all control based upon observed performance of the vehicle.
1.1.1.2
Autonomous communication
An Autonomous robot is a vehicle that operates autonomously on the surface of the ground. A fully autonomous robot in the real world has the ability to:
Adjust strategies based on the surroundings and Adapt to surroundings without outside assistance. 1.2 OVERVIEW I started this project by envisioning the ideal for use in the Library management systems. I wanted to be more realistic in my system design so as to influence the interest in the development of the industrial. The design of my system included the following two stages of development: Design of Hardware Modules to implement the Robot model. Design of Software modules to create an interactive Graphical user Interface with special features for surveillances.
Arm The arm is being mounted on to the Base (Leg). This can turn only to an angle of 90 degrees. This has 2 degree of freedom. They are 1) Stretching forward 2) Stretching Backward Finger The Finger is mounted on to the Arm. The purpose of Finger is to catch the book with 2 fingers. There are 2 Degree of freedom. 1) Holding a book 2) Releasing a book
Design of the leg: The materials that I choose to design the leg were Mild steel. Mild steel is an alloy of Steel and Iron. It is easy to machine and not hard like EN18, material. This four legs holds the base and carries the machine forward. Each leg work on the bases of Quick Return Mechanism. A quick return mechanism such as the one seen below is used where there is a need to convert rotary motion into reciprocating motion. As the disc rotates the black slide moves forwards and backwards.
Design of the Arm: The Arm has 2 degree of freedoms. One is to release the arm and other is to pull the arm forward. This part works on the principle of Screw Rod mechanism.
Figure 1.3 Screw Rod Mechanism The Spiral Gear is being connected to the teeth of another Circular Gear which is being turned with the help of a DC motor. This way the Arm is controlled mechanically. Design of the Hand: The Hand is mounted on to the Arm. This hand again works with a Spiral Gear. But the hand is closed with the gear being driven with the finger loop. Here the Gear is again hammered to the shaft of the DC motor and is being controlled. Here there is two degree of freedom. They are to hold the book and release the book.
1.3. Purpose:
The purpose of this project is to replace all the functions and activities of a Librarian with an intelligent robot (Machine). The functions include book returning, book issuing, and Verify book. This machine will reduce time, increases accuracy, easy system interaction, and completes the work on a smart world in a smart manner. Apart from the above purpose it is also capable of the following: Issue and return the book (Works similar to ATM machine) Recognize the book with RFID Tag (So secure authentication) The book weight may vary the leg part of the robot is being drive with high torgue motor that ranges from 268N-377N. Powering the robot The Robot should be powered with 5A/12V Battery. Easy to control the robot Simple command. As it is being commanded in the real time. Reach the target or the point by calculating the point distance (point to point marking).
1.5. ACTUATORS:
Actuators are the motors responsible for motion in the robot, as I have mentioned earlier that I have three DC motor for the motion of my model mobility and to drive the arm and hand.
2. LITERATURE SURVEY
This chapter explains the Radio Frequency, RFID Reader working, its specifications and the details of Atmel 8052 microcontroller required for the hardware design and also the basics of Java Swing and database required for the software design.
In this transmitting section the 1st pin is the antenna pin where I can able to fix the antenna for transmitting the data in the Radio Frequency, the 2nd pin is the data input pin in which the output of the encoder is given; the 3rd pin is the ground and the 4th pin is the VCC which is given to operate the transmitter section.
RF receiver module: Functional block of Rx section where 1,2,3,4 are the pins 1 - Antenna
2 - Data input 3 - Ground 4 - VCC Figure 2.2 RF Receiver In this receiving section the 1st pin is the antenna pin where we can able to fix the antenna to receive the data in the Radio Frequency, the 2nd pin is the data output pin to the decoder circuit, the 3rd pin is the ground and the 4th pin is the VCC which is given to operate the receiver section.
10
2.2.2.1 Features:
Compatible with MCS-51 Products 8K Bytes of In-System Reprogrammable Flash Memory Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Eight Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes 4.0V to 5.5V Operating Range Full Duplex UART Serial Channel Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer Power-off Flag Fast Programming Time Flexible ISP Programming (Byte and Page Mode)
11
21 28 29 30 31 32 39 40
P2.0 - P2.7 - Port 2 PSEN - Program Store Enable ALE - Address Latch Enable EA - External Access Enable P0.7 - P0.1 - Port 0 Vcc - Positive Power Supply
12
Figure 2.3 Peripheral Features The serial port, using a UART (Universal Asynchronous Receive Transmit) protocol can be used in a wide range of communication applications. With the UART provided in the 89S52 you can easily communicate with a serial port equipped computer, as well as communicate with another microcontroller. This last application, called Multi-processor communication, is quite interesting, and can be easily implemented with 2 89S52 microcontrollers to build a very powerful multiprocessor controllers. If all the peripherals described above can generate interrupt signals in the CPU according to some specific events, it can be useful to generate an interrupt signal from an external device, which may be a sensor or a Digital to Analog converter. For that purpose there are 2 External Interrupt sources (INT0 and INT1). 13
14
Figure 2.4 Architecture Overview 4) Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the inter-nal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 15
2 trigger input (P1.1/T2EX), respectively, as shown in the follow-ing table. Port 1 also receives the low-order address bytes during Flash programming and verification.
Table 2.2 Pin Alternate Functions 5) Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the inter-nal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and dur-ing accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash program-ming and verification. 6) Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the inter-nal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S52, as shown in the following table.
16
7) RST Reset input. A high on this pin for two machine cycles while the oscillator is running
Table 2.3 Pin Alternate Functions resets the device. This pin drives high for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled. 8) ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped dur-ing each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. 9) PSEN Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to exter-nal data memory. 10) EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming. 17
11) XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. 12) XTAL2 Output from the inverting oscillator amplifier.
2.5. J2SE
Java Platform, Standard Edition or Java SE (formerly known up to version 6.0 as Java 2 Platform, Standard Edition or J2SE), is a collection of Java programming language APIs useful to many Java platform programs. The Java Platform, Enterprise Edition includes all of the classes in the Java SE, plus a number which are more useful to programs running on servers than on workstations. Starting with the J2SE 1.4 version (Merlin), the Java SE platform has been developed under the Java Community Process. JSR 59 was the umbrella specification for J2SE 1.4 and JSR 176 specified J2SE 5.0 (Tiger). Java SE 6 (Mustang) was released under JSR 270.
2.5.1. Swing
Swing is a GUI toolkit for Java. It is one part of the Java Foundation Classes (JFC). Swing includes graphical user interface (GUI) widgets such as text boxes, buttons, split-panes, and tables. Swing widgets provide more sophisticated GUI components than the earlier Abstract Window Toolkit. Since they are written in pure Java, they run the same on all platforms, unlike the AWT which is tied to the underlying platform's windowing system. Swing supports pluggable look and feel not by using the native platform's facilities, but by roughly emulating them. This means you can get any supported look and feel on any platform. The disadvantage of lightweight components is slower execution. The advantage is uniform behavior on all platforms.
18
The swing component classes are, Class Abstract Button Description Abstract super class for Swing Buttons
Button Group
Image Icon
Encapsulates an Icon
JApplet
JButton
JCheckBox
JComboBox
Encapsulates a combobox
JLabel
19
JRadioButton
JScrollPane
JTabbedPane
20
3. SYSTEM DESIGN
3.1 SYSTEM DESIGN
The design of the robot i-LiBot was initially considered with an idea of creating a realistic model so that it can be used as an ideal model for the pick and place assistant robot system. Therefore I concentrated on various issues of challenge in the part of hardware as well as with the software part of the model and came to an architectural diagram of the system as it is shown in the diagram as follows; generally the design of the system has been broadly classified into the following: HARDWARE DESIGN SOFTWARE DESIGN The modules of the system can be explained from the architecture diagram, which can be explained in detail as follows
3.2. ARCHITECTURE:
The diagram consist of two parts the upper module of the diagram explains the design of the part of the system transmission along with the com port communication while the other lower module of the diagram refers to the design of the robotic model along with its association with the microcontroller and the electronic components. The command is being retrieved from the user and the respected process is being mapped and the command is transmitted over the RF transmitter to the robot. In the system side another process is being carried out. The book number is being read and send to the system through serial port. The serial port is connected to the system kit by RS232. The Receiver of the signal is in the robot part, where the robots execute the command as the system code asks to do. The logical part is being programmed in the robot microcontroller.
21
22
23
Figure 4.2 Power Supply to controller The circuit diagram of the power supply unit is shown in figure 4.2 The sensors and motors uses the +12V dc power supply circuit and the microcontroller uses +5V power supply circuit. Initially the step down transformer steps down
24
the 230V to +12V and +5V. It is given to a bridge rectifier, which converts AC into a pulsing DC. A filtering capacitor is used to remove the ripples present in it. It is then given to a voltage regulator, which gives a constant regulated voltage of +12V and +5V.
Technology Memory and Logic) is the IC, which was developed to control peripheral devices, alleviating the load from the main CPU. Compared to a human being, the brain is the main CPU and the PIC is equivalent to the autonomic nervous system. The clock frequency determines the speed at which a program is read and an instruction is executed. The circuit diagram of PIC in fig.4.4
25
These tags contain transponders that emit messages readable by specialized RFID readers. A reader retrieves information about the ID numbers from a database, and acts upon it accordingly. The specified information is stored in the tags. Whenever the tag comes nearer to the reader, then the RFID tag reader reads that information by transmitting the RF signal.
26
1. Passive tag: Passive RFID tags have no internal power supply. The minute electrical current induced in the antenna by the incoming radio frequency signal provides just enough power for the integrated circuit in the tag to power up and transmit a response. 2. Active tag: Active RFID tags have their own internal power source, which is used to power the integrated circuits and to broadcast the response signal to the reader. Active tags, due to their onboard power supply, also may transmit at higher power levels than passive tags, allowing them to be more robust in "RF challenged" environments.
27
4.5. DC Motor:
An electric motor uses electrical energy to produce mechanical energy. The reverse process that of using mechanical energy to produce electrical energy, is accomplished by a generator or dynamo. Tractions motor used on locomotives often perform both tasks if the locomotive is equipped with dynamic brakes. Electric motors are found in household appliances such as fans, refrigerators, washing machines, pool pumps, floor vacuums, and fan-forced ovens.
28
4.5.2 RS232:
Figure 4.6 RS232 Circuit Diagram In telecommunications, RS-232 (Recommended Standard 232) is a standard for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment).
29
4.6. CIRCUIT DIAGRAM OF THE SYSTEM DESIGN INVOLVES IN THE FOLLOWING TWO CIRCUITS: 4.6.1. System module with the transmitter/receiver
30
VDD
12V
X1
5V
VDD
IO9 IO10 IO11 IO12 IO13 IO14 IO15 IO16
S1
12V M
VCC
COIL NO NC
ULN2003A VCC
5V 5V
R6
50% 5V
VCC
VCC X2
IO1 IO2 IO3 IO4 IO5 IO6 IO7 IO8 IO9 IO10 IO11 IO12 IO13 IO14 IO15 IO16 IO17 IO18 IO19 IO20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21
R8 R11
5V
VCC C2 R10
10uF 1.00K 100K
10.0K
J2
R9
Q2
1.00K
VCC
LED3
LED4
2N2222A
R1
10k
VCC
5V
R2 R7 R5 Q1
C3
33pF
X3
AT89S52 MC
1.00K
10.0K 100K
HC-49/U_11M Hz
R4
C4
33pF
1.00K
LED1
LED2
2N2222A
SW
31
32
33
34
35
5.2 NOTATIONS
Actor: An actor in the Unified Modeling Language (UML) specifies a role played by a user or any other system that interacts with the subject.
DATA FLOWS: Data move in a specific direction from an origin to a designation. The data flow is a packet of data.
PROCESS: People, procedure and devices that produce data. The physical components is not identified.
36
DECISION BOX: This is the decision making box. The condition is given inside and the flow is branched into two streams upon the condition.
37
38
39
40
java.lang.Object
o o
(implements
java.awt.image.ImageObserver,
java.awt.MenuContainer, java.io.Serializable)
o
(implements
2) Class AdminPage java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame lims.AdminPage 3) Class cdate java.lang.Object lims.cdate 4) Class demo (Search page) java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame lims.demo 5) Class LogPage java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame lims.LogPage 6) Class MemberPage java.lang.Object 43
java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame lims.MemberPage 7) Class staff java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame lims.staff 8) Class TableDisp java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame lims.TableDisp
44
5.4 Database:
In this project the data have to be stored in a database from which data have to be rectified and return functions. In this project the database being used is MySQL. MySQL is a relational database management system (RDBMS)[1] that runs as a server providing multi-user access to a number of databases. MySQL works on many different system platforms, including AIX, BSDi, FreeBSD, HP-UX, i5/OS, Linux, Mac OS X, NetBSD, Novell NetWare, OpenBSD, OpenSolaris, eComStation, OS/2 Warp, QNX, IRIX, Solaris, Symbian, SunOS, SCO OpenServer, SCO UnixWare, Sanos, Tru64 and Microsoft Windows. A port of MySQL to OpenVMS also exists. To connect the java application to the database the JDBC-MySQL connector Driver has to be imported and the connection code has to be included. Tables: There are 5 Tables being included in this project they are, Adminlog Stores admin and staff username and password.
Table 5.1 Admin Table Bk Stores the details of the books in the system.
45
Table 5.3 Book Search Table Userdata List of information of the user.
Table 5.4 User Data Table Usernpasswd User name and password of the users.
46
47
6. TESTING
Testing is the stage of implementation, which is aimed at ensuring the system works accurately and efficiently before live operation commences. System testing makes the logical assumption that if all the parts of the system are correct, the goal will be successfully achieved. The testing for the system was carried out in the following two development stages Hardware testing Software testing
48
6.3. I NT E G RA T I O N T E S T I NG :
Integration testing exposes defects in the interfaces and interaction between integrated components (modules). Integration testing is the phase of software testing in which individual software modules are combined and tested as a group. It follows unit testing and precedes system testing. We tested the integrated GUI by integrating the unit modules that have been tested in my unit testing and was successful in achieving an integrated GUI to control my robot model. The test cases are being displayed below.
49
50
7. USER MANUAL
We have developed a basic model of the system from the real system that can be used in the war fields. Thus the system can be used by any kind of user with ease of operation developed in the interactive GUI application.
Open the GUI Application and perform the necessary operation to carry out the system working.
51
8. CONCLUSION
I have created an idea model of the Intelligent Librarian Robot that can be operated in library environment and assist the human efforts. These robots can replace the human work completely provided full efficiency and accuracy. This idea of building a library robot is being undergone in many places throughout the world. The world book bank has also implemented a mechanical model for automatic book receive and return, but the system is more costly, less intelligent, and not suitable for human interaction. These disadvantages of the existing system will be replaced by this robot. I-LiBot can not only be introduced in library, but it can work where ever assistances and a pick and place job is required. I conclude by summing up all my efforts of hardship that I have designed an Intelligent robot that can replace human effort to the maximum.
52
9. FUTURE ENHANCEMENTS
The Library robot was not only designed for the purpose of library but it can be implemented in any location where a pick and place assistant is required. The technology of augmented reality can be implemented in the library robot. So that the user can confirm his book from the place he is located. In the current project only front and back is being processed. This can be changed with the angular motors and can move on both X and Y axis. Here only one robot is shown underworking. This can be increased to multi-robots for multiprocessing. The point to point making algorithm is being used in front and back process, which is pretty easy. This can be implemented in the graph marking where the shortest path has to be implemented. The hand process is being now done on calculated process. This can be changed with the sensor based feedback to make the book picking accurate and faster. There are many more enhancements that can be done on this robot.
53
REFERENCES
BOOKS:
1.
H.M.Deitel, P.J.Deitel, Java: how to program, Fifth edition, Prentice Hall of India private limited. Mohamed Ali Mazidi, Janice Gillispie Mazidi, The 8051 microcontroller and embedded systems, Pearson education, 2004. Java: The Complete Reference, Seventh Edition (Complete Reference Series) by Herbert Schildt "Microprocessor Based Robotics", Mark J. Robillard Howard Sams and Co. 1983 Kinematic Design of Machines and Mechanisms by Homer D. Eckhardt The Art of Gear Fabrication by Prem H Daryani
2.
3.
4. 5. 6.
54
arm_Hand_fw(); ddlay(50000); stop_mot(); arm_Motor_rw(); ddlay(60000); stop_mot(); leg_motor_fw();//distance forwared delay(60000); stop_mot(); arm_Motor_fw(); ddlay(60000); stop_mot(); arm_Hand_rw(); ddlay(50000); stop_mot(); arm_Motor_rw(); ddlay(60000); stop_mot(); leg_motor_rw();//distance reverse ddlay(60000); stop_mot();} if(P1==0xF2) //retern mode { arm_Motor_fw(); ddlay(60000); stop_mot(); arm_Hand_fw(); ddlay(50000); stop_mot(); arm_Motor_rw(); ddlay(60000); stop_mot(); 56
leg_motor_fw();//distance forwared delay(60000);delay(60000); stop_mot(); arm_Motor_fw(); ddlay(60000); stop_mot(); arm_Hand_rw(); ddlay(50000); stop_mot(); arm_Motor_rw(); ddlay(60000); stop_mot(); leg_motor_rw();//distance reverse delay(60000);delay(60000); stop_mot();} if(P1==0xF3) //retern mode { arm_Motor_fw(); ddlay(60000); stop_mot(); arm_Hand_fw(); ddlay(50000); stop_mot(); arm_Motor_rw(); ddlay(60000); stop_mot(); leg_motor_fw();//distance forwared delay(60000);delay(60000);delay(60000); stop_mot(); arm_Motor_fw(); ddlay(60000); stop_mot(); 57
arm_Hand_rw(); ddlay(60000); stop_mot(); arm_Motor_rw(); ddlay(50000); stop_mot(); leg_motor_rw();//distance reverse delay(60000);delay(60000);delay(60000); stop_mot();} if(P1==0xF4) //issu mode { leg_motor_fw();//distance forwared ddlay(60000); stop_mot(); arm_Motor_fw(); ddlay(60000); stop_mot(); arm_Hand_fw(); ddlay(50000); stop_mot(); arm_Motor_rw(); ddlay(60000); stop_mot(); leg_motor_rw();//distance reverse delay(60000); stop_mot(); arm_Motor_fw(); ddlay(60000); stop_mot(); arm_Hand_rw(); ddlay(50000); stop_mot(); 58
arm_Motor_rw(); ddlay(60000); stop_mot();} if(P1==0xF5) //issu mode { leg_motor_fw();//distance forwared delay(60000); delay(60000); arm_Motor_fw(); ddlay(60000); arm_Hand_fw(); ddlay(50000); arm_Motor_rw(); ddlay(60000); leg_motor_rw();//distance reverse delay(60000); delay(60000); arm_Motor_fw(); ddlay(60000); arm_Hand_rw(); ddlay(60000); arm_Motor_rw(); ddlay(50000); stop_mot();} if(P1==0xF6) //issu mode { leg_motor_fw();//distance forwared delay(60000); delay(60000); delay(60000); arm_Motor_fw(); ddlay(50000); arm_Hand_fw(); ddlay(60000); arm_Motor_rw(); delay(60000); leg_motor_rw();//distance reverse 59
delay(60000); delay(60000); delay(60000); arm_Motor_fw(); ddlay(60000); arm_Hand_rw(); ddlay(60000); arm_Motor_rw(); ddlay(50000); stop_mot();} else }} { stop_mot(); ddlay(60000); }
2. Robot TX Program:
while(1) { reciv_dat=strstr(rex,"28006F79A1"); lenth=strlen(reciv_dat); if(lenth>7) { trans('A'); clear_buff(); ser_count=0; } reciv_dat=strstr(rex,"28006F49AB"); lenth=strlen(reciv_dat); if(lenth>7) { trans('B'); clear_buff(); ser_count=0; } reciv_dat=strstr(rex,"28006F8062"); lenth=strlen(reciv_dat); 60
if(lenth>7) { trans('C'); clear_buff(); ser_count=0; } reciv_dat=strstr(rex,"GOTO1"); lenth=strlen(reciv_dat); if(lenth>2) { P1=0xF1; delay_tx(); clear_buff(); ser_count=0; } reciv_dat=strstr(rex,"GOTO2"); lenth=strlen(reciv_dat); if(lenth>2) { P1=0xF2; delay_tx(); clear_buff(); ser_count=0; } reciv_dat=strstr(rex,"GOTO3"); lenth=strlen(reciv_dat); if(lenth>2) { P1=0xF3; delay_tx(); clear_buff(); 61
ser_count=0; } reciv_dat=strstr(rex,"COME1"); lenth=strlen(reciv_dat); if(lenth>2) { P1=0xF4; delay_tx(); clear_buff(); ser_count=0; } reciv_dat=strstr(rex,"COME2"); lenth=strlen(reciv_dat); if(lenth>2) {P1=0xF5; delay_tx(); clear_buff(); ser_count=0;} reciv_dat=strstr(rex,"COME3"); lenth=strlen(reciv_dat); if(lenth>2) {P1=0xF6; delay_tx(); clear_buff(); ser_count=0; } else {P1=0xF7; }
62
try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) { } readThread = new Thread(this); readThread.start(); } } } } public void run() { try { System.out.println("inside run"); Thread.sleep(20000); } catch (InterruptedException e) { } } public String readValue(){ return strBuf.toString(); } public void closePort(){ serialPort.close(); } 64
public void serialEvent(SerialPortEvent event) { switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (inputStream.available() > 0) { int numBytes = inputStream.read(readBuffer); } strBuf.append(new String(readBuffer)); System.out.print(new String(readBuffer)); } catch (IOException e) { } break; } } }
65
while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(defaultPort)) { System.out.println("Found port: "+defaultPort); portFound = true; if (!portFound) { System.out.println("port " + defaultPort + " not found."); } // initalize serial port try { serialPort = (SerialPort) portId.open("SimpleWriteApp", 2000); } catch (PortInUseException e) { e.printStackTrace(); } try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {e.printStackTrace();} try { // write string to serial port outputStream.write(messageString.getBytes()); System.out.println("Writing \""+messageString+"\" to "+serialPort.getName()); } catch (IOException e) {} } } 67
} serialPort.close(); } public SimpleWrite() { TrialStart(); } public static void main(String args[]) { SimpleWrite obj=new SimpleWrite(); } void Setmessage(String as) { SimpleWrite.messageString=as; } }
68
APPENDIX -B
1. PIN DETAILS OF AT89S52:
69
Opening page
70
71
Admin Page
72
Add Member
73
Add Book
74
Delete Member
75
Delete Book
76
Login Page
77
78
Issue Book
79
Return Book
80
Member Page
81
Change Password
Search Page
82
Table Display
83
84
85
i-Pup (Arm)
86
87
88
89
90
91