Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Color sensor

Is the 3pi robot capable of sensing multiple colors of ground? For my contest I have to follow a black line on a green surface. A yellow shortcut apears and you have to follow that too…
I am going to build my own 3pi like robot and I was told the qtr reflectance sensors are like the one on the 3pi. Do these sense colour? If not, wich ones should I get instead?

Also, is it possible to add encoders to the wheels of the 3pi? I want to be able to manually drive it across the line and have him remember the track.

Hello.

The sensors on the 3pi detect reflected IR, so while different colors/surfaces might reflect different amounts IR, you are not actually sensing the color (e.g. two different yellow surfaces might appear completely different in terms of reflected IR). The only color sensors we carry are Parallax ColorPALs. You might be able to use that to detect the color of the line you are following while still using our QTR reflectance sensors to detect the line itself, but this really depends on whether there is a significant difference in IR reflectivity between your course’s line and its background. I’m worried that, for example, the yellow line and green surface might look approximately the same in IR, in which case you need a better way to detect the line (maybe a simple camera?).

The 3pi was not designed for the addition of encoders, and there are several big obstacles to adding them, perhaps the main one being the 3pi’s lack of free I/O lines (you can get around this if you use another processor to read the encoders). Still, at least a few people have managed to add encoders to their 3pis:


If you are actually making your own 3pi-like robot, it should be much easier to add encoders. Here is an example:

roboticsindia.com/entry.php/ … ot-(Part-2

Note that I’m not sure exactly what you mean by “remember the track”, but I suspect what you want to do will be much more difficult than you expect.

- Ben

Thanks for that answer, I am going to try the “mount a qtr” technique.

The contest is about following a specific path, a curved black line with a yellow section as a shortcut.
What I want to be able to do is use my hand to drive it along the track and then make it replay that specific path. I know this is going to be pretty hard but I am up for the challenge and still have months before the contest.

If you could please point me in the right direction for like an algorith or another way of storing these kind of things, that would be awesome.

Unfortunately, I don’t have an algorithm to point you to, and I expect storing the data will be tricky as 8-bit microcontrollers like the 3pi’s ATmega328 don’t have a lot of memory. I think you’ll have a much easier time writing a program to follow a line well than you will writing one to record wheel movements and play them back.

- Ben