4.1 What You Need
This project requires only a few components. The total cost for all the parts should be under a hundred dollars. But since all the parts can be reused in other projects in this book and in future DIY efforts, it is a very reasonable investment consideration. To construct an Electric Guard Dog, you will need the following (see Figure 6, Electric Guard Dog parts):

Figure 6. Electric Guard Dog parts
-
An Arduino Uno
-
An Adafruit music and sound add-on pack for Arduino (includes wave shield, speaker, wire, and SD card)[29]
-
A high-torque standard servo[30]
-
A Passive InfraRed (PIR) motion sensor
-
A 9-volt power supply to power the Arduino once untethered from the USB development cable
-
A sturdy wooden rod with cotton or rubber affixed to the tip to serve as a surface-protecting end-cap
-
Wire, twist ties, or rubber bands to affix the wooden rod to the servo gear
You will also need a standard A-B USB cable to connect the Arduino to the computer. The servo can be purchased at a local hobby shop, and the PIR can be purchased from a number of electronic parts retailers, including Fry’s and Radio Shack, as well as from online electronics retailers like Adafruit or Sparkfun.

Yes! Electronics project retailer Sparkfun sells an Arduino board called the MP3 shield that is similar in function to Adafruit’s wave shield.[31] However, due to the differences in the libraries used, I will focus on the wave shield implementation and leave it to our more adventurous readers to pursue Sparkfun’s MP3-based alternative on their own. And for those who need an audio shield that plays even more sound file formats like Windows Media Audio, MIDI, and Ogg Vorbis, the Maker Shed sells the Seeed Music Shield, which nicely integrates audio file playback capabilities in a well-designed shield.[32]
Let’s start by connecting the project’s three main components to make them collectively act in a more aggressive manner.