CHAPTER 26 ■ SMOOTHER, SMALLER, CHEAPER
In the old arrangement, the comparator would compare TP1 to TP2 for one motor and compare
TP2 to TP1 for the other motor. In this case, 105 Ω < 144 Ω, so the first motor would be powered on. But,
144 Ω > 105 Ω, so the other motor would be powered off. As the robot oscillates back and forth over the line,
the motors will swap receiving power, and the overall effect will roughly drive the robot forward.
But, we’d like the robot to use both motors to drive straight forward when the resistances are so similar.
What happens if the comparator is wired to compare TP1 to TP2B and TP2 to TP1A? In that case, 105 Ω < 294 Ω,
so the first motor would be powered on. And, 144 Ω < 255 Ω, so the other motor would also be powered on!
The value of the fixed resistors determines how similar the light sensors values can be and still be
considered near enough to drive straight. Depending on your particular light sensors, you may find a larger
value, such as 1000 Ω, to be a better choice for your robot.
Revising or Leaping?
These wiring changes greatly improve the capability of the robot, without upsetting its cost or complexity.
In the remainder of this chapter, you’ll learn what happens if you radically alter the design of the Sandwich
circuit.
Reducing Cost and Improving Capabilities
A truly modern take on Sandwich would probably be something like a smart phone. The camera would
envision the path, accelerometers would provide feedback about actual movement, the display would chart
progress, and an app store would have a variety of programs the robot could run.
Figure 26-4 pictures a Sandwich robot that is not as sophisticated as a phone but that still benefits from
advancements in sensing, miniaturization, and software control.
Figure 26-4. A modern Sandwich robot with small parts, a lithium battery, and small motors