Tuesday, July 16, 2013

Deer Defense System: PIR motion sensor

Today I will provide information necessary to build a Deer Defense System (DDS). The specific plans I will be using were leaked from an undisclosed source at the DoD and are highly classified. Continue reading at your own risk.

This summer has been a unique adventure at the family garden. First, for whatever reason our squash have grown huge this year. Second (and more relevant), the deer have been particularly aggressive and determined.

For those of you that may not know, in certain areas of the Southern United States white-tailed deer (Bambi) are quite prolific. What may be less known is that these deer love to eat bean plants and will tolerate eating squash, tomatoes, cucumbers, and anything else you don't particularly want eaten. I can vouch for this from experience. Feast your eyes on the destruction.

Well we explored several more traditional methods of repelling deer. We tried all sorts of smelly concoctions. Some worked until it rained. Planting garlic did not help. Marigolds and mothballs did not help. The .30-06 did not work (We didn't try. Deer are out of season. Babies). They sell motion activated sprinklers that would probably work, but they are $50 a piece. No dice.

Having too much free time, I set about making a motion activated deer scaring device (these plans weren't really stolen from the DoD). Here is an overview.

At the heart of the matter is a Pyroelectric InfraRed  sensor. Mine was purchased from Ebay for $1.98. It does work, but be warned, when I asked for the datasheet they said it was a "trade secret." Right. Several other vendors carry them. For details on how to use a PIR sensor see THIS link. Basically, a pin goes high when it senses motion.

 My sensor had several adjustments on it. I found the picture on the left that tells what everything does. By wiring up an LED as discussed in the link above, I then found the settings that worked best for me.

After getting my motion sensor working I had to decide what brains to put in it. I considered another ATtiny45 , but decided to try something simpler first. I just hooked a transistor to the output of the sensor and used it to turn on a bright LED and sound a buzzer. 

Now the biggest concern I have here is the power consumption. I am powering the entire thing on 3 AA batteries. I read online that most of these PIR sensors use about 1.2 mA while on idle. I need a way to shut it down during the day (deer eat gardens after dark). Basically I want a nightlight circuit. 

I had a photo-resistor, but unfortunately the only transistors I had were NPN. This led me to use THESE plans to turn on the power to the PIR sensor only when it is dark outside. When it is light, it supposedly uses in the realm of .1 mA. With this addition, the DDS should last a month or so depending on how often the alarm goes off. Below is a rough diagram of what I built. The circuitry on the left turns on the power at night. The stuff on the right scares the deer.
The switch is the PIR sensor
I soldered everything together and hot glued it into a nice watertight container. Now it is ready to go. I don't know if it will actually scare off the dear or not. I suspect it will not do too much. Regardless, it was a fun project. I hope you enjoyed it!


No comments:

Post a Comment