28.01.2013 Views

Build Your Own Combat Robot

Build Your Own Combat Robot

Build Your Own Combat Robot

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7: Controlling <strong>Your</strong> Motors 137<br />

Servo switching was quite common in the early days of robotic combat, but using<br />

it has many drawbacks and is not recommended.<br />

■ The response time of a servo is fast, but the time it takes the servo to<br />

rotate and trigger the lever switch will add a perceptible lag to the motor’s<br />

activation. A half-second lag in your robot’s response can make a big<br />

difference in the arena.<br />

■ Servo switching introduces extra moving parts into your control system<br />

that can break or jam and cause the motor to stop working or, even<br />

worse, turn on and refuse to turn off.<br />

■ A servo switching system will have trouble meeting fail-safe requirements<br />

present in most competition rules. Depending on your radio type, loss of<br />

signal may result in all servos connected to the radio simply locking in<br />

place. If the motor was on when contact was lost, it’ll stay on until you<br />

can switch the bot off manually. Even if your radio has the feature of<br />

returning all the servos to the neutral position if radio signal is lost, loss<br />

of power in your radio receiver or a severed connection between the<br />

receiver and the servo can still result in a motor stuck running.<br />

caution For safety reasons, servo switching should not be used for controlling drive<br />

motors or weapons that can injure someone if the servos or relays should fail.<br />

Remember that you must have absolute control of your robot at all times and<br />

you must be able to shut it off remotely even if internal control parts break inside.<br />

Servo switching can be used for applications in which failures are not safety issues,<br />

such as for an arm that turns your robot right side up or an electrically driven lifting<br />

arm.<br />

Solid-State Logic A better method to control the relays is to use solid-state logic<br />

to interpret the control signal from the radio and trigger the relays when the appropriate<br />

signal is received. You can use a programmable microcontroller, such as<br />

the Basic Stamp from Parallax, Inc., and program it to receive the command signal<br />

from the R/C receiver and convert that signal into an output signal. The output<br />

signal is then used to turn a transistor on or off, and the transistor is used to supply<br />

power to the relay coils.<br />

Figure 7-9 shows a simple schematic that illustrates transistor-relay control. In<br />

the figure, a low-voltage signal is used to turn a transistor on and off. The schematic<br />

drawing shown on the left is an NPN transistor. A positive voltage to the<br />

transistor base (shown asaBonthetransistor) will turn it on and the relay will be<br />

energized. The schematic to the right uses a PNP transistor. In this schematic, the<br />

relay coil is energized when there is no voltage signal to the base. An NPN transistor<br />

is analogous to a NO-SPST switch, and a PNP transistor is analogous to a NC-SPST<br />

switch. A “flyback” diode is required to protect the transistor when the relay is

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!