Page 266 - Robot Builder's Bonanza
P. 266
MOTOR CONTROL BY RELAY 235
While it’s true that relays wear out in time, and they’re slower than electronic motor control,
G neither is a particularly relevant excuse to avoid them. Small reed relays for the average- size
desktop amateur robot can switch several hundred thousand times before even beginning to act
funny. As for their slowness, the motors are even slower— the slowest part of your robot.
INSIDE A RELAY
A relay is an electrically operated switch. It’s just like the manual switches detailed in the pre-
vious section, but with the added feature of being controlled via electric signals.
The operation of a relay is simple: an electric coil is placed around or near a piece of metal
that acts as a switch plate. When current is applied to the coil, the coil acts like an electromag-
net. The magnetism pulls the metal switch plate closer to it. This engages the switch.
Nearly all relays self- reset; that is, when current is removed from the coil, a spring on the
switch plate pulls it back into its original position. This disengages the switch.
SIMPLE ON/OFF RELAY CONTROL
You can accomplish basic on/off motor control with a single- pole relay, just as you did with
manual switches. The relay is wired so that when it’s inactive (OFF) current from the battery
is not switched to the motor. When the relay is activated (ON) the circuit between battery and
motor is complete, and the motor turns.
How you activate the relay is something you’ll want to consider carefully. You could con-
trol it with a push- button switch, but that doesn’t get you anything more than using manual
switches alone. Relays can easily be driven by digital signals, the kind from a simple board or
microcontroller on your robot.
See Figure 22- 4 for the basic way of connecting a relay to any kind of controlling elec-
tronics.
If you’re new to electronics in general, a review of some terminology is in order.
• Logical 0 (referred to as LOW) is digital terminology that means 0 volts is applied to the
relay.
• Logical 1 (referred to as HIGH) means that voltage (of some level) is applied to the relay.
In most digital electronic circuits, this is 5 volts. In fact, we can just assume it’s 5 volts,
unless told otherwise.
5 volts
Relay
NC (normally closed)
Don't 1N4001 Common
forget diode NO (normally open)
these!! Figure 22- 4 A relay can be
used to electronically turn a motor
Control 2N2222 on and off. A transistor and a
voltage transistor resistor drive the relay; you
0 or 5v 1K ohm (electronic symbol for control the operation of the relay
"ground," the -
resistor terminal on a battery) by applying 0 or 5 volts as a
control voltage.
22-chapter-22.indd 235 4/21/11 11:50 AM