Copyright © 2009 Jim Herd
Engineering a brighter, younger future
Department of Electrical, Electronic & Computer Engineering
Heriot-Watt University
Edinburgh
- Working robots (without switch controller)
- Black tape and Berol Broad felt-tip pens (1 pen per team)
- Square sheets of white paper (cut from rolls provided in the class kit)
- Activity 7 video
- Activity worksheet (Marked “Activity 7 worksheet”)
To run the robot so that it detects and reacts to black tape lines.
- A robot needs sensors to find things out about its environment.
- What sensors (senses) do people have?
- Eyes (sight), ears (sound), nose (smell), fingers (touch), skin (temperature), tongue
(taste)
- What sensors (senses) does Robokid have?
- Eyes (sight), switches (touch), battery checker (hunger).
- This activity will concentrate on using two of the robot “eyes”.
- The two optical sensors at the front of the robot can detect the difference between
black tape and white paper.

- These two “eyes” are located at the front of the robot and look down at the floor.
They work by sending out some infra-red light and looking at what bounces back.
A lot bounces back from white paper, but very little returns from the black tape.
The robot computer converts the result to a number and uses it to plan its operation.
- Our eyes cannot detect infra-red light so we will not see the beam. In fact, this
light is used by TV remote controls to pass signals to your TV.
- The light is called “infra-red” because it is just above the red light of the visible
light spectrum.
- Some animals can see infra-red light. For example, some snakes have little infra-red
eyes (called pits) as well as normal eyes.
- Experiment 1 shows the robots basic avoidance strategy. As soon as it detects the
line it stops, reverses for a small period of time, then spins for a small period
of time before heading off in a new direction. As it always uses the same avoidance
mechanism, shapes drawn on the sheet will have regularity to them. However, the
final pattern will be heavily dependent on the shape of the black tape perimeter.
Try to get each team to use a different shape.
- Mode “b0” is a rather predictable mode, in that the robot executes a fixed sequence
and always turns and spins in a repeatable manner.
- If this was a bug trying to get away from a predator, this type of behaviour would
not be a good survival approach.
- Mode “b1” introduces randomness into the robot’s decision making. It is as though
the robot has an internal dice which is used to produce random numbers. These random
numbers are used to determine the robot’s actions whereas in mode “b0” the behaviour
was determined by the settings of the POTs. Animals have this randomness quality
built into their brains.
- The sensor does not see “blackness”, it measures the amount of infrared light that
is reflected.
- Black felt-tip pen and black biro ink look like white paper to the sensor!
- Photocopier ink is detected as “black”. Not sure about black poster paint.
- Get a sheet of white paper – no greater than 60 centimetres in length
- Create a closed shape with the black tape
- Set robot into mode “b0” (power-on then A_2D_2A)
- Place in centre of area and check that it works.
- If all is OK insert a Berol Broad felt tip pen in pen holder
Make sure that the tip of the pen is touching the paper
- Press switch A to start
- Robot will stop for the following reasons
- If it has been running for 2 minutes (this is called a time-out)
- If switch A has been pressed and held for a couple of seconds. Pressing switch A
will restart
- If switch C has been pressed and held for a couple of seconds. Exits the mode –
shown by flashing “b0” message

- Switch B can be pressed to change how the robot reacts. The things that can be changed
are set by POT-1, POT-2 and POT-3.
POT-1 :: Sets the amount of reverse when robot detects the black tape
POT-2 :: Sets the amount of spin after the robot has reversed
POT-3 :: Sets the speed difference between the two motors. A greater difference
means that it moves in a tighter curve.
- Try changing the parameters and looking at the results
- Create a multi-colour picture by swapping pens with other groups.
- Reverse paper and create new shape
- Get the teams to run the “bug bump mode” – Mode “b1” (switch sequence A_2D_A_D_A)
- Press switch A to start
- Robot will stop as in experiment 1
- This mode introduces randomness into the robots decision making by making each decision
reliant on a random values. The effect is if the robot has an internal dice which
is used to get random reverse and spin times.
- Get the teams to compare two drawings, one from the predictable mode and one from
the bug mode.
- How does the sensor work?
- Try some simple tests with other things that are black
Black felt-tip pen
Black paint (ensure it is dry before starting the robot)
Black ink
Black photocopier ink
File
|
Description
|
Pdf
|
Word
|
Activity 7 pupil worksheet
|
Basic activity worksheet with list of tasks to be done.
One sheet per team.
|

|

|
Photocopied black line
|
Line to allow pupils to test the robot on photocopy black ink.
|

|

|
Flowchart of robot operation
|
Explains the operation of the robot and how to reacts to sensing a black line.
|

|

|
Can be done on desks or on a floor area.