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

164        Making Things Move




                   • On-off toggle switch (like SparkFun COM-09276) or other SPST switch

                   • TIP120 Darlington transistor (Digi-Key TIP120-ND or Jameco 32993)
                   • 220KΩ resistor (Jameco 30470)
                   • Diode (SparkFun COM-08589)


               Recipe:

                 1. Connect the 5V power and ground pins on the Arduino to power and ground
                     on one side of the breadboard with jumper wires (see Figure 6-29). On the
                     other side of the breadboard, connect a 9V battery to power and ground.
                     Make sure that the ground is linked between the ground columns on the
                     breadboard.

                 2. Plug the transistor into the breadboard as shown in Figure 6-30, so each of
                     the three legs has its own row. Connect the emitter pin of the transistor to
                     ground on the breadboard.

                 3. Connect pin 9 on the Arduino to the base pin of the transistor.



               FIGURE 6-29 Powering a breadboard with the Arduino
   181   182   183   184   185   186   187   188   189   190   191