Page 174 - Making things move_ DIY mechanisms for inventors, hobbyists, and artists
P. 174

Chapter 6    Options for Creating and Controlling Motion          153




               P   roject 6-5: Motor About-Face


               In Project 6-2, we changed the direction of the motor by switching the red and black
               wires manually. It’s great that all we need to do to switch the direction of a DC motor
               is change the direction of current flow, but how do we do that without disconnecting
               and reconnecting wires all the time?
               The simplest way to switch direction is by using an integrated circuit (IC) chip called an
               H-bridge and a three-legged switch called an SPDT (for single pole, double throw)
               switch. Instead of just two positions (on and off), an SPDT switch has three positions
               (on, off, and on). When the switch is at either extreme on position, two metal pieces
               inside the switch touch. But unlike the SPST switch from the previous example, these
               metal pieces are independent, so this switch can control separate circuits. When the
               switch is in the middle (off) position, those metal pieces are pushed apart so no power
               can flow through the switch.

               Inside the H-bridge chip is a series of electronic gates. In this example, when your
               switch is at one extreme, the gates in the chip will let current flow through the motor
               in only one direction. When you toggle the switch to the other extreme, the gates in
               the chip will reverse and make current flow through the motor in the opposite direction. 4

               Shopping List:

                   • DC toy motor with wire leads

                   • Corresponding battery (9V used here) and snap or holder with wire leads (like
                     RadioShack 270-324)

                   • Breadboard (like All Electronics PB-400)
                   • Jumper wires (like SparkFun PRT-00124) or hook-up wire to make your own
                     (see Project 6-4)
                   • On-off-on toggle switch (like SparkFun COM-09609) or other SPDT switch
                   • H-bridge motor driver chip (SparkFun COM-00315)

                   • Four AA batteries and holder (like SparkFun PRT-00552)

               Recipe:

                 1. Place the H-bridge in the middle of the breadboard with the small notch
                     facing up, as shown in the bottom image of Figure 6-21.
   169   170   171   172   173   174   175   176   177   178   179