Cat Repelling PIR motion sensor (covert) speaker box alarm using Arduino

This is a PIR motion sensor device that works with the arduino uno. In order to make it covert enough to be placed in multiple settings and portable enough to fit most places, I decided to make the case for it appear as a speaker.

The inspiration for this project:
speaker box alarm
My cat is a jerk. One of his favorite things to do is to alarm me that he is hungry every morning at 4am by sitting on my dresser and knocking random things over until I wake up. Unfortunately, my dresser is also parallel to my craft table, so he has turned my dresser into a work of art by walking across my oil paintings and jumping up there (and also throughout the rest of the house). I could lock him out of my room, but then he cries outside the door all night, so I’ve been trying to come up with a solution to this problem.

After looking through Instructables and finding out what is possible with the arduino, I decided to make a motion sensing device for my dresser that will play cat repelling noises until Mr. Moe is trained out of his annoying behavior.

Step 1: Materials you will need:

The Motion Sensor:
Arduino Uno
9V battery9
V battery clip
2.1mm power plug
Various lengths of wire
PIR motion sensor
Piezo buzzer alarm (9V or lower)
LED
Heat Shrink Tubing
Solder
USB cable (to arduino)

Tools for Motion Sensor: 
Soldering Iron
Wire clippers

The Speaker Case:
Paneling
Plywood
Phillips Panhead screws – 1/4″ (2)
Phillips Panhead screws – 1/2″ (4)
Hot Glue
Interior Construction Adhesive
Black Pantyhose
Primer
Black paint (flat)

Tools for Speaker Case:
Power saw
Ruler
Dremel Tool
Drill (with various bits)

Step 2: Program the Arduino:

The first thing that you should do is to upload the motion sensor code to your arduino.

I found a good code here: http://make-documents.s3.amazonaws.com/fv1fYSLfy6QRgANM.pdf

Open the pdf and copy the code into a new sketch in the arudino program.

I found one small error in the code where a comment stating ” numbers 10, 11)” ran into the program. Just delete this or cut and paste it in it’s proper place right above the line.

Compile, and then plug in the arudino with the USB cable and upload it.

Next you can begin to construct your motion sensor circut.

Step 3: Attach the PIR Sensor:

First you will connect the arduino to the PIR motion sensor. Gather your wires and cut three to about 6 inches and strip the ends so that they can easily be plugged into the slots of the arduino. I recommend using wires of different color or shrink tubing to make things easier to remember.

Once your wires are cut, you will need to solder your wires to your PIR sensor.

The wires with the tubing in the picture (black, red, and yellow) are the wires I attached to my PIR.

Wire 1: Plug into the second GND slot in the arduino and twist the opposite end of the wire to the GND peg of the PIR. (black in the picture)
Wire 2:  5v slot of the arduino to VCC of the PIR. (red in the picture)
Wire 3: Slot 2 to of the arduino to OUT peg in PIR. (yellow in the picture)
Arduino connecting
WARNING: Do not connect VCC to VIN. I burned out my arduino this way.

Step 4: Attach your Piezo Buzzer:

Now you are ready to hook up your piezo buzzer.

Most piezo buzzers have wires attached to them: the black wire goes to GND and the red wire to pin 10. If yours doesn’t, don’t worry. The polarity in this case isn’t integral.

(In the picture the buzzer’s wires are solid black and solid red)

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]The Motion Sensor:
Arduino Uno
9V battery9
V battery clip
2.1mm power plug
Various lengths of wire
PIR motion sensor
Piezo buzzer alarm (9V or lower)
LED
Heat Shrink Tubing
Solder
USB cable (to arduino)

Tools for Motion Sensor: 
Soldering Iron
Wire clippers

The Speaker Case:
Paneling
Plywood
Phillips Panhead screws – 1/4″ (2)
Phillips Panhead screws – 1/2″ (4)
Hot Glue
Interior Construction Adhesive
Black Pantyhose
Primer
Black paint (flat)

Tools for Speaker Case:
Power saw
Ruler
Dremel Tool
Drill (with various bits)[/box]

 

For more detail: Cat Repelling PIR motion sensor (covert) speaker box alarm using Arduino


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top