On previous pages, we’ve stepped through the changes that the Back-And-Forth robot’s circuit goes through when the robot’s bumper switches are pressed. If you have a browser that supports animated GIFs, then you'll see each of those changes in the animation below.
Back-And-Forth robot schematic animation.
This is pretty amazing. The motor driver chip not only supplies power to the motor, but uses those same signals to remember its state even when the switches are released.
Well, it isn’t that amazing. The motor driver chip consists of two logical transistors. We add two resistors to the circuit and two input switches, and voilà, we have recreated a flip-flop. No kidding. Look up flip-flops on Wikipedia. Okay, we’ve created a “power” flip-flop, but it is a flip-flop none-the-less.
So, really, this is nothing more than the Flip-Flop Robot boiled to its essence.
Sooner or later, either through the robot getting trapped in a corner, through an inquisitive mind, or a malevolent heart, both bumper switches (SW2, SW3) are going to become pressed at the same time. Will the robot go forward, go reverse, or keep the same state?
The answer is none of the above. The robot will safely enter a stopped state.
9. Stopped. Both bumpers pressed.
Switch SW2 forces Input A (pin 2) low, and switch SW3 forces Input B (pin 4) low. The signals from Output A and Output B are ignored at the inputs, because the signals are relatively weak after going through R2 and R3. A tiny amount of energy is wasted dropping the voltage in the resistors; but it is harmless.
Both outputs are set to the opposite of the inputs. Therefore, both outputs are high.
The motor terminals are both set to the same voltage (high), so no current flows. The motor stops.
The robot remains peacefully at rest until at least one switch is released. At that point, the robot will go whatever direction based on whichever switch is released last.
The next two pages discuss the machining of the robot’s body.