2
SKILL
LEVEL
Ringo Educational Guide Rev04.1 ~ Plum Geek
Using Ringo’s Edge Sensors
We first turn on the infrared Edge_Lights sources. While these are turned on, we
take a reading of one or more of the bottom light sensors and store the result in a
variable. At this time, the light sensors are mostly seeing light reflected from the
surface by the infrared light emitters. Each surface, material, or color will reflect a
different amount of this infrared light.
We then turn off the edge light sources and take the same measurement again.
This second measurement will show us the amount of ambient light being picked
up by the edge light sensors (this is light from the room that may be getting into
the sensor).
Once we have these two values, we can subtract them to determine the
difference. This is essentially the amount of light reflected from the surface with
the light from the room removed. Because each surface will reflect a different
amount of light, this “difference” value can be evaluated and we can draw some
assumptions about the surface from the “difference” value.
Darker surfaces will reflect less light, and brighter surfaces will reflect more light
as you would expect.
We can now take this a step further and store a few historic “difference” readings.
Each time we take a new reading, we can compare it to the last few readings. If
the reading decreases suddenly, we can assume that the sensor has either moved
over a darker feature in the surface (like a black stripe on the surface), or, that the
sensor is hanging off the edge of the running surface - because there is no longer
a surface present to reflect the light.
We have placed a capacitor between the light source and the light sensor. This
capacitor is not electrically connected to anything. Instead we are using this
capacitor as a “light barrier” which prevents the light from the light source from
shining directly into the light sensor, so most of what the light sensor is seeing is
in fact the light reflected from the surface.