Adding Electronic Control to the RBB-Bot

Testing the Robot's Light Seeking Ability

Previous: Attaching Battery Holder and 9V Battery Clip

Before inserting the batteries double-check your wiring to make sure everything is correct. You'll 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 circuit.

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 the H-bridge.
  • 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 motors.

With the RBB-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 light.

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. And try altering the value of the two resistors used with the photocells. Try higher or lower values, to see what works best.

Using Battery Clip Terminals as a Switch

Battery holders equipped with polarized terminals for 9-volt battery clips provide both electrical connection and a cheap form of switch. Here's how: Snap on just one terminal, and turn the clip so that there's no contact to the other terminal. This is the Off position. To turn your robot On, complete the battery connection by rotating the clip so the other terminal touches its mate.

For this to work the terminals must have a tight fit. If there's too much slop carefully squeeze together the prongs of the terminals to tighten things up. Don't go overboard, or you'll bend the metal out of shape.

Sources

Selected resources for RBB-Bot Phase 2 parts.

L298 bridge module
(via Amazon) or (via Amazon)

Replacement FA-130 size high efficiency Mabuchi motors:
(via MCM Electronics)

Other Components - MCM Electronics
6-cell AA battery holder
Battery clip terminals (10 pack)
Hookup wire (select 22 guage solid and stranded)
170 contact point mini breadboard
22 kΩ resistors (get at least 2)
74HC14 hex inverter IC

Other Components - Jameco
22 gauge wire
CdS photocell, large (buy 2)
74HC14 hex inverter
22 kΩ resistors (get at least 2)
170 contact point mini breadboard

Other Components - RobotShop

Plus: Velcro squares, assorted assembly hardware as per text, heat shrink tubing.