0% found this document useful (0 votes)
178 views42 pages

Detection & Distinction of Colors Using Color Sorting Robotic Arm in A Pick & Place Mechanism

Uploaded by

Trinesh Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views42 pages

Detection & Distinction of Colors Using Color Sorting Robotic Arm in A Pick & Place Mechanism

Uploaded by

Trinesh Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 42

Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Chapter 1

Introduction

The importance of robotics in 21st century is increasing day by day to reduce human
mistakes in their daily tasks because of their ability to do much difficult tasks; the automotive
industry fully operates with robots completing tasks on time without any mistake. Mainly the
colour sorters are used in agricultural machineries like rice sorter, beans sorter, peanut sorter
etc. Colour sorters are used in other industrial applications also like quartz sand sorter, plastic
granule sorting of coloured nuts and bolts etc. It also increases the efficiency since the
mechanised sorting is much faster the manual sorting. It reduces the human effort, labour and
cost.

The knowledge of robot comprises of three main engineering areas; mechanical,


electrical and computer engineering. Mechanical composes of mathematical modelling of
dynamics and kinematics of robot arm, The electrical contains the sensing, amplifying,
filtering, displaying and controlling schemes; Computer Engineering consists of another two
important fields in the form of hard-ware and software to design an electronic controller
through programming for specified application in a time domain constraint which can also
called as embedded system. Robots show many advantages when it is networked using
wireless communication, automated by providing vision and controlled through an embedded
system.

The proposed system is an embedded system which will increase the speed of colour
sorting procedure, provide the accurate colour sorting process, decrease the cost of colour
sorting process and optimize the productivity of an industrial object. The system comprises of
colour sensor, stepper & servo motors and microcontroller. Colour sensor detects the
specified colour of the object and microcontroller reads this from the data at its input ports.
The microcontroller conveys its decision to the station that been programmed. Since a
microcontroller is used as a heart of the system, it makes the set up low cost and effective
nevertheless. The significance of a project can be estimated from its current utilization and
future prospects of advancements. Industry utilization and manufacturing also defined the
significance of this project.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 1


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Chapter 2

LITERATURE SURVEY

2.1 Colour And Shape Based Object Sorting,AbhishekKondhare

The real challenge is how to improve existing sorting system in the modular
processing system which consists of four integrated stations of identification,
processing,selection and sorting with a new image processing feature. It is a smart approach
for a real time inspection and selection of objects in continuous flow. Image processing in
today’s world grabs massive attentions as it leads to possibilities of broaden application in
many fields of high technology. Existing sorting method uses a set of capacitive, inductive
and optical sensors which do differentiate object colour.

2.2 Gprs Controlled Weighing System Of Fruit Sorting And Transportation Gyro Car
Based On Arm,Tamboli Amir S
There is a range of literature relevant to energy and emissions associated with the
production, trade and consumption of fresh fruit and vegetables. This method reviews variety
of material concerned with fresh fruit and vegetable production, consumption, transport and
trade. The first part of the chapter focuses on several reports that consider greenhouse gas
emissions at an aggregate level, either for the Economic Utilisation or country level. It
provide an indication of the greenhouse gases associated with the food sector and specifically
from fruit and vegetables. This section also reviews literature focusing on the supply of fresh
produce from developing countries, highlighting the role fruit and vegetable production plays
in sub-Saharan African economies. The second part of this chapter reviews studies that focus
on a specific product, covering various stages of the supply chain.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 2


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

2.3 A Review on Wireless Embedded System for Vision Guided Robot Arm for Object
Sorting,C. Chandra Mouli
It is aimed on providing the survey and design aspects of wireless object sorting
system which comprises of two stations, tramsmission station and receiption station. The
transmission station is a Personal Computer (PC) with an input device (CCD/CMOS Sensor)
and a wireless transmission module (Bluetooth / WiFi / Zigbee). The input device captures
the image of the object on the assembly line and the image data will be sent to PC for image
processing to find out the genre of the object. Image processing techniques identifies the
genre of the object from the stored data base. Depending upon the object type and robot arm
position, PC finds the solution for the forward and inverse kinematic problems of robot arm
for pick and place operation of the object to its dedicated container. PC calculates the position
and orientation of the robot arm’s end effector using forward kinematics and joint angles by
using inverse kinematics to pick the object. Calculated joint angles are transmitted to the
receiver station by using wireless communication.

2.4 Object Sorting Robotic Arm Based on Colour Sensing, Aji Joy

Most of the robotic arms are designed to handle repeated jobs. To reduce human
efforts on mechanical manufacturing different types of robotic arms are being developed.
These arms are too costly and complex due to the complexity and the fabrication process. In
design of the robotic are different parameters are to be taken care. The design of mechanical
structure with enough strength, optimum weight, load bearing capacity, speed of movement
and kinematics are important parameters. In electronic design the specification of the motors,
drives, sensors, control elements are to be considered. In the software side the configurability,
user interface and implementation and compatibility are to be considered.

It deals with the designing and implementation of Synchronized Robotic Arm, which
is used to perform all the basic activities like picking up objects and placing them. The robot
interact with it’s by means of arm and gripping device but there is no sensors. The KUKA
youbot is released their new 5-DOF arm with 2 finger gripper for educational and robotics
research .

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 3


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

2.5 Color Sorting System With Robot Arm, YeowKhang Yung

This system is implemented to improve the process of the industrial. Traditionally, the
color sorting process is done by the operator manually. However, this method has some
shortage such as increase the cost of the product, slow, and inaccuracy due to the human
mistake.Color sorting system is one of the useful systems in Industrial. It can be used to
differentiate item based on the color of the item itself. Color Sorting System with Robot Arm
will be operated using Programmable Interface Controller (PIC). For the color detecting part,
it will use the Light Dependent Resistor (LER) as a sensor to detect the color of the object.
The most significant part of is to have a robot arm. This robot arm is function to pick and
place, and its gripper canmove in a circular path.

2.6 A Model Vision of Sorting System Application Using Robotic Manipulator,


ArkoDjajadi

Image processing in today’s world grabs massive attentions as it leads to possibilities


of broaden application in many fields of high technology. The real challenge is how to
improve existing sorting system in the Modular Processing System (MPS) laboratirium which
consists of four integrated stations of distribution, testing, processing and handling with a
new image processing feature. Existing sorting method uses a set of inductive, capacitive and
optical sensors do differentiate object color.

2.7 Visualization Robot Sorter, MohdJohaneis Bin Abu Bakar

In order to perform this project, literature review have been made from various
sources likewise journal, books and other references such as article. In simple term, the
reference sources emphasize on few aspects and the important aspect is the cam assembly
mechanism analysis and how to design LabVIEW8.0 program that will interface with PCI-
1710 that give input data (voltage) and visualize the amount of voltage and the pick and place
arm robot movement. This part will describe about distance detector, rheostat circuit, PCI-
1710 12/16-bit multifunction Card and LabVIEW8.0program.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 4


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

2.8 Role Transfer For Robot Tasking, Paul Fitzpatrick

Robotics has proven most successful in narrowly defined domains that offer sufficient
constraints to makeautomated perception and action tractable. The goal of this thesis is to
take a step towards generalityby developing methods for applying a robot to many different
narrow domains. This is complementary to the more common research goal of enhancing
machine perception and action to deal with wider domains. This approach to extending the
range of application of a technology through parameterization rather than generalization is
key to fields such as automatic speech recognition. It has the theoretical advantage of
providing a framework for factoring context into perception, and the practical advantage of
creating systems that do useful work with limited technology.

Chapter 3
M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 5
Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

PRESENTED THEORY AND PRACTICE

3.1Existing System

The system comprises of color sensor, stepper & servo motors and microcontroller. Color
sensor detects the specified color of the object and microcontroller reads this from the data at
its input ports. The microcontroller conveys its decision to the station that has been
programmed. The result will be displayed in Lcd display.

3.1.1 Disadvantages of Existing system

 It can only detect the color of the particular object.


 Multitasking is not possible.

3.2 Proposed Work:

In this project different color,length and size of the specified objects can be determined and
Pick and place mechanism can be performed .

Chapter 4
M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 6
Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

PROBLEM DEFINITION

4.1 Problem Description:


The problems which often occurred in the industrial that can be solved by this project
are:

i.The speed of color sorting process by an operator is very slow. This is due to the limitation
of response time for a human eye. The eye will always take some time to see an image and
project this to the brain to initiate visual sensation. After the brain has received the image, it
will take some time for the brain to determine the color of the object too. However, this
limitation can be covered by using a computer. In this project, a microcontroller is used to
increase the speed of color sorting.

ii. The accuracy of color sorting process by an operator is very slow. This is because an
operator will need to handle hundred or thousand of object each day, they will feel boring and
their eyes are tired after a long day working. It was a very common case for an operator to
give wrong result. However, a machine will not have this problem. A machine will give
accurate result even after it has repeated a process for billions of times. In this project,
microcontroller was used to substitute the operator and thus increase the accuracy of color
sorting

iii. The implementation cost for a color sorting process using the operator is very high. This is
because the work load for an operator is very low. If an industry needs to sort a bulk quantity
of product, they have to recruit many workers, implement shift and overtime system for the
workers. This will definitely increase the cost of a product. In this project, a color sorting
system was designed so that to increase the process time, increase the process accuracy,and
cut-down the cost of process of color sorting.

4.2 Objectives:

Thesorting process is based on a 2 phase operative methodology defined

1) a self-learning step where the apparatus learns to identify objects ;

2) an operative selection process where objects are detected,

The project involve sensors that senses the object’s colour,length and size and sends the
signal to the microcontroller.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 7


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

4.3 Hardware Requirement: Quantity in no

Microcontroller AT89S52 01

Color Sensor TCS34725FN 01

Rasbperry Pi A+ board 01

Arm 1176 Processor 01

Smd Led 16

IR Phototransistors 16

Transistors BC548 03

Comparator LM324 01

Decade Counter CD4017 01

Stepper motor 01

Servo motor 03

Opaque plastic ring 01

Power supply 03

LCD Display 01

Mini usb keyboard 01

Usb mouse 01

4.4 Software Requirements:

Python
Linux OS

Chapter 5
DESIGN AND WORKING

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 8


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Figure 5.1:Block diagram of the system

5.1 Working Principle of the whole System


The system sorts different size and colored objects by making measurements on a
fixed start point where the sample object is placed. Depending on sorting criteria – Color,
Size, Color& Size, the object can be picked and placed by the robotic arm at different
location or different bins placed in a circular path around the robotic arm.

5.1.1 Color Sensing

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 9


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

The color sensing is carried out by a semiconductor type reflective color sensor
manufactured by Austria Micro Systems – TCS34725FN, the device features a 4 channel
color sensor with built in Infrared filter to cut off unwanted infrared radiations pick up from
surrounding light sources.
The device consists of an internal A-D convertor for light to digital value conversion
and each channel can be read using its I2C interface bus as a 16bit digital value. These values
are read by the host micro-computer or processor to analyze the RGB values and represent
them or process as per requirement. In our system the TCS34725 is interfaced with the
Raspberry Pi A+ board on its 2 nd I2C interface channel, running Linux OS. The values are
read using python script by calling the python I2C libraries.

The color sensor requires a light source to illuminate the sample and a 5500K color
temperature white SMD LED is used for this purpose. The sensor assembly is housed in a
circular black opaque plastic ring to avoid external light interferences. As per standard RGB
schemes supported by most computers and operating systems the 16 bit value is converted to
8 bit and the resultant number of color which TC34725 can differentiate totals to 16.7 million
colors.
As with any instrumentation device a range calibration is always required and the
same for this color sensor is done by making measurements of known color patches from
shade cards, and substituting an error value computed by inverse matrix multiplication of
three different elements Red, Green, and Blue measured by the sensor, thus any other color
measured will be multiplied with an error matrix to get compensated color values
reproducing real color of the sample scanned.

The error mainly occurs due to light source used for illuminating the sample, the
spectral distribution of the light source and its color temperature, combined with the IR cut
off filter present in the color sensor lowers the color temperature and thus the scanned colors
reflect a blue tinge, however after error correction the sample color and scanned color can be
rated with a delta E value of 1.5 to 2.0 which is very close to the real color.

5.1.1(a) Calculating the color

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 10


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

ILLUMINANCE
Illuminance is defined as the Luminous flux incident on a surface per unit area, and
can generally be described as the perceived brightness of visible light.The symbol for
Illuminance is Evand the SI unit is Lux, which is equal to one Lumen per square meter.

Illuminance is a good metric for determining ambient light. Ambient light information
can be quite useful in many applications, especially display driven ones. Controlling display
brightness based on ambient light measurements can improve the visual experience to the
user, and improve power efficiency by not wasting power on maximum display brightness
when it is not warranted by the ambient environment.

The TCS34725FN digital color sensor returns data from four channels: red(R),
green(G), blue(B) and clear(C)(non-filtered). The response from the red, green and blue
channels (RGB) can be used to determine a particular source’s CCT. The key to
accomplishing this is to transfer the RGB responses to the chromaticity diagram in Figure
5.2and find the point on the planckian locus closest to our source’s chromaticity point.

Chromaticity coordinates (x, y) are based on standard tristimulus values (XYZ).


These standards are set by the Commission Internationale de l’Eclairage (CIE). The CIE is
the main international organization concerned with color and color measurement. In order to
acquire a CCT for a given light source using a TCS3414CS, we must first map the sensor
response (RGB) to the CIE tristimulus values (XYZ). It is then necessary to calculate the
chromaticity coordinates (x, y) and finally the correlated color temperature (CCT). Figure 5.3
displays an overview of this process as well as the methods used for each transformation

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 11


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Figure 5.2: Chromaticity Diagram with Planckian Locus

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 12


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Light Source Color Temperature (K)

Candle flame 1900

Sunlight at sunset 2000

Tungsten bulb—60 watt 2800

Tungsten bulb--200 watt 2900

Tungsten/halogen lamp 3300

Carbon arc lamp 3780

Sunlight plus skylight 5500

Xenon strobe light 6000

Overcast sky 6500


North sky light 10000
Table 1. Blackbody Radiator Temperature Approximation of Various Illuminants

RGB Reference values RGB Sensor Values Resultant color


3*3 matrix inverse of (3*3Matrix) correction matrix

Corrected RGB values CCM *RGB Sensor


Values

Figure 5.3 CCT calculation process overview

To obtain the illuminance, the first step is all that is necessary. The tristimulus Y value
represents the illuminance of our source.

5.2 Size (Dimension) Sensing

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 13


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

A low cost approach had been used to sense the size of the sample object, wherein the
requirements are that the object should be opaque. An array of 8x8 IR phototransistors and
LED’s are used to scan for an object in X and Y axis and evaluate the size in steps of 3-
3.5mm, as each component’s diameter is 3mm. The circuit is realized using a set of
comparators – 8 x LM324 for each axis, and 2 x CMOS counter type CD4017 to generate
scanning in both X and Y axis. The LED on one axis is scanned in a stepped manner and the
return signal is monitored at the photo transistor end, which is converted to a logic level
signal by the comparator. Thus any blockage of the IR light falling from source to target
represents the X and Y axis area occupied in multiples of 3mm by the sample. The circuitry is
controlled by an 8051 core MCU (AT89S52). And is interfaced by its UART to the
Raspberry Pi A+ processor board. The communication is handled in high level by the
pySerial libraries.

5.3 Pick and Place Control

The robot is controlled using 3 x servo and 1 x stepper motor for complete pick and
place operation. The servo motors take PWM pulses from the AT89S52 MCU for varying
and maintaining their position, the stepper motor is controlled by a transistorized circuit
based on a TIP 127 PNP darlington pair power transistor.
The stepper motor is used to rotate the arm to required angle in 3.75 degree step. An
optical slotted switch is used to sense home position and end position to stop the motor
movement at both ends.
The complete mechanical assembly is cut out of an acrylic 6mm panel with laser
cutting process and same is joined using fastening screws and cyanoacrylate adhesive. The
specific material is used based on its light weight and high tensile strength.

5.3.1 INVERSE KINEMATICS OF ROBOTIC ARM


Kinematics is the study of motion, describing the motion of the structure. It is usually
studied under two basic parts: forward kinematics and inverse kinematics. Forward
kinematics manipulates with the structure which is done by changes of the joint angles inside
the controlled structure.(fig 5.4(a))

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 14


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Figure 5.4: controlled structure of robot

But if we want to know how the upper joint structure would keep on moving when it
is necessary that the end effector should move towards its goal position. In that case direct
calculations are carried out in the structure so that joint angle can be determined as the
changes are done in the end effector (Fig 5.4 b).
Therefore we can say that the concept of inverse kinematics provides joint parameter
values when we are known to the desired position of the end effector with the help of
kinematic equations of robot.

5.3.2 IMPLEMENTATION OF ARM WITH SERVOS

Use The ARM is built with Servo Motors as it gives precise control over the angles.
And also it gives added advantage of in-built feedback mechanism. We are not required to
know the previous values of angle for the upcoming values. The angles computed earlier
converts the PWM wave of required width and fed to the respective servo to move the end
effector to the desired location.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 15


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Figure 5.5: Control Pulses required for Servo

5.3.3 BOUNDARY CONDITIONS FOR ROBOTIC ARM


The following equations are used to find out the calculate the torque of robotic arm.
 3  (mg  L3 )  (W3  L3 / 2)

 2   mg  ( L3  L2 )  W3  ( L2  L3 2 )  (Wm3  L2 )  (W2  L2 2 )


 1   mg  ( L3  L2  L1 )  W3  ( L1  L2  L3 2 )  Wm3  ( L1  L2 )

 W2  ( L1  L2 2 )  (Wm 2  L1 )  (W1  L1 2 )


L1=2cm M1=.05kg A1=.5kg TorqueT1=1.51N-m
L2=15cm M2=.125kg A2=.052kg T2=5.335N-m
L3=10cm M3=.125kg A3.052kg T3=4.476N-m
Table 2 :Calculated Torque by the given values

Motor weight includes motor weight+Mass of actual mechanism.


Length of base =100mm
Length of Elbow=160mm
Length of Gripper=20mm
Overall thickness of Robotic arm=5mm
Thickness of Gripper=3mm

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 16


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

5.4 HARDWARE COMPONENTS DESCRIPTION


5.4.1 8051 Microcontroller AT89S52

This 8051 single board computer will be used for providing user interface and system
control. The 8051 single board computer is based on a P89V51RD2 MCU form NXP
(Philips). The controller features 64KB in circuit programmable flash memory with a built in
UART boot loader feature to facilitate easy program uploading to the board without the need
of an external device programmer. The board consists of I/O pin headers with a built in 5V
regulator and on board MAX232 (RS232-CMOS) level converter.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 17


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Figure 5.6:Complete Schematic of the 8051 SBC

The 8051 SBC is further interfaced to a 20X4 Line LCD display and a 4X4 Keypad
for facilitating the user interface. The system will accept commands and text messages from a
PC and will display the same on the LCD display and will accept the user input form the
connected 4X4 keyboard which will be sent to the PC via the UART.

UART Interface

One of the 8051s many powerful features is its integrated UART, otherwise known as
a serial port. The fact that the 8051 has an integrated serial port means that you may very
easily read and write values to the serial port. If it were not for the integrated serial port,
writing a byte to a serial line would be a rather tedious process requiring turning on and off
one of the I/O lines in rapid succession to properly "clock out" each individual bit, including
start bits, stop bits, and parity bits.

However, we do not have to do this. Instead, we simply need to configure the serial
ports operation mode and baud rate. Once configured, all we have to do is write to an SFR to
write a value to the serial port or read the same SFR to read a value from the serial port. The
8051 will automatically let us know when it has finished sending the character we wrote and
will also let us know whenever it has received a byte so that we can process it. We do not
have to worry about transmission at the bit level--which saves us quite a bit of coding and
processing time.

Setting the Serial Port Mode

The first thing we must do when using the 8051s integrated serial port is, obviously,
configure it. This lets us tell the 8051 how many data bits we want, the baud rate we will be using,
and how the baud rate will be determined. First, lets present the "Serial Control" (SCON) SFR and
define what each bit of the SFR represents:

Bit Name Bit Address Explanation of Function

7 SM0 9Fh Serial port mode bit 0

6 SM1 9Eh Serial port mode bit 1.

5 SM2 9Dh Multiprocessor Communications Enable (explained later)

4 REN 9Ch Receiver Enable. This bit must be set in order to receive

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 18


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

characters.

3 TB8 9Bh Transmit bit 8. The 9th bit to transmit in mode 2 and 3.

2 RB8 9Ah Receive bit 8. The 9th bit received in mode 2 and 3.

Transmit Flag. Set when a byte has been completely


1 TI 99h
transmitted.

Receive Flag. Set when a byte has been completely


0 RI 98h
received.

Additionally, it is necessary to define the function of SM0 and SM1 by an additional table:

SM0 SM1 Serial Mode Explanation Baud Rate

0 0 0 8-bit Shift Register Oscillator / 12

0 1 1 8-bit UART Set by Timer 1 (*)

1 0 2 9-bit UART Oscillator / 64 (*)

1 1 3 9-bit UART Set by Timer 1 (*)

Table 3: SCON Register

The SCON SFR allows us to configure the Serial Port. Thus, well go through each bit
and review its function.The first four bits (bits 4 through 7) are configuration bits.

Bits SM0 and SM1 let us set the serial mode to a value between 0 and 3, inclusive.


The four modes are defined in the chart immediately above. As you can see, selecting the
Serial Mode selects the mode of operation (8-bit/9-bit, UART or Shift Register) and also
determines how the baud rate will be calculated. In modes 0 and 2 the baud rate is fixed
based on the oscillator’s frequency. In modes 1 and 3 the baud rate is variable based on how
often Timer 1 overflows. Well talk more about the various Serial Modes in a moment.

The next bit, SM2, is a flag for "Multiprocessor communication." Generally,


whenever a byte has been received the 8051 will set the "RI" (Receive Interrupt) flag.

This lets the program know that a byte has been received and that it needs to be
processed. However, when SM2 is set the "RI" flag will only be triggered if the 9th bit

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 19


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

received was a "1". That is to say, if SM2 is set and a byte is received whose 9th bit is clear,
the RI flag will never be set. This can be useful in certain advanced serial applications. For
now it is safe to say that you will almost always want to clear this bit so that the flag is set
upon reception of any character.

The next bit, REN, is "Receiver Enable." This bit is very straightforward: If you want
to receive data via the serial port, set this bit. You will almost always want to set this bit.The
last four bits (bits 0 through 3) are operational bits. They are used when actually sending and
receiving data--they are not used to configure the serial port.

The TB8 bit is used in modes 2 and 3. In modes 2 and 3, a total of nine data bits are
transmitted. The first 8 data bits are the 8 bits of the main value, and the ninth bit is taken
from TB8. If TB8 is set and a value is written to the serial port, the data bits will be written to
the serial line followed by a "set" ninth bit. If TB8 is clear the ninth bit will be "clear."

The RB8 also operates in modes 2 and 3 and functions essentially the same way as
TB8, but on the reception side. When a byte is received in modes 2 or 3, a total of nine bits
are received. In this case, the first eight bits received are the data of the serial byte received
and the value of the ninth bit received will be placed in RB8.

TI means "Transmit Interrupt." When a program writes a value to the serial port, a
certain amount of time will pass before the individual bits of the byte are "clocked out" the
serial port. If the program were to write another byte to the serial port before the first byte
was completely output, the data being sent would be garbled. Thus, the 8051 lets the program
know that it has "clocked out" the last byte by setting the TI bit. When the TI bit is set, the
program may assume that the serial port is "free" and ready to send the next byte.

Finally, the RI bit means "Receive Interrupt." It functions similarly to the "TI" bit, but
it indicates that a byte has been received. That is to say, whenever the 8051 has received a
complete byte it will trigger the RI bit to let the program know that it needs to read the value
quickly, before another byte is read.

Setting the Serial Port Baud Rate

Once the Serial Port Mode has been configured, as explained above, the program
must configure the serial ports baud rate. This only applies to Serial Port modes 1 and 3. The
Baud Rate is determined based on the oscillator’s frequency when in mode 0 and 2. In mode

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 20


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

0, the baud rate is always the oscillator frequency divided by 12. This means if your crystal is
11.059 MHz, mode 0 baud rate will always be 921,583 baud. In mode 2 the baud rate is
always the oscillator frequency divided by 64, so a 11.059Mhz crystal speed will yield a baud
rate of 172,797.

In modes 1 and 3, the baud rate is determined by how frequently timer 1 overflows.
The more frequently timer 1 overflows, the higher the baud rate. There are many ways one
can cause timer 1 to overflow at a rate that determines a baud rate, but the most common
method is to put timer 1 in 8-bit auto-reload mode (timer mode 2) and set a reload value
(TH1) that causes Timer 1 to overflow at a frequency appropriate to generate a baud rate.

To determine the value that must be placed in TH1 to generate a given baud rate, we
may use the following equation (assuming PCON.7 is clear).

TH1 = 256 - ((Crystal / 384) / Baud)

If PCON.7 is set then the baud rate is effectively doubled, thus the equation becomes:

TH1 = 256 - ((Crystal / 192) / Baud)

For example, if we have an 11.059 MHz crystal and we want to configure the serial port to
19,200 baud we try plugging it in the first equation:

TH1=256-((Crystal/384)/Baud)
TH1=256-((11059000/384)/19200)
TH1=256-((28,799)/19200)
TH1 = 256 - 1.5 = 254.5

As you can see, to obtain 19,200 baud on a 11.059Mhz crystal wed have to set TH1 to
254.5. If we set it to 254 we will have achieved 14,400 baud and if we set it to 255 we will
have achieved 28,800 baud. Thus were stuck...

But not quite to achieve 19,200 baud we simply need to set PCON.7 (SMOD). When
we do this we double the baud rate and utilize the second equation mentioned above. Thus we
have:

TH1=256-((Crystal/192)/Baud)
TH1=256-((11059000/192)/19200)

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 21


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

TH1=256-((57699)/19200)
TH1 = 256 - 3 = 253

Here we are able to calculate a nice, even TH1 value. Therefore, to obtain 19,200 baud with
an 11.059MHz crystal we must:

1.Configure Serial Port mode 1 or 3.


2. Configure Timer 1 to timer mode 2 (8-bit auto-reload).
3. Set TH1 to 253 to reflect the correct frequency for 19,200 baud.
4. Set PCON.7 (SMOD) to double the baud rate.

Writing to the Serial Port

Once the Serial Port has been properly configured as explained above, the serial port
is ready to be used to send data and receive data. If you thought that configuring the serial
port was simple, using the serial port will be a breeze.

To write a byte to the serial port one must simply write the value to the SBUF (99h)
SFR. For example, if you wanted to send the letter "A" to the serial port, it could be
accomplished as easily as:

MOV SBUF,#A

Upon execution of the above instruction the 8051 will begin transmitting the character
via the serial port. Obviously transmission is not instantaneous--it takes a measureable
amount of time to transmit. And since the 8051 does not have a serial output buffer we need
to be sure that a character is completely transmitted before we try to transmit the next
character.

The 8051 lets us know when it is done transmitting a character by setting the TI bit in
SCON. When this bit is set we know that the last character has been transmitted and that we
may send the next character, if any. Consider the following code segment:

CLR TI ; Be sure the bit is initially clear


MOV SBUF,#A  ;Send the letter A to the serial port
JNB TI,$  ;Pause until the TI bit is set.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 22


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

The above three instructions will successfully transmit a character and wait for the TI
bit to be set before continuing. The last instruction says "Jump if the TI bit is not set to $"--$,
in most assemblers, means "the same address of the current instruction." Thus the 8051 will
pause on the JNB instruction until the TI bit is set by the 8051 upon successful transmission
of the character.

Reading the Serial Port

Reading data received by the serial port is equally easy. To read a byte from the serial
port one just needs to read the value stored in the SBUF (99h) SFR after the 8051 has
automatically set the RI flag in SCON.

For example, if your program wants to wait for a character to be received and subsequently
read it into the Accumulator, the following code segment may be used:

JNB RI,$  ;Wait for the 8051 to set the RI flag


MOV A,SBUF  ;Read the character from the serial port

The first line of the above code segment waits for the 8051 to set the RI flag; again,
the 8051 sets the RI flag automatically when it receives a character via the serial port. So as
long as the bit is not set the program repeats the "JNB" instruction continuously.

Once the RI bit is set upon character reception the above condition automatically fails
and program flow falls through to the "MOV" instruction which reads the value.

16X2 LCD interface (JHD162A – HD44780 compatible Display Controller)

The LCD interfaced to the system was a 16 characters and 2 lines type JHD162A from Jin
Hang Displays Co. China. The LCD module consists of a Hitachi HD44780 type LCD controller with a
Character generator ROM and Display Data Ram. The module consists of 16 interface pins and
signals as listed below.

Pin No. Signal Description


1 GND Power Ground
2 VCC +5VDC Power Input
3 VEE Contrast Voltage
4 RS Register Select
(0=Command, 1=Data)
5 R/W’ Read/Write Select
(0=Write, 1=Read)
6 EN Strobe Input

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 23


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

(A high to low transition


latches data to input
registers)
7-14 D0-D7 Data Input / Output Lines
15 A Backlight +5V Power
16 K Backlight Power Ground
Table 4:LCD interface Pin description

The LCD display can be interfaced to the system in either 4 bit or 8 bit data interface
length mode but we have selected an 8 bit interface mode for faster display data update. The
previous mode could be used in applications where the number of I/O pins availability is
limited i.e. A smaller MCU with less I/O Pins.

The LCD is interfaced to the MCU with data lines connected to port 1 of the 8051 and
control lines RS, EN connected to port 3.2, 3.3 respectively. The R/W control line is
permanently tied to ground for write only operations to the LCD display.

The program is coded in 8051 assembly for interfacing the display, and compiled
using an 8051 cross assembler ASM51.The assembled program in the form of an Intel HEX
file is generated by the assembler which is further uploaded to the 8051 target board using a
In circuit programming software – Flash Magic developed by ESA, for in circuit
programming of NXP micro controllers.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 24


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Figure5.7: LCD Display Initialization Procedure

Figure 5.8:LCD Display Module Mechanical Dimensions & Pin Configurations

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 25


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

4X4 Hex Keypad Interface

A 4X4 scanned keyboard is connected to the system to facilitate user input and the
same is read by the MCU board which is further sent for processing to the PC via the UART
interface. The keys are connected in a matrix fashion with Rows, and Column Scan
technique.

To check for the keystroke, a polling method has been used.

PORT 2.4 Key 1 Key 2 Key 3 Key 4

PORT2.5 Key 5 Key 6 Key 7 Key 8

PORT2.6 Key 9 Key 10 Key 11 Key 12

PORT2.7 Key 13 Key 14 Key 15 Key 16

  PORT2.0 PORT2.1 PORT2.2 PORT2.3

Table 5:Hex keypad interface

The connections are similar as shown over here.  The key scan logic is developed like
this – first the MCU turns off Row:0 while keeping Rows:1-3 on and scans for a low input at
Column 0:3 if say the key 2 is pressed then while scanning the second column the MCU will
get a low input and the same is processed as ASCII “2” in the accumulator which is further
transferred to the UART. A brief delay is included in the program for automatic key
repetitions and this arrangement also eliminates and noise transitions on the input scan line.
All the input scan lines are weakly pulled high using a 10K resistor connected between
Column 0:3 to VCC.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 26


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Fabrication

The fabrication of complete circuit was done on a readily available 8051 demo PCB
which was available as a readily populated board consisting of MAX232, LM7805, PIN
Headers, 40PIN DIP Socket, P89V51RD MCU, D9 connector, and other passive components.
The LCD was connected to port 1, and 3 of the MCU and keypad was interfaced to port 2
with external pull up resistors of 10K connected to the return scan lines Column 0:3.

Figure 5.9 Fabrication of complete circuit

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 27


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

5.4.2 Color Sensor TCS34725FN

The TCS3472 device provides a digital return of red, green, blue (RGB), and clear light
sensing values. An IR blocking filter, integrated on-chip and localized to the color sensing
photodiodes, minimizes the IR spectral component of the incoming light and allows color
measurements to be made accurately. The high sensitivity, wide dynamic range, and IR
blocking filter make the TCS3472 an ideal color sensor solution for use under varying
lighting conditions and through attenuating materials. This data is transferred via an I2C to the
host.

Figure 5.10 : Functional block diagram

Detailed Description
The TCS3472 light-to-digital converter contains a 3 × 4 photodiode array, four
analog-to-digital converters(ADC) that integrate the photodiode current, data registers, a state
machine, and an I2C interface. The 3 × 4photodiode array is composed of red-filtered, green-
filtered, blue-filtered, and clear (unfiltered) photodiodes. In addition, the photodiodes are
coated with an IR-blocking filter. The four integrating ADCs simultaneously convert the
amplified photodiode currents to a 16-bit digital value. Upon completion of a conversion
cycle, the results are transferred to the data registers, which are double-buffered to ensure the
integrity of the data. All of the internal timing, as well as the low-power wait state, is
controlled by the state machine.Communication of the TCS3472 data is accomplished over a
fast, up to 400 kHz, two-wire I2C serial bus. The industry standard I2C bus facilitates easy,
direct connection to microcontrollers and embedded processors. In addition to the I2C bus,
the TCS3472 provides a separate interrupt signal output.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 28


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

When interrupts are enabled, and user-defined thresholds are exceeded, the active-low
interrupt is asserted and remains asserted until it is cleared by the controller. This interrupt
feature simplifies and improves the efficiency of the system software by eliminating the need
to poll the TCS3472. The user can define the upper and lower interrupt thresholds and apply
an interrupt persistence filter.
The interrupt persistence filter allows the user to define the number of consecutive
out-of-threshold events necessary before generating an interrupt. The interrupt output is open-
drain, so it can be wire-ORed with other devices.

Key Features
 Integrated IR blocking filter
 3.8M:1 dynamic range
 Four independent analog-to-digital converters
 A reference-channel for Color Analysis (Clear channel photo-diode)

Key Benefits

 Minimizes IR and UV spectral component effects to produce accurate color


measurement
 Enables accurate color and ambient light sensing under varying lighting conditions
 Minimizes motion / transient errors
 Clear-Channel provides a reference allows for isolation of color content   

5.4.3 Rasbperry Pi A+ board

One powerful feature of the Raspberry Pi is the row of GPIO (general purpose
input/output) pins along the edge of the board, next to the yellow video out socket. These pins
are a physical interface between the Pi and the outside world. At the simplest level, you can
think of them as switches that you can turn on or off (input) or that the Pi can turn on or off
(output). Seventeen of the 26 pins are GPIO pins; the others are power or ground pins.

You can program the pins to interact in amazing ways with the real world. Inputs don't
have to come from a physical switch; it could be input from a sensor or a signal from another
computer or device, for example.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 29


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

The output can also do anything, from turning on an LED to sending a signal or data to
another device. If the Raspberry Pi is on a network, you can control devices that are attached
to it from anywhere and those devices can send data back. Connectivity and control of
physical devices over the internet is a powerful and exciting thing, and the Raspberry Pi is
ideal for this.

5.4.4 ARM PROCESSOR 1176

The ARM1176™ applications processors deployed broadly in devices ranging from smart
phones to digital TV's to eReaders, delivering media and browser performance, a secure
computing environment, and performance up to 1GHz in low cost designs. The ARM1176JZ-
S processor features ARM TrustZone® technology for secure applications and ARM
Jazelle® technology for efficient embedded Java execution. Optional tightly coupled
memories simplify ARM9™ processor migration and real-time design, while AMBA® 3
AXITM interfaces improve memory bus performance. DVFS support enables power
optimization below the best-in-class nominal static and dynamic power of the ARM11TM
processor architecture.

Performance to enable excellent end-user experience


 750MHz (TSMC 65GP) with conservative design 1GHz+ with design optimizations
 Low latency mode for interrupt responsiveness.
 Physically addressed caches for multi-tasking performance
 Full Internet experience

Product maturity enables rapid time to market and low risk


 Well proven technology in wide range of applications
 Available as soft core or hard macro from ARM
 Comprehensive range of development tools from ARM and from third parties

Low Power Leadership


 Shutdown modes, Clock Gating, and DVFS capability
 93% of flops are clock gated

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 30


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

 Separate Main TLB and Micro-TLBs --> main TLB is not clocked unless micro-TLB
misses
 Avoids unnecessary Tag-RAM and Data-RAM activity for sequential accesses
 Predictive use of Cache or TCM

DVFS - supported by the ARM1176


 Physical IP Power Management Kit Clamps allow core to shut down while TCM still
enabled in Dormant mode
 Asynchronous interfaces allow core to run at non-integer multiple of bus frequency
 L-Shift clamps allow core voltage to differ from rest of SoC

Functions supported in hardware:


 Multiplication, addition, and multiply-accumulate ( various variants)
 Division and square root operation (multi-cycle, not pipelined)
 Comparisons and format conversions
 Operations can be performed on short vectors (From assembler only)
 Separate pipelines allow load/store and MAC operations to occur simultaneously with
divide/square root unit operation
 VFP may be powered-down when not in use

5.4.5 IR Phototransistors

Features
․High reliability
․High radiant intensity
․Peak wavelength λp=940nm
․2.54mm Lead spacing
․Low forward voltage
․Pb Free
․This product itself will remain within RoHS compliant version.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 31


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Description

․EVERLIGHT’s Infrared Emitting Diode (IR204-A) is a high intensity diode , molded in a


blue transparent plastic package.
․The device is spectrally matched with phototransistor , photodiode and infrared receiver
module.

Applications

․Infrared applied system

5.4.6 COMPARATOR LM 324

The LM324 series consists of four independent, high gain, internally frequency
compensated operational amplifiers which were designed specifically to operate from a single
power supply over a wide range of voltages. Operation from split power supplies is also
possible and the low power supply current drain is independent of the magnitude of the
power supply voltage.

Application areas include transducer amplifiers, DC gain blocks and all the
conventional op amp circuits which now can be more easily implemented in single power
supply systems. For example, the LM324 series can be directly operated off of the standard +
5V power supply voltage which is used in digital systems and will easily provide the required
interface electronics without requiring the additional – 15V power supplies.

FEATURESures
• Internally frequency compensated for unity gain
• Large DC voltage gain 100 dB
• Wide bandwidth ( unity gain) 1 MHz ( temperature compensated)
• Wide power supply range: Single supply 3V to 32V or dual supplies – 1.5V to – 16V
• Very low supply current drain ( 700 á A) — essentially independent of supply voltage
• Low input biasing current 45 nA ( temperature compensated)
• Low input offset voltage 2 mV and offset current: 5 nA
• Input common- mode voltage range includes ground
• Differential input voltage range equal to the power supply voltage
• Large output voltage swing 0V to V+ - 1.5V

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 32


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Pin configuration

Figure 5.11:Pin configuration of LM324

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 33


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

5.4.7 Decade Counter CD4017

The CD4017BM/CD4017BC is a 5-stage divide-by-10 John- son counter with 10


decoded outputs and a carry out bit. The CD4022BM/CD4022BC is a 4-stage divide-by-8
John- son counter with 8 decoded outputs and a carry-out bit.

These counters are cleared to their zero count by a logical ‘‘1’’ on their reset line.
These counters are advanced on the positive edge of the clock signal when the clock
enable sig- nal is in the logical ‘‘0’’ state. The configuration of the
CD4017BM/CD4017BC and CD4022BM/CD4022BC permits medium speed operation
and assures a hazard free counting sequence. The 10/8 decoded outputs are normally in
the logical ‘‘0’’ state and go to the logical ‘‘1’’ state only at their respective time slot.
Each decoded output remains high for 1 full clock cycle. The carry-out signal completes a
full cycle for every 10/8 clock input cycles and is used as a ripple carry signal to any
succeeding stages.

Features

Wide supply voltage range .

High noise immunity.

Low power Fan out of 2 driving 74L TTL compatibility

Fully static operation

Applications

Automotive

Instrumentation

Medical electronics

Alarm systems

Industrial electronics

Remote metering

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 34


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

5.4.8 Stepper Motor

A stepper motor is an electromechanical device which converts electrical pulses into


discrete mechanical movements. The shaft or spindle of a stepper motor rotates in discrete
step increments when electrical command pulses are applied to it in the proper sequence. The
motors rotation has several direct relationships to these applied input pulses. The sequence of
the applied pulses is directly related to the direction of motor shafts rotation. The speed of the
motor shafts rotation is directly related to the frequency of the input pulses and the length of
rotation is directly related to the number of input pulses applied.

Advantages

1. The rotation angle of the motor is proportional to the input pulse.


2. The motor has full torque at standstill (if the windings are energized)
3. Precise positioning and repeatability of movement since good stepper motors have an
accuracy of 3 – 5% of a step and this error is non cumulative from one step to the next.
4. Excellent response to starting/ stopping/reversing.
5. Very reliable since there are no contact brushes in the motor. Therefore the life of the
motor is simply dependant on the life of the bearing.
6. The motors response to digital input pulses provides open-loop control, making the motor
simpler and less costly to control.
7. It is possible to achieve very low speed synchronous rotation with a load that is directly
coupled to the shaft.
8. A wide range of rotational speeds can be realized as the speed is proportional to the
frequency of the input pulses.

Disadvantages

1. Resonances can occur if not properly controlled.


2. Not easy to operate at extremely high speeds.

Open Loop Operation

One of the most significant advantages of a stepper motor is its ability to be


accurately controlled in an open loop system. Open loop control means no feedback
information about position is needed.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 35


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

This type of control eliminates the need for expensive sensing and feedback devices
such as optical encoders. Your position is known simply by keeping track of the input step
pulses

5.4.9 Servo motor

5.5 SOFTWARE DESCRIPTION

5.5.1 PYTHON PROGRAMMING LANGUAGE

Python is a general-purpose, dynamic, object-oriented programming language. The


design purpose of the Python language emphasizes programmer productivity and code
readability. Python was initially developed by Guido van Rossum. It was first released in
1991. Python was inspired by ABC, Haskell, Java, Lisp, Icon and Perl programming
languages. Python is a high level, general purpose, multiplatform, interpreted language.
Python is a minimalistic language. One of its most visible features is that it does not use
semicolons nor brackets. Python uses indentation instead. There are two main branches of
Python currently. Today, Python is maintained by a large group of volunteers worldwide.
Python is open source software. Python is an ideal start for those, who want to learn
programming.

Python programming language supports several programming styles. It does not force a
programmer to a specific paradigm. Python supports object oriented and procedural
programming. There is also a limited support for functional programming.

The programming language you will learn is Python. Python is an example of a high-
level language; other high-level languages you might have heard of are C, C++, Perl, and
Java. There are also low-level languages, sometimes referred to as “machine languages” or
“assembly languages.” Loosely speaking, computers can only execute programs written in
low-level languages. So programs written in a high-level language have to be processed
before they can run. This extra processing takes some time, which is a small disadvantage of
high-level languages.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 36


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

The advantages are enormous. First, it is much easier to programing a high-level


language. Programs written in a high-level language take less time to write, they are shorter
and easier to read, they are more likely to be correct, and are easier to maintain. Second,
high-level languages are portable, meaning that they can run on different kinds of computers
with few or no modifications.
Low-level programs can run on only one kind of computer and have to be rewritten to
run on another. Due to these advantages, almost all programs are written in high-level
languages. Low-level languages are used only for a few specialized applications. Two kinds
of programs process high-level languages into low-level languages: interpreters and
compilers. An interpreter reads a high-level program and executes it, meaning that it does
what the program says. It processes the program a little at a time, alternately reading lines and
performing computations.

Source code
Interpreter output

A compiler reads the program and translates it completely before the program starts
running. In this context, the high-level program is called the source code, and the translated
program is called the object code or the executable. Once a program is compiled, you can
execute it repeatedly without further translation.

Source code
Compiler Object code Executer output

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 37


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Python is considered an interpreted language because Python programs are executed


by an interpreter. There are two ways to use the interpreter: interactive mode and script mode.
In interactive mode, you type Python programs and the interpreter prints the result:
>>> 1 + 1
2
The chevron, >>>, is the prompt the interpreter uses to indicate that it is ready. If you
type 1 + 1, the interpreter replies 2.Alternatively, you can store code in a file and use the
interpreter to execute the contents of the file, which is called a script. By convention, Python
scripts have names that end with .py.

To execute the script, you have to tell the interpreter the name of the file. In a UNIX
command window, you would type python dinsdale.py. In other development environments,
the details of executing scripts are different. Working in interactive mode is convenient for
testing small pieces of code because you can type and execute them immediately. But for
anything more than a few lines, you should save your code as ascript so you can modify and
execute it in the future.

Tkinter

Tkinter is a Python binding to the Tk GUI toolkit. Tk is the original GUI library for the Tcl
language. Tkinter is implemented as a Python wrapper around a complete Tcl interpreter
embedded in the Python interpreter. There are several other popular Python GUI toolkits.
Most popular are wxPython, PyQt and PyGTK.

5.5.2 Flow Chart

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 38


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

5.6 APPLICATIONS
The system has many applications in various fields, as this system provides the sorting of
objects, in flow of objects by multisensing. Mainly this finds the important application in
agriculture field where it can be used to sort the different agriculture products like grains,
lemons, almonds, grapes, and different kind of fruits. For human beings it becomes comber
sum task to sort out the objects with high quality also the possibility of accuracy is less. In
industry it can be used for sorting of various objects and tools with different sizes. By this
way the proposed project can be used. It finds application in enormous way in agriculture,
industry.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 39


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Chapter 6

CONCLUSION

The objects with different color can be determined by using advanced color sensor
TCS34725FN and objects with different size also can be determined by arrary matrix .Finally
all the objects are picked and placed by pick and place robot with efficient manner. It reduces
the time and cost of investment is also very low as compared to other robots.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 40


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

References

[1]AbhishekKondhare, “ColourAnd Shape Based Object Sorting,” AISSM’s Institute Of


Information Technology.Dept. Of Electronics Engineering, Pune, India, et al IJSRE Volume 2 Issue 3
March 2014

[2]Tamboli Amir S., BhideAmeya D., Varhade Amit M., Mandlik Sachin B, “Gprs
Controlled Weighing System Of Fruit Sorting And Transportation Gyro Car Based On
Arm,”International journal of technology enhancements and emerging engineering research,
vol 2, issue 4 72 issn 2347-4289,2014.

[3] Aji Joy, Object Sorting Robotic Arm Based on Colour Sensing,” Assistant Professor,
Department of Electronics and Communication Engineering, Mar Athanasius College of Engineering,
Kothamangalam, Kerala, “International Journal of Advanced Research in Electrical, Electronics and
Instrumentation Engineering ,Vol. 3, Issue 3, March 2014.

[4]C. Chandra Mouli and K. NagabhushanRaju, “A Review on Wireless Embedded System for
Vision Guided Robot Arm for Object Sorting,” International Journal of Scientific &Engineering
Research, Volume 4, Issue 7, 33 ISSN 2229-5518, July-2013

[5] Vaishak N. L, C.G. Ram Chandra, “Embedded Robot Control System Based On an
Embedded Operating System, the Combination of Ad-vanced RISC Microprocessor
(ARM), DSP and ARM Linux”, Interna-tional Journal of Engineering and Innovative
Technology (IJEIT), Vol. 2, Issue 6,pp. 143 – 147, ISSN: 2277-3754, December 2012.

[6] ShwetaPatil, Sanjay Lakshminarayan,”Position Control of Pick and Place Robotic


Arm”,EIE’s 2nd Intl’ Conf.Comp., Energy, Net., Robotics and Telecom. EIE Con2012.

[7] YeowKhang Yung, “Color Sorting System with Robot Arm,’’ Faculty of Electronic and
Computer Engineering University Technical Malaysia Melaka,(2011).

[8]ArkoDjajadi, Fiona Laoda, RusmanRusyadi, TutukoPrajogo, MaraloSinaga , “A Model Vision Of


Sorting System Application Using Robotic Manipulator,” Mechatronics Department, Faculty of

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 41


Detection & Distinction of Colors using Color Sorting Robotic Arm in a Pick & Place Mechanism

Engineering, Swiss German UniversityEduTown BSD City, Tangerang 15339, Indonesia, ISSN:
1693-6930 Terakreditasi DIKTI, SK No: 51/DIKTI/Kep/2010.

[9] M. H. Liyanage, N. Krouglicof, R. Gosine, “High speed electro-hydraulic Actuator for a scara
type robotic arm,” International Conference on Intelligent Robots and Systems (IROS), pp. 470–476,
2010.

[10]MohdJohaneis Bin Abu Bakar, “Visualization Robot Sorter,” Faculty of Electrical &
Electronics Engineering Universiti Malaysia Pahang, November, 2007.

[11]Paul Fitzpatrick, “Role Transfer For Robot Tasking,”NE43-936,200 Technology


Square,Cambridge, MA 02139, Massachusetts Institute of TechnologyDepartment of Electrical
Engineering and Computer Science, April 2003.

M.Tech.(IAR),Department of Mechanical Engineering,MCE,HASSAN. Page 42

You might also like