You are on page 1of 5

Proceedings of the IEEE 2017 International Conference on Computing Methodologies and Communication

(ICCMC)

Design and implementation of RGB color line


following robot
GADHVI SONAL PUNIT RANINGA HARDIK PATEL
Research Scholar Assistant Professor Assistant Professor
Electronics and Communication Electronics and Communication Electronics and Communication
Parul University Parul University Parul University
Vadodara-India Vadodara-India Vadodara-India

Abstract: This paper describes design and implementation of system guidance, and and wireless communication using
RGB color line following robot. The robot can differentiate RFID as inputs from the transmitter as remote to determine the
among this three colors and according to given instruction it will prioritized color in the system when the system is
follow the three different color lane. unlike any other simple line activated.[2[The system will be built using the dsPIC16F877A
follower robot having the ability to detect the presence of obstacle
microcontroller as the center of the process and color sensor
on its path. The color sensor system is built in using colored LED
and LDR as main component. The robot is capable of following system using three red, blue and green colored LEDs.
very congested curves as it receives the continuous data from the 1.Sensors : Two types of sensors are used in robots for
sensors. This robot avoids collision and moreover it can detect gathering the necessary information. This sensors are line
collision with obstacle sensor. sensor and the IR obstacle sensor.
Keywords: line follower, RGB,LED,LDR 1.1 Line Sensor An infrared emitter is an LED which is made
up from gallium arsenide. this emits infrared energy of about
880nm. which emits near infrared energy at about 880nm. The
I. INTRODUCTION IR is a phototransistor which acts as a transistor and the base
Line follower robots are one type of mobile robot having voltage is determined by the amount of light fall on the
ability to follow a line very accurately which have an onboard transistor.therefore.it will act as a variable current source.
hardwired control circuit [8],[9] and [1].The line follower Current flow as high amoumt as more no. of IR light in
robot has great importance in industrial manufacturing collector emmiter. this phototransistor is wired same as the
process, automation, carrying cartage in a specific direction configuration in the voltage divider. in the pull up resistor
etc. The transportation of goods and mobilization in industries voltage drop occurs due to the variable current which travels
and other offices still are operated manually. The drawback of through the resistor. This voltage is output of the device.
the system is it cannot move from one position to other
independently and one person is required to operate system. as This IR reflectant sensor contain matched transmitter and
the system is driven by any operator cancels of mistakes. as receiver pair. it works as the by measuring the more no. of
the system is operated by the operator there are many chances light falls on the receiver. This receiver is responding to
of negligence in operation of vehicle and more in process of ambient light and device works good when well covered
assembly line in industry. therefore mitigating these weakness from ambient light and the small distance between the sensor
the available solution used is automated system such as and the reflective surface. this sensors are also used to detect
automated guided vehicle. its one example is line follower white and black surfaces. The White surfaces usually reflect
robot. For the transportation needs in the industries, the robot good and black surface will reflect poorly. the other colors
must have the abilities to move from one place to another and will be having voltage drops in between white and black color.
required destination by following different routes.[2] By using The sensor is said to be good if it can differentiate different
it, the student will try to learn the current trends in automation colors when the separation between the two colors is too
technology which is related to the use of mechanical, small. An logical equation is developed to find to extract color
electronic, control, and computer-based information and building the line follower robot. For the
programming.[3].These unpleasant boredom and tiring j obs reducing the ambient light interference line sensors will be
can be easily performed by this placed in a bounded region in where there is no ambetient line
proposed robot as the robot is untiring, obedient and useful in interference takes place.
these routine j obs for industries [10-11] . Practical 3.2 Obstacle Sensor The IR sensor is used for detection of the
applications of a line follower include automated cars running presence of an obstacle. This sensor will be consisting of the
on roads with embedded magnets and guidance system for IR transmitter and receiver. In it will be an LED which will
industrial robots moving on shop floors etc [6,15] emit light on an robot and if there is presence of obstacle in a
In this research we propose a line-follower robot system that robot which will be blocking its line than the receiver will pick
will be able to recognize some kind of colors and in this case up the reflected light and will produce logic 1 which will
the basic colors Red, Green and Blue (RGB) as being the force the robot to stop.if its not there than the output will be 0.

978-1-5090-4890-8/17/$31.00 ©2017 IEEE 442

Authorized licensed use limited to: Universiti Kuala Lumpur. Downloaded on August 27,2020 at 16:09:59 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the IEEE 2017 International Conference on Computing Methodologies and Communication
(ICCMC)

II. RGB COLOR DTECTION AND COLOR SENSOR addition of it three different variable resistor is added in this
DESIGN circuit .this is done for brightness calibration. this will give us
The idea an color sensor is constructed by using light the desired luminous on the output level.[2]
dependent resistor (LDR) and three color LEDs namely red
LED ,blue LED , green LED. so, these will be the three
different color led’s .if were shining a red light on the green
and red object, the red object will reflect more light to the
sensor than the green object to the LDR sensor. the brightest
color that will be detected by the LDR sensor will be the red
color.
The definition of the LDR sensor is that it is being used for
determining the lux levels from the LEDS that will be
reflected from the object. the LDR is a resistor. the LDR
change its value that is resistive will be converted into ohms
.this converted value is dependent on the value of the lux of
the reflected from the light of LED on the surface of the object
received.
Figure 3:Block Diagram of LFR
III. MICROCONTROLLER CODING
METHODOLOGY
Microcontroller only understands 0 and 1. Here 1 means any
nonzero value.[4] Whenever the LDR sensor receives the
different intensities of light , it makes a path for current to pass
and hence the ADC module gets some digital number for the
analog signal. This digital number is used as the operating
principal for the MCU coding.The microcontroller sends
Figure1:color sensor construction instructions to the driver after processing the data received
from sensors. [10]. There are a lot of programmers and we
In the figure we can see the ldr color system design. In it must use a programmer which can support our
the three different color LEDS which are red , blue and green microcontroller. [7,13] and [14]. At the transmitter we’ve used
are being enclosed in the reflective Material which is made p PIC microcontroller and at receiver dsPIC microcontroller is
of shining zinc is used to get as much as light that will be used. The program is written with language C in MPLAB IDE
reflected from it to the LDR. the next figure shown below is .Main program is given below:
the circuit of the ldr.
Transmitter:
int main(void)
{
//************ Initlization ********************
IO_INITLIZATION();
// Input Output Configuration
InitTimer1();
InitUART();
Init_LCD();

// -=-=- Welcome LCD Message -=-=-=


strcpy(&disp_buffer[0], " Color System ");
strcpy(&disp_buffer[16]," TX ");
disp_val();

__delay_ms(3000);

Figure 2:LDR sensor circuit design //memset(&disp_buffer[0],' ',32);


For the better brightness of the led’s the high luminous strcpy(&disp_buffer[0], "R= Y= ");
strcpy(&disp_buffer[16],"B= ");
intensity led’s are used in this project. The motor driver
namely l293d will act as a switching device is connected to the
//--------------------------------------
led’s .the current value and the voltage value are being kept
while(1)
constant at the output of all the three different color led’s. in
{

978-1-5090-4890-8/17/$31.00 ©2017 IEEE 443

Authorized licensed use limited to: Universiti Kuala Lumpur. Downloaded on August 27,2020 at 16:09:59 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the IEEE 2017 International Conference on Computing Methodologies and Communication
(ICCMC)

CheckKeyboard(); }
else
disp_val(); {
} RELAY2=0;
} }
}
Receiver: else if(SelectColor==G_COLOR)
int main(void) {
{ if(G_Color1>100)
//************ Initlization ******************** {
IO_INITLIZATION(); RELAY1=1;
// Input Output Configuration }
InitUART1(); else
InitUART2(); {
InitTimer1(); RELAY1=0;
Init_LCD(); }

// -=-=- Welcome LCD Message -=-=-= if(G_Color2>100)


strcpy((char*)&disp_buffer[0], "Multicolor "); {
strcpy((char*)&disp_buffer[16],"Follower Robot "); RELAY2=1;
disp_val(); }
else
for(i=0;i<50;i++) delay(60000); {
RELAY2=0;
//memset(&disp_buffer[0],' ',32); }
strcpy((char*)&disp_buffer[0], "S1= "); }
strcpy((char*)&disp_buffer[16],"S2= "); else if(SelectColor==B_COLOR)
{
if(B_Color1>100)
while(1) {
{ RELAY1=1;
CheckKeyboard(); }
else
chartostr(R_Color1,&disp_buffer[3],3); {
chartostr(G_Color1,&disp_buffer[7],3); RELAY1=0;
chartostr(B_Color1,&disp_buffer[11],3); }

chartostr(R_Color2,&disp_buffer[19],3); if(B_Color2>100)
chartostr(G_Color2,&disp_buffer[23],3); {
chartostr(B_Color2,&disp_buffer[27],3); RELAY2=1;
}
if(StartSystem==1) else
{ {
if(SelectColor==R_COLOR) RELAY2=0;
{ }
if(R_Color1>100) }
{ }
RELAY1=1;
} disp_val();
else
{ for(i=0;i<10;i++) delay(60000);
RELAY1=0; }
} }

if(R_Color2>100)
{
1V.RESULTS
RELAY2=1;
COLOR SENSOR BLOCK TEST:

978-1-5090-4890-8/17/$31.00 ©2017 IEEE 444

Authorized licensed use limited to: Universiti Kuala Lumpur. Downloaded on August 27,2020 at 16:09:59 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the IEEE 2017 International Conference on Computing Methodologies and Communication
(ICCMC)

Table 1:Color sensor block test


NO. Track color Sensor 1 Sensor 2

RED LED ON
1 Red 58 66
2 Green 21 33
3 Blue 10 17
GREEN LED ON

1 Red 9 13
2 Green 56 61
3 Blue 8 13
BLUE LED ON
1 Red 11 9
Fig 4. Transmitter(remote) line follower robot
2 Green 13 14
3 Blue 44 49
CONCLUSION
The decimal data from ADC with 0-1024 range is being used Robotic system designed in this research has been able to
in the color sensor detection results shown in the table1.the recognize input from the transmitter and prove theory of
system recognizes which path to follow based on the brightest theory of reflection of color light as theoretical basis of color
color reflection received by the sensor. The initial input is
received from the transmitter and then the system will color sensor system. we have introduced switches so that it
activate which color LED is to be used. The final hardware of can be easily operated. The robot is able to detect red, blue
the RGB line follower robot is shown in fig 3 and 4 and green color. Light calibration was challenging task. The
respectively.[2] system have optimum result of color line detection and
successfully move towards the lane with 0.082 m/s movement
speed.
ACKNOWLEDGMENT
I would like to express my deep gratitude to my teacher and
supervisor Prof. PUNIT RANINGA and Prof. HARDIK
PATEL for their continuous encouragement and guidance.
Their advices have value lasting much beyond this project. I
am indebted to them for the valuable time they had spared for
me during the work.
I am thankful to Prof. Anuradha GHARGE, Head of the
Department of Electronics & Communication Engineering
who had provided all the official facilities to me.
Last but not least I would like to thank my parents, who taught
me the value of hard work by their own example. They
rendered me enormous support being apart during the whole
Fig 3. Receiver line follower robot tenure of my study in PARUL UNIVERSITY, Vadodara.

When, the resistance of the LDR is high, the light level is low REFERENCES
this prevents the current flowing through circuit .This will [1] Kazi Mahmud Hasan', Abdullah -AI-Nahid'*, K. J. Reza2, S. Khatun2,
“Sensor Based Autonomous Color Line Follower Robot with Obstacle
indicate that the voltage level increases. As given in sensor the Avoidance” Business Engineering and Industrial Applications Colloquium
LED are connected in circular order around the LDR. One (BEIAC), IEEE 2013.
[2] MB nugraha ,denny darlis, “Design and implementation of RFID line-
terminal of each LED and LDR are connected together to act follower robot system with color detection capability using fuzzy logic”
as ground for sensor module. The LED’s glows according to ICCEREC,IEEE 2015
[3] Eko Henfri Binugroho1, Derry Pratama2, Akhmad Zackarya Rizqy
delay provided to each set i.e. First Red set of LED then Syahputra3, “Control for Balancing Line Follower Robot using Discrete
Green and then Blue . Intensity of light for each set of LED Cascaded PID Algorithm on ADROIT V1 Education Robot” International
given by the LDR in terms of voltage. By comparing value of Electronics Symposium (IES),IEEE 2015
[4] F Kaiser1, S Islam2, W Imran3, K H Khan4, Prof. Rajesh Nema, “Line
voltage level for each set color of object can be determined. Follower Robot: Fabrication and accuracy measurement by data acquisition”
International Conference on Electrical Engineering and Information &
Communication Technology,IEEE 2014.

978-1-5090-4890-8/17/$31.00 ©2017 IEEE 445

Authorized licensed use limited to: Universiti Kuala Lumpur. Downloaded on August 27,2020 at 16:09:59 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the IEEE 2017 International Conference on Computing Methodologies and Communication
(ICCMC)

[5] Md. Abdul Kadir, Md. Belayet Chowdhury, Jaber AL Rashid, “An
autonomous industrial robot for loading and unloading goods”,IEEE 2015
[6] Kazi Mahmud Hasan, Abdullah-AI-Nahid, Abdullah Al Mamun,’
Implementation Of Autonomous Line Follower Robot,IEEE 2012
[7] Mehran pakdaman, M. Mehdi Sanaatiyan,” A Line Follower Robot from
design to Implementation: Technical issues and problems”,IEEE 2010
[8] Pakdaman, M.; Sanaatiyan, M.M., "Design and Implementation of Line
Follower Robot,", Second International Conference on Computer and
Electrical Engineering TCCEE '09, vol.2, pp.585-590,Dec.2009.
[9] PriyankPatil, "A VR Line Following Robot," Department of Information
Technology K. 1. Somaiya College of Engineering Mumbai, India. Mar 5,
2010.
[10] M. Shoham, Textbook of Robotics: I Basic Concepts. Israel: Eshed
Robotec Ltd, 1984
[11] R. D. Klafter, Robotic Engineering. New Delhi: Prentice-Hall of India,
2010
[12] Mustafa Engin1, Dil ad Engin2’, “Path planning of a line follower
robot”, Proceedings of the 5th European DSP Education and Research
Conference, 2012
[13] Cao Quoc Huy, "Line Follower Robot", University UPG din Ploiesti.
[14] A. Kahe, "AVR Microcontroller", Nas Publication, 2007.
[15] J. Kramer and M. Scheutz, "Development environments for autonomous
mobile robots: A survey," Autonomous Robots, vol. 22.

978-1-5090-4890-8/17/$31.00 ©2017 IEEE 446

Authorized licensed use limited to: Universiti Kuala Lumpur. Downloaded on August 27,2020 at 16:09:59 UTC from IEEE Xplore. Restrictions apply.

You might also like