Parts and Tools:
1) Two small DC motors, with fairly long shafts.
2) Three popsicle sticks
4) Two potentiometers, around 10K
5) Two (matched) CdS cells
6) Insulated wire
7) Two N-Channel MOSFETs
8) Two diodes, preferably fast switching type
9) Tube or shrink-tubing to use for wheels
10) [optional] 1/2 ping pong ball, or metal thumb-tack, to use for rear skid.
11) Hot glue, and hot glue gun
12) Solder, soldering iron
13) Multimeter (only needed if you need to select CdS cells)
14) 9v battery plug
15) 9v battery
On-line surplus electronics stores often sell large bags of Cadmium Sulfide (CdS) light sensor cells, which are Light Dependant Resistors (LDRs) for reasonable prices. When using cells from such a grab-bag, you should be careful to select two matched cells with a similar resistance under both low and bright light. The values of these cells can vary significantly. Matching to within 10-20% is sufficient.
This robot is based off of two mirror-image motor driver circuits as shown here. The photocell on the left side drives the motor on the right, and vica-versa.
Step 1: Select Matching CdS Cells
Measure the resistance of cell in dim, ambient light. Repeat this measurement pointing toward a lamp. The second measurement should be significantly lower.
Repeat this measurement on several cells until you find two which have similar values both under dim light and when pointed toward a lamp.
Step 2: Mount Motor Wheels
Step 3: Solder Protective Diodes to Motors
Place motors on table in a position similar to where they will be in the final robot, with the same side of each motor facing you. Lay the diodes on the motors such that the stripe is towards the inside. Solder the diodes in place.
Step 4: Check Motor Drive Direction
Step 5: Select Transistor Leads
Step 6: Prepare Wires for Soldering
Arrange the transistors so that the gate and source pin are aligned with an edge and sweeper pin on each of the potentiometers. It will be desirable for the bent drain pin to point up (or forward) in this arrangement on the constructed robot.
If you potentiometers are dial or trimmer style, that is ok. Just give some thought to arranging the leads such that they will be easiest to attach to motor, transistor, and light sensor leads.
The photo shown here was taken after mounting the potentiometer/sensor assembly to the frame, but I have found that it is easier to do this soldering before mounting to the frame.
Step 8: Solder Transistor to Potentiometer
n a similar manner, solder the gate pin to the corresponding leg of the potentiometer with a wire hook. It is best for the wires to head in opposite direction from these solder joints so that they are not likely to short when the robot bumps into things.
Step 9: Mount Motors to Frame
Put a generous dab of hot glue on each motor, and attach one side of the popsicle stick frame. You will have a few seconds to adjust the alignment before the glue cools. When the parts are aligned, wait for the glue to harden.
Flip the motor assembly over, and glue another craft stick to the other sides of the motors for added strength.
Step 10: Check Motor Drive Direction
Repeat for the second motor, making sure that both motors try to drive the frame in the same direction. Place an X marking the stick which will be the backward facing side of the frame. The pots and sensors will be attached to the other, frontward facing side of the frame.
Step 11: Attach Body to Motor Frame
Put a dab of hot glue on each of these lines, then balance the motor frame assembly on the third stick, in the pools of hot glue. You have a few seconds to check the balance and alignment of this stick to the frame before the glue begins to harden.
When aligned, wait for the glue to harden.
Step 12: Mount Sensor Assemblies
Place some hot glue on the forward facing side of the motor frame, and mount one of the potentiometer assemblies. Be careful that the placement of the hot glue does not interfere with the motion of the potentiometer adjustments.
Repeat for the other potentiometer assembly
Step 13: Solder Motor Lead to Transistor
If the two leads cannot reach, or cannot be connected without risk of shorting other leads, use a small length of insulated wire to make the connection.
Repeat for the other NON-stripe motor-diode lead to the corresponding bent transistor drain pin.
Step 14: Attach Light Sensors
Step 15: Attach Other Lead of Light Sensors
Step 16: Attach Battery Plug Positive
Step 17: Attach Battery Plug Negative
Step 18: Test
Shine a light on one sensor, and the opposite motor should spin.
Shade a sensor, and the opposite motor should stop.
Make sure that the potentiomenter is near the center position for this test. These tests will not work is the potentiometer is set at the limit such that there is no resistance between the potentiometer pins in use.
Step 19: Adjust Sensitivity
Sensors can be aligned to point towards the ground and follow a reflected light, given a higher sensitivity adjustment.
If the sensors are pointed up or ahead they can be adjusted to follow direct illumination from a flashlight.
With some work, they can even be adjusted to follow a light line on a dark surface!