0
$\begingroup$

I am building a line-following robot with a Raspberry Pi Zero, using the explorer PHat. The robot is supposed to follow black, red, green and blue lines and react to the colour, so it should drive faster on a red line and slower on a blue line.

I do not have much experience with line followers, so I am not sure what kind of hardware I need. My questions are:

  1. Is it possible to follow a red, blue or green line with IR LEDs? Most of the line followers obviously use IR LEDs (like TCRT5000), but they are supposed to only follow black lines.
  2. I have a RGB sensor which works quite well with the explorer PHat and I am able to recognize colours very accurately. Is it possible to use this single sensor as a line follower? As the robot should be able to drive on a curvy course a single sensor is probably not enough?
$\endgroup$
  • $\begingroup$ What kind of RGB sensor are you using? In the past, I successfully used a RGB Sensor (TCS230) for an application where similar to yours. You can use it if the lines are large enough for the sensor sensibility. $\endgroup$ – Marcus Barnet Nov 23 '16 at 19:21
1
$\begingroup$

Have you tried using combination of your RGB sensor with other sensors like LDR or photo diode. You can use these 2 sensors on the side with your RGB sensors at the centre which you say is quite accurate. You can set your potentiometer such that these 2 sensors can differentiate the background color from the lowers intensity line color. You can make a simple PID controller which can keep the robot following the line using the combination of these 3 sensors, while your RGB sensor can sense the coloured line as it is always on top of the line. I remember making a coloured line follower robot long back using photodiode which could sense the translation in color. Hope it helps.

$\endgroup$
0
$\begingroup$

IR sensors are about reflection. With TCRT5000, distinguishing black from white is based on the absorption of the black surface, it almost absorbs all of the IR waves. While white reflects almost all of it.

Now with different colours, it is all about how much difference is between their absorbtion or reflection capabilities. (I think, you won't be able to make difference between blue and black, unless if it is a really light blue.)

What you should do is make some tests. Hook-up a single TCRT5000 and measure with red, green, blue and other surfaces. Do a lot of measurements and analyze the results, so you can decide if those colours are entirely distinguishable.


Now the RGB sensor. You should add a datasheet if you want anyone to tell you if it can really work.

Is it possible to use this single sensor as a line follower? As the robot should be able to drive on a curvy course a single sensor is probably not enough?

Depends on how large is the area that a single sensor can cover. Is it a single pixel sensor or it can detect N x N pixel's colour? It is not impossible to use it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.