CHAPTER 26 ■ SMOOTHER, SMALLER, CHEAPER
Lowering Light Sensor Resistance
Let’s break down the circuit. The first alteration places each pair of light sensors in parallel rather than series
(see Figure 26-2). In series, the resistances of the photocells are added together (R3+R4). In parallel, the
formula is more complex (R3×R4)/(R3+R4). This greatly decreases total resistance. For example, a sensor
over dark flooring (440,000 Ω) paired with a sensor over a light line (120 Ω) has a total resistance of 440,120 Ω
in series but only 119 Ω in parallel.
Figure 26-2. Arranging sensors in series versus parallel significantly changes the total resistance
Figure 26-3. Resistances calculated for each test point, given the resistance of the light sensors
Why is the resistance always lower in parallel? In series, the electricity has no choice but to pass through
both resistive sensors. In parallel, electricity could choose to go through only the least resistant path by itself.
Moreover, each additional path makes things at least a little bit easier. Therefore, parallel resistance is never
going to be any greater than the lowest resistance resistor.
So, the parallel sensors always have a lower resistance. Why does that matter for this robot? Recall
that the standard comparator chip can’t operate accurately in the uppermost voltage range. By keeping the
sensor resistance low, at least one of the voltages seen by the comparator chip is always low enough to make
the correct decision.
Driving Straight
To drive straight, Sandwich quickly alternates between powering one motor and then powering the other
motor. Although this provides an amusing effect of dancing about the line, it would be technically superior if
the robot drove with both motors simultaneously when the robot was centered over a line.
Terry Jackson further altered my original circuit to provide a left-turn region, a right-turn region, and
an overlapping region to drive straight. The overlapping region is accomplished by inserting two resistors in
the middle of the circuit (refer to the earlier Figure 26-1) and having the comparator chip measure different
points (TP1 and TP2A, TP2 and TP1A) for each side.
For example, let’s say the robot is roughly centered over a dark line. However, the lighting in the room
is slightly darker on one side, causing the sensors on that side to be 50 Ω more resistant each. Figure 26-3
shows the resistance at each of the test points.