Chapter 4
Electric Guard Dog
Remember the last time you visited a home with a big dog? Did hearing the canine barking at the sound of a doorbell make you think twice before entering the premises? Most dog owners appreciate the vigilant home surveillance that their pets provide. These furry friends have a knack of detecting motion and springing immediately into action, barking and bumping their snouts against window curtains and doors in hyperactive effort to see who or what is outside.
With the Electric Guard Dog, you will be able to derive a similar security benefit minus the hassles of cleaning up dog hair afterward (Figure 5, Deter unwanted visitors with the Electric Guard Dog).

Figure 5. Deter unwanted visitors with the Electric Guard Dog.
This project combines the Arduino board with a wave shield, a Passive InfraRed (PIR) sensor, and a servo motor. When programmed and activated, the assembly will give the illusion of an angry dog eager to pounce on an unwanted trespasser. A small rod attached to the arms of a servo motor will bob up and down when the servo rotates. A wad of cotton cloth attached to the other end of the rod will be positioned against a window curtain. When motion is detected, the servo will rotate, moving the rod up and down. The cloth attached to the other end of the rod will bump against the curtain in time with random barks and growls coming from a speaker plugged into the wave shield. This sound and motion will give the illusion of a noisy dog trying to poke and prod with its nose behind a door or window curtain.
The completed project is fully portable, since the Electric Guard Dog can be positioned in any doorway, window, or room that you want to get someone or something’s attention when the motion detector is triggered.