want to be especially careful about not
mixing up the battery terminal wires.
Never cross the + and – connections, or
damage could result to the L298 module
and any other electronics connected to the
Assuming all looks okay, insert the
batteries and lift the wheels of the robot
off the floor. Connect the battery clip to
the battery holder. Both motors should
immediately run. Point the two photocells
to a bright light source, then observe.
Both motors should turn the same
direction. If one motor turns in the
opposite direction, remove power and flip
the terminal wiring from that motor on
Place the robot on the ground. The
robot should move in the direction of the
light. If it moves in the opposite direction,
remove power and flip the wires for both
With the Beginner Bot working and
attracted to light, move to a darkened
room. Bring along a flashlight, preferably
one with a bright narrow beam. Apply
power to the robot, and place it on the
ground. With no or little light, the robot
will travel in reverse. Shine the flashlight into the photocells.
The robot should reverse direction and move toward the
Get close to the robot and aim the flashlight into just
one photocell (gently spread the cells apart if they’re too
close together). The robot should turn toward the photocell
with more light.
Is your robot not responding to the light? Try operating
the robot in a darker room. If the room is too bright, the
robot will constantly move forward, and will be “blind” to
the flashlight. Also try altering the value of the two resistors
used with the photocells. Try higher or lower values to see
what works best.
FIGURE 13. CdS "eyes" on the
front of the Beginner Bot.
They'll make the robot move
toward any bright light source
and follow the beam of a
flashlight in a darkened room.
Next Up: Get Smart
There are lots and lots of ways to control your Beginner
Bot with nothing more than simple electronics. For
example, you can create a line following or maze solving
robot using infrared sensors and LEDs, and some ordinary
ICs. Or, you could add a bumper switch or two, along with
a couple of LM555 timer chips and have your robot wander
around the room, exploring its environment but reacting
whenever it makes contact with an object.
I’ll leave it up to you to explore these alternative types
of circuitry, as now it’s time to move on to the next phase:
adding a miniature computer.
In the next installment, I’ll demonstrate how to replace
the light-sensing circuitry with a low cost microcontroller
where you can define the operation of your bot by
writing a few short lines of programming code. SV
SERVO 09.2011 43