
|
ACTIVITIES
|
CYBER LAB SENSOR PAGES
|
|
Infrared (IR) sensors contain an emitting diode as well as a detector. Both the emmitter and detector face in the same direction. If the sensor is pointed at nothing, it returns a high value. If there is something nearby that will reflect the IR light, then the value decreases. These sensors have an active range of approximately 2 cm. The actual range depends on the reflectance and size of the object being detected. IR reflectance sensors are commonly used for table edge detection, black or white line following. The reflectance sensors used in this example look like miniature top hats. IR reflectance sensors should only be used in analog ports 2-6.
|
|
This information was developed at the Infrared Processing and Analysis Center at California Institute of Technology. Our eyes are detectors which are designed to detect visible light waves (or visible radiation). Visible light is one of the few types of radiation that can penetrate our atmosphere and be detected on the Earth's surface. There are also forms of light (or radiation) which we cannot see. Actually we can only see a very small part of the entire range of radiation called the * electromagnetic spectrum . The electromagnetic spectrum includes gamma rays, X-rays, ultraviolet, visible, infrared, microwaves, and radio waves (Figure 2). The only difference between these different types of radiation is their wavelength or frequency. Wavelength increases and frequency (as well as energy and temperature) decreases from gamma rays to radio waves. All of these forms of radiation travel at the speed of light (186,000 miles or 300,000,000 meters per second in a vacuum). In addition to visible light, radio, some infrared and a very small amount of ultraviolet radiation also reaches the Earth's surface from space. Fortunately for us, our atmosphere blocks out the rest, much of which is very hazardous if not deadly for life on Earth.
Infrared radiation lies between the visible and microwave portions of the electromagnetic spectrum. Thus infrared waves have wavelengths longer than visible and shorter than microwaves and have frequencies which are lower than visible and higher than microwaves. Near infrared refers to the part of the infrared spectrum that is closest to visible light and far infrared refers to the part that is closer to the microwave region. (Infrared Processing and Analysis Center, California Institute of Technology, 2000).
Figure 2. Electromagnetic spectrum.
![]()
*NOTE: This activity was developed by Newton's Apple a production a KTCA in Minneapolis, MN. They encourage duplication of their materials.
Most television remote control units work by means of infrared
radiation rather than visible light. That's why you can't see
the beam go on when you change channels. Because infrared radiation
has a longer wavelength than visible light, it behaves differently
when it encounters objects that get in its way.
Using your television's remote control as a source of infrared
radiation, you will compare the behavior of a beam of infrared
radiation to that of a beam of visible light. You will see how
each reacts when different materials are placed in its path.
MATERIALS NEEDED: television set and remote control unit, flashlight, cornstarch or baby powder, clear glass of water
PROCEDURE
1. Clear all obstructions between you and the television set.
Darken the room as much as possible. Stand about 3 meters (10')
away from the set and test your remote control unit to make sure
it is functioning properly. Test your flashlight by shining it
against the dark television screen.
2. Have a friend stand about halfway between you and the television,
directly in front of the screen. Try turning on the television
using the remote control. Then try shining the flashlight onto
the television screen. Observe what happens in each trial. Have
your friend move around and notice how both "light"
beams behave.
3. Have your friend blow some cornstarch or baby powder in the
air between you and the television and attempt to turn on the
television through the dust. Repeat, using the flashlight, and
observe what happens when you aim it at the screen.
4. Place the glass of water directly in front of the remote control
unit and try to turn on the television. Now shine the flashlight
through it. Note what happens in each case.
5. Hold the remote control in your right hand and place your left
hand at several distances and angles relative to the remote control.
Determine the conditions under which your hand motion prevents
the signal from reaching the television.
Questions:
6. Which of the objects interfered with the flashlight beam?
Which stopped the infrared beam?
7. Why do you think infrared sensors are good at detecting hot
spots in forest fires, yet have problems detecting warm bodies
in the fog?
8. How does the longer wavelength of infrared radiation help to
explain your observations?
This activity will introduce you to the Interactive C code used to test the Infrared (IR) reflectance sensors. Since the IR sensors are analog, they can be tested in the same ports as the photodiode and use the same code. Click here for a quick IC and NQC tutorial
Materials Needed: 2 IR reflectance sensors, 2 white and 2 *black ping pong balls, one charged HandyBoard setup, graphing paper, metric ruler, tape. *Use a flat enamel spray paint for the black ping pong balls.
Procedure: Loading Code
1. Connect your computer to the serial interface box with
the 9 to 24 pin serial port cable or Mac cable.
Connect the serial port box to the HandyBoard with the 4 pin telephone
cable. Turn
the HandyBoard on.
2. Go back to your computer and open up the application Interactive
C.
3. Under "File" in IC, open a new text editor
by choosing "New." Write or cut and paste the
sample program code below into the new IC text box. This program
is analog.c, the same used in Activity #1.
4. If your download was successful, turn off the HandyBoard and
turn it back on. The LCD screen should be displaying the message:
"Press START to test analog 2-6"
|
void main() { printf("Press START to test analog 2-6 ins\n"); |
![]()
The German mathematician Johann Heinrich Lambert (1728-1777) invented the word albedo. Albedo is the fraction of light reflected by a object (Sorbjan, 1996). For example, freshly fallen snow is very reflective and has a high albedo. The albedo of fresh snow is so high that on sunny days its reflection can give you a sun-burn. Dark objects like a black T-shirt have low albedo and are more absorbent. That is why you can become very hot in a black T-shirt while active on a sunny, summer afternoon. According to Lambert's law, the relationship between the intensity of light and angle of incidence can be described as a cosine relationship. For example, at noon on a mid-latitude summer day, the sun is almost directly overhead. This means the sun's radiation has to travel through less of the Earth's atmosphere to reach the surface and is more intense. At noon on a mid-latitude winter day, the rays of the sun strike your location at an oblique angle. This means that the sun has to travel through a thicker slice of the earth's atmosphere to reach the same point. As the light passes through more of the atmosphere, the sun's energy is scattered by atmospheric particles and is less intense. Objectives: You will learn more about albedo using IR sensors to test a few household items for high or low albedos.
Materials Needed: HandyBoard setup, 2 white and black ping pong balls, one IR reflectance sensor (top hat), one metric ruler, tape, one Mini-Maglite
Procedure: Light Rays
1. Imagine that one of the black ping pong balls is the Earth, and that your
flash light is the sun. Position the flash light about two inches away from
the ball. Point the beam on the equator of the ball. Question: Is the
light concentrated or is it dispersed? Question: Does the light on the
ball have a high or low albedo?
2. Now, tilt your flash light approximately 45 degrees south (down). Question:
Is the light concentrated or dispersed? Question: Does this it have
a higher or lower albedo than the first example?
3. Position your flash light 2 cm from the black ping pong ball. Question:
Does the reflection have a high or low albedo?
4. Position your flash light 12 cm from the black ping pong ball. The light
now covers more of the ball than example one. Question: Does this reflection
have a higher or lower albedo than example one?
5. To test these questions, place an IR reflectance sensor 5 mm away from the
black ping pong ball.
6. Point the flash light beam on the center of the black ball, 2 cm away. Question:
What was your reading? Note: adjust the flash light beam to be very concentrated
7. Now move the flash light back to 12 cm and take a reading. Question: Is
the albedo or IR reflectance higher at 2 cm or 12 cm? Why?
BACK TO THE TOP
Some Botball participants use the IR sensor for identifying black
and white objects or tape markings on the game board. Several
factors come into play when trying to calibrate the HandyBoard
using this sensor. First, changes in lighting may have an impact
on the reflectance of an object or markings being read. Second,
the location at which the sensor is placed on your robot may determine
whether or not the sensor accurately receives information about
an object being sensed. Objectives: Activity #4 will allow you
to experiment with distance, changing light conditions, and reflectance.
They will graph these variables and compare results.
Materials: HandyBoard setup,
2 white and black ping pong balls, one IR reflectance sensor (top
hat), one metric ruler, tape, one page of graphing paper
Procedure : IR Sensors and Distance
1. Attach one IR reflectance sensor to port number 2.
2. Press the start button on the HandyBoard.
3. The HandyBoard LCD screen will display 5 blocks of numbers
(example: 253, 254, 254, 253, 20 ).
4. Perform these tests under normal lighting conditions in a classroom
5. First we want to graph the reflectance level of the white ping
pong ball by taking readings every 2 mm over a length of 2 cm.
Take measurements at 2mm, 4mm, 6mm, 8mm, 10 mm, 12mm, 14mm, 16mm,
18mm, 20mm. Plot the readings on a piece of graph paper. The y-axis
should represent reflectance readings and the x-axis represents
time. Do the numbers increase or decrease as the sensor moves
away from the ball?
6. Now, graph the reflectance level of the black ping pong ball
using the same methods. Plot the readings. Question: Do
the numbers increase or decrease as the sensor moves away from
the ball?
7. Now, perform the same test in the following conditions:
--a classroom with half the lights on
--near an open window in your classroom
--outside
under normal classroom lighting, but with people moving around
the test area and affecting the light with shadows
8. Graph the results as in the first test.
9. Compare the results of these four tests with the original readings.
Questions: Is there much variation among all of the tests?
This analog light sensor comes in a nice LEGO design and is a handy accessory to the RCX processor. The sensor can be used in a number of applications from looking for variations in light to following colored lines. Botball participants use the light sensor as a starting mechanism for the game. Students can calibrate variations in light and program the data into the RCX to perform numerous tasks. In the following activities, students will learn how to attach the sensor to the RCX processor, learn how to view the sensor readings using the RCX, learn how to calibrate, and learn how to apply the sensor to line following activities.
![]()
|
In this activity, users will learn how to attach the light sensor and calibrate it to see variations in light. They will also get some ideas on where to place the sensor for various applications. We will use a computer programming software called Not Quite C (NQC) to program the RCX processors for these activities. Click here to find out how to load the Firmware which allows us to use NQC with the RCX processor. Click here to learn more about the RCX processor.
|
![]() |
MATERIALS NEEDED: RCX Setup, one LEGO light sensor, NQC software, Mac or PC computer, one white and one black ping pong ball.
PROCEDURE
1. The light sensors already have a LEGO connector attached. Attach connector
to the RCX processor. The sensor ports on the RCX processor are 1, 2 and 3 (Motor
ports are A, B, and C LEGO sensors will not work in these ports). Attach
the light sensor to port 2.
2. Turn your RCX processor on. If you see four 00.00 on the left side of the
little man icon, your Firmware is loaded and you can program using NQC. If you
do not see 00.00 you need to download the Firmware.
3. Pick up the sensor and look at the end. The red diode should be lit. This
means that the sensor is taking readings.
4. Push the view button on the RCX processor. You should see an arrow pointing
at the number 1. You will also see a numerical value on the RCX screen. Push
the view button until the arrow is pointing at port number 2. Question: What
is the light reading you see on the screen? Is this an analog or digital sensor.
5. Place the white ping pong ball a few millimeters away from the sensor. Question:
What is the reading?
6. Place the black ping pong ball a few millimeters away from the sensor. Questions:
What is the reading? Was this reading higher or lower than that of the white
ball?
![]()
In this activity, you will learn how to calibrate for light variation using the light sensor and the RCX processor. You will also learn an application using the sensor and will also be introduced to NQC programming.
MATERIALS NEEDED: RCX setup, one light sensor, two bump sensors, two LEGO motors, four LEGO motor connectors, two 16 tooth gears
PROCEDURE
1. Connect the light sensor to port 1. Connect the bump sensors
to ports 2 and 3. Connect the motors to ports A and C.
2. Place one gear on each motor axle. This will allow us to see
the axle rotate.
3. Turn on the RCX processor. Is your Firmware loaded? How do
you know?
4. Open up your NQC software. You can test the sensors and motors
with the PC version of NQC.
5. Open up a new NQC program window by selecting "New."
Write or cut and paste the program below into the new window.
6. Connect your IR tower to your computer. Place the RCX in front
of the tower and download the program.
7. The easiest way the run this program is in a well lit room
with a light switch or by using a bright flash light.
8. To start the program, press the Run button on the RCX processor.
Press bump sensor in port 2. This tells the light sensor to read
the lighting conditions that will start the motors moving. If
you are using a flash light, point it directly at the light sensor
diodes.
9. Now, turn the light source off and press the bump sensor in
port 3. This tells the RCX processor to wait for the first light
reading to appear.
10. Now turn the light source back on. This should start the motors
moving. Press the bump sensors to change the motors' rotational
direction.
|
task main() /* this task starts when run is pressed */ |
|
|
|
|
|
|