| ||||
An Automatic Cat ScarerOverviewA friend of mine had a problem with cats digging around in her vegetable patch. It is a 2 x 3 metre area and although there was much more garden to play with, they seemed to like that particular patch, often just lying down on the herbs. This project was the a solution to that problem. The aim is simple, detect when a cat wanders into the vegetable patch, and turn on a sprinkler to scare the cat away. PartsA small PIR sensor module detects the cat, triggers a relay which enables a solenoid valve to allow water to pass to the sprinkler via a hosepipe. Initially, I thought this could be done with a small microcontroller or even a simple 555 timer. It turned out that the PIR module has most of the smarts built in, both the sensitivity and length of the output pulse could be adjusted.
I had a small relay board and just needed a 12V to 5 V converter to drive it. If it had been a 12V relay, I could have connected directly, but I was working with what I had on hand. The PIR, the voltage regulator and relay board where all built into a small translucent box, with connections be exposed via 4mm terminal posts. Here are the main components: The sprinkler was a shaped like a sunflower and if directed upwards could cover the whole area, to ensure a cat would be suitably soaked. This shows the solenoid valve and sprinkler connections: And finally, the 12V power wiring. Originally this was to be supplied via a wall wart, hence the long cable. I modified this to be replaced by a small lead-acid battery. AdjustmentThe sensitivity of the PIR module was brought to its minimum range of about 3 metres so as to minimize false triggering. The length of time the water stays on was adjusted to about a minute. After all, we are not aiming at watering the garden, just making it uncomfortable enough for a cat to move off somewhere else. Going SolarThe solenoid deemed that this needed to be a 12Volt system. The solenoid and relay draw in the order of 150mA combined when operational. The PIR draws very little current when sensing. I decided to cut the dependence on mains power by driving the system from a small 1.2AH lead acid battery. Lead Acid batteries are very easy to trickle charge, the only requirements being that charge is < 0.1C and the charge voltage is kept below 13.8V. This application requires very little charge so could be achieved witha very small solar panel. Here is a small wooden solar battery box I made from 10mm thick wood, screwed together. After constructing the box, I coated the inside joints with silicon to ensure it would not allow water ingress. I decided to use three 5V solar panels in series which gave a maximum charge current of 40mA in midday NZ sunshine (summer). These were wired through the lid. The connections were covered with silicon sealant and the wires passed into the box. The panels were sealed onto the outside of the box using hot-glue and the lid attached using a small hinge. The final task was to ensure that that the battery would not be subjected to change voltages over 13.8v. The maximum output from the three panels in series is actually 17.6V. 17.6 - 13.8 = 3.8v. We can use passive diodes to drop voltage, a silicon device drops approximately 0.6v. Therefore we need 3.8/0.6 = 6.3 diodes, so I chose 7. There are many more elegant ways of doing this but 7 diodes in series is simple and cheap, as long as they can handle the current. Here are the diodes in the battery box InstallationInstallation was pretty straightforward although I was missing some tools so the sensor got taped to the back of a gnome that had been discarded behind the shed. Kate wont thank me for that, she hates gnomes! Here the solar panels are connected via the diodes to the battery. They were simply hot-glued to the lid. It was then put up in the sun. We will move it somewhere more suitable later. The valve was mounted near the edge of the veggie plot to enable easy hose attachment and removal. The sprinkler which looks like a plastic sunflower (because it is), it tucked in the corner so it can wet the whole patch when it goes off. And finally the sensor which was strapped to the back of the gnome. It will take some experimentation before the best location for the sensor is found but there is enough spare cable to allow this. And finally, a test drive. Admittedly I am somewhat larger than a cat but even sneaking up very slowly set the device off. I tried with smaller warm bodies (children) and that was good too. No cats around at the moment. I believe the biggest problem will be false triggering with wind/sun/rain. We shall see! And that is it! I am building another one of these devices to hide in our garden as they make a great booby-trap when we have water fights with the kids! January 2016 | ||||
| ||||