Experiment 32: A Little Robot Cart
278 Chapter 5
FundAmentAls
All about limit switches
The most obvious enhancement for your cart would be a better steering
mechanism. You could use another motor to take care of this, with a pair of limit
switches. Because limit switches are a basic, important idea in conjunction with
motors, I’ll explain them in detail.
Figure 5-99 shows three successive views of a motor with an arm attached to it,
which can press either a lower pushbutton or an upper pushbutton. Both of the
pushbuttons are normally closed, but will open when pressed by the motor arm.
These buttons are the limit switches. Typically you would use microswitches for
this purpose, just like the ones that I suggested as barrier-sensors at the front of
the cart.
In addition, there’s a DPDT relay that is activated by a simple on/off switch at
the righthand side. On the cart, the 555 timer takes the place of the on/off
switch, by feeding power to the relay.
Suppose that the motor begins with the arm pointing downward, as shown
in the top view in Figure 5-99, and the motor is wired so that when it receives
negative voltage at its lower terminal and positive at its upper terminal, it
rotates counter-clockwise. This is what happens when the on/off switch closes
and sends power to the DPDT relay. Positive voltage from the relay contacts
cannot pass through the upper diode, but can pass through the upper limit
switch, which is closed. Negative voltage cannot pass through the lower limit
switch, because it’s open, but can pass through the lower diode. So, the motor
starts to turn counterclockwise. During the midpoint of its arc, it receives power
through both of the limit switches.
Finally, the motor arm reaches the upper switch, and opens it. This prevents
positive voltage from reaching the motor through that switch, and the positive
voltage is also blocked by the upper diode. So, at this time, the motor stops.
Now suppose that the on/off switch is opened, as in the top view in Figure
5-100. The relay loses its power, so its contacts relax. The voltage to the motor is
now reversed. Negative voltage passes through the upper diode, while positive
voltage reaches the motor through the lower limit switch. The motor starts
running clockwise, until its arm hits the lower switch, opening it and cutting off
power to the motor.
Limit switches are necessary, because if you continue to apply voltage to a
simple DC motor that is unable to turn, the motor sucks more current, gets hot,
and may burn out.
You can easily see how this kind of system could be used to control the cart’s
steering. Even though the motor has only two positions, these are sufficient to
make the cart turn when going backward, and proceed straight ahead when
going forward.
To reduce power consumption, the DPDT relay could be replaced with a two-
coil latching relay. The circuit would then have to be revised so that the relay is
flipped to and fro by a pulse to each of its coils.