Bench Test - GP2Y0A21YK

I little while back I was blogging about my mini-sumo project, the Pink Pearl, named after a brand of pink eraser I like. I had decided on the pink color because I believe, contrary to popular opinion, color does not matter at the mini-sumo scale. Here are the results of my first bench test using the Sharp GP2Y0A21YK (10-80 cm) sensor.

**Disclaimer - This test was not performed under highly controlled laboratory conditions, but by a robot geek in a garage.**

My setup was simple. I used the scale of a cutting mat I keep on my workbench to measure the distance. I was able to line the sensor up at the zero mark and place the target at the end of the scale. The scale provided the distance. I used a square to make ensure that everything was lined up correctly. I then recorded the voltage output on the sensor as I moved the target closer in 20 cm intervals up to 10 cm and 1 cm intervals up to 2 cm. I did this for three different color targets (flat white, glossy pink, & flat black)

made out of styrene, which is the material I chose to build the robot.

The tests revealed detectable differences between the colors, but the differences were only hundredths of a volt. The largest difference was 0.13 V between the black and white targets at 8 cm. The test voltage range was from about 0.65 V at 38 cm to 3.12 V at 6 cm. The background reading with no target in range was 0.06 V.

Graph1.jpg

The graph shows the results. For this series of tests, white was less detectable than black, but only by a few hundredths of a volt and only within 30 cm. Beyond 30 cm, black was less detectable than white. I didn't test beyond 38 cm because that value is about half the diameter of the mini-sumo ring and I felt that it was the most likely targeting range in a mini-sumo round. A result I found a little surprising was that the color I chose for the pink (Tamiya Light Red-glossy) was less detectable than both white and black in the middle range between 15 and 33 cm. The explanation I came up with is that the gloss of the paint had a scattering effect that reduced the amount of IR radiation returning to the sensor, but it could also be a systematic error due to my testing method.

Anyway, here's my argument for saying that color does not matter, even though the sensor can detect a difference. For color to be a factor in whether or not a robot target is detected, the hunter has to be programmed to respond to differences in sensor return on the order of hundredths of a volt, which I doubt happens. Add relative motion of the two bots and you introduce more uncertainty of detection. Furthermore, I didn't even look at sensor errors or environmental factors that could impact the sensor. What this test basically tells me is that if you're within the sensible range of one of these sensors and your opponent knows what he/she is doing, you're busted, regardless of color. My take-away is that I better make sure my robot is capable of winning a match and not fret too much over color.

Now I need to test this hypothesis with another IR sensor, but I'll have to build it and I need a circuit diagram. I'll have to get back with you on that.

Nice work, visualizing is

Nice work, visualizing is always so nice!

Any one making work with the Sharps should know this. Could we have them include a link to this page on the product, perhaps? :wink:

Ultra Sound

What would be really nice would be your testing of different Ultra Sound sensors on same graph.

I have a theory that the SRF05’s are the only ones making a steady liniar result, but seing like Ping, SRF05, and Maxbotics and Dagu’s stuff on same graph would be awsome!

I’m just saying :wink:

Hmmmm…

I could work on that. Just have to get the parts.

Hello Alamo

Hi,
Good experiment… Although I would think its a bit of a crap shoot with paints.  Different materials can behave quite differently.  I was at a museum where they had these wicked cool IR camera and a bunch of materials.  They had white things which looked black with IR, Black things in visible light could look black, visibly opaque things which were transparent with IR, etc…  Because the pigment of the paint reflects or absorbs visible red does not necessarily mean it will have the same behavior on near infrared.

The one item I know is IR absorbent is a Photo-voltaic cell - you could try making a shield out of them - then turn the shied into an eye !


I was wondering if you measured this on a measuring thingy?

!BwKOe,!!mk~$(KGrHqEOKj0EwOYbW1,eBMHqnpPhnQ~~_12.JPG

The reason I ask is I have found some "interesting" noise with a Sharp 2Y0A02.  I have just begun measuring some sensors, and the Sharp IR is one of the better matches for an Arduino default reference voltage.  It has a big range, but there's a nasty little spike occasionally.

Here it on the RobOscope - 

Thanks

You make some good points. You’re right, different materials will definitely affect the return signal of an IR sensor, but at this point I’m not focused on those materials. I just used two materials I saw as common to mini-sumo. I actually tested two materials, styrene and aluminum, but the results were basically the same, so I dropped the aluminum from my original post. I was mainly interested in how these sensors would see my robot.

I like the photo-voltaic cell idea. I’m not sure that they respond to IR radiation, but it would be cool to have a passive sensor array to sense the location of an opponent. It would be a fun experiment, though.

Yes, I used a measuring thingy. My oscilloscope is a 1960’s hand-me-down from my dad and is too big for the space I gave on my work bench. I might have to set it up and repeat the experiment to see if the spikes you are referring to have a pattern or if they are random. If they are random, I’m not sure there’s much I can do about it other than put a cpacitor on the sensor.

Yes, there are spikes on the

Yes, there are spikes on the Sharp sensor outputs. Here is a tip&walkthrough about how to  improve the sensor readings.

IR reflectivity as a measure of distance - not

The Sharp distance sensors do not take into account how much (IR) light returns from the detected object. They measure the angle at which it returns. Quite accurately, I imagine.

The IR light emitted by the sensor is not very concentrated (it’s not exactly a laser dot). Use any digital camera to see for yourself. So the detector must be able to discern the center of the light blob. Perhaps that is easier on some materials than on others.

If the differences in your measurement are even valid to begin with. Like you said, the differences are too small to be of any concern. I think they could just as easily be an error in your calibration setup.

Well, that would explain…

the tendency toward color blindness. You’re probably right about the error; however, it was good enough to give me an answer to my question. I need to find some other sensor variations. Thanks, rik.