reflectance sensor

2 replies [Last post]
Title: NooBot+
Joined: 04/22/2010
BotPoints: 20
User offline. Last seen 13 years 2 weeks ago.

We were wondering how exactly do you use Reflectance Sensor because we just added one onto our robot and don't know how to use it. Any help is welcome.

Title: MiniBot+
Joined: 07/28/2009
BotPoints: 74
User offline. Last seen 11 years 7 weeks ago.

The reflectance sensor is actually pretty easy to use.
It is used for detecting black against white. (it does not work well for green, we tried)
it will read a high value (around 900) for black and a low value for white (around 100)
you use the function analog(int port) to call the value.
drive the robot forward, point the sensor down, and have it stop when it sees black.
This is how most people use it. People often also use more than one for accuracy.

Title: YAC
Joined: 04/12/2009
BotPoints: 94
User offline. Last seen 12 years 47 weeks ago.

The reflectance sensor emits IR light, and then measures the amount of IR light reflected back to it. You can, like Adam said, use it to detect black, which usually absorbs light on the IR spectrum, and white which reflects IR. We've had trouble using it with the colored tape this year, because it would seem that the tape reflects about as much IR as the game board surface does. You can, however, use it as a very rough proximity sensor, sort of like a close range rangefinder. Its actually somewhat accurate and linear when a white object is an inch or less away, but past an inch and a half it gets difficult. If you think of it as more of a no-touch bumper though, it can be very useful.

One thing you have to worry about the sensor is ambient IR light. The starting lights emit a ton of it, so if your sensor is pointing at the light while it is on it will usually be fully saturated (read an extreme value) even from across the board. The starting lights do tons of annoying pointless flashing at various points throughout the match making it very easy for this to happen by accident, so be careful!

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.

Albert Einstein

Project Quadcopter: