Page 156 - Build Your Own Combat Robot
P. 156

Chapter 7:
                                                                                      Controlling Your Motors
                                      Servo switching was quite common in the early days of robotic combat, but using  137
                                    it has many drawbacks and is not recommended.
                                        The response time of a servo is fast, but the time it takes the servo to
                                         rotate and trigger the lever switch will add a perceptible lag to the motor’s
                                         activation. A half-second lag in your robot’s response can make a big
                                         difference in the arena.
                                        Servo switching introduces extra moving parts into your control system
                                         that can break or jam and cause the motor to stop working or, even
                                         worse, turn on and refuse to turn off.
                                        A servo switching system will have trouble meeting fail-safe requirements
                                         present in most competition rules. Depending on your radio type, loss of
                                         signal may result in all servos connected to the radio simply locking in
                                         place. If the motor was on when contact was lost, it’ll stay on until you
                                         can switch the bot off manually. Even if your radio has the feature of
                                         returning all the servos to the neutral position if radio signal is lost, loss
                                         of power in your radio receiver or a severed connection between the
                                         receiver and the servo can still result in a motor stuck running.

                                    caution     For safety reasons, servo switching should not be used for controlling drive
                                    motors or weapons that can injure someone if the servos or relays should fail.

                                      Remember that you must have absolute control of your robot at all times and
                                    you must be able to shut it off remotely even if internal control parts break inside.
                                    Servo switching can be used for applications in which failures are not safety issues,
                                    such as for an arm that turns your robot right side up or an electrically driven lift-
                                    ing arm.
                                    Solid-State Logic  A better method to control the relays is to use solid-state logic
                                    to interpret the control signal from the radio and trigger the relays when the ap-
                                    propriate signal is received. You can use a programmable microcontroller, such as
                                    the Basic Stamp from Parallax, Inc., and program it to receive the command signal
                                    from the R/C receiver and convert that signal into an output signal. The output
                                    signal is then used to turn a transistor on or off, and the transistor is used to supply
                                    power to the relay coils.
                                      Figure 7-9 shows a simple schematic that illustrates transistor-relay control. In
                                    the figure, a low-voltage signal is used to turn a transistor on and off. The sche-
                                    matic drawing shown on the left is an NPN transistor. A positive voltage to the
                                    transistor base (shown asaBonthe transistor) will turn it on and the relay will be
                                    energized. The schematic to the right uses a PNP transistor. In this schematic, the
                                    relay coil is energized when there is no voltage signal to the base. An NPN transistor
                                    is analogous to a NO-SPST switch, and a PNP transistor is analogous to a NC-SPST
                                    switch. A “flyback” diode is required to protect the transistor when the relay is
   151   152   153   154   155   156   157   158   159   160   161