Wednesday, 20 June 2012

A good idea and Arduino

By Gene Ryan Briones
Phil Tucker got tired of chasing off the neighborhood dog for constantly “pooping” on his front lawn. So, armed with a TRENDnet IP camera, an Arduino microcontroller, and a sprinkler valve, he created a personalized yard defense system. Tucker said that his yard defense solution has two benefits. First, it keeps his lawn healthy by setting it up as a timed watering system. And secondly, it sends offending dogs running home squawking and wet. Well, it seemed like the perfect way to deal with the neighborhood dog, without having to deal with the negligent owners.



The inventor explained that each time the IP camera detects motion in configured regions of its video stream, it triggers one of its General Purpose Input/Output (GPIO) ports. Once it’s received the GPIO signal, the microcontroller will reportedly trigger a relay that connects a 24-volt power supply to the sprinkler solenoid valve. Then the valve will open and it will sprinkle at the direction where the motion was detected. The TRENDnet IP camera reportedly has the capability to send email alerts with snapshots, apart from recording video.

“Spaghetti” IP Cam / Arduino Motion Detect Sprinkler
By Phil Tucker
After a neighbourhood dog decided my front lawn was a fantastic place to poop on and his owners decided that they don’t care for bylaws I set upon finding a solution. Sure you could try cayenne pepper, mothballs, ammonia or even marking your own territory (take that!) but I already had an IP camera monitoring my front yard for security purposes, so I figured I’d just hook up an Arduino and a sprinkler valve. This yard defense solution has two added benefits, it keeps my lawn healthy (I can set up timed watering through this system) and it sends offending dogs home stinkin’ wet. From me having to shovel dookie off my lawn to negligent owners having to deal with wet dog — perfect.
When the IP camera detects motion in configured regions of its video stream (the rectangles in the screenshot) it triggers one of its General Purpose Input/Output ports (GPIO). The Arduino is listening for this GPIO signal and once its received the Arduino triggers a relay which connects a 24v power supply to the sprinkler solenoid valve. The valve opens when 24v is applied to it and “sprinkles” whatever was responsible for the motion.
The TRENDnet IP camera I employed works great as it already records video of events to network or attached storage, sends email alerts with snapshots and allows manual triggering of its GPIO.
The TRENDnet monitoring plugin only works in IE but after some reverse engineering and C# coding I had an easy to use web interface for all browsers and mobile devices.
If there’s enough interest I’ll post circuit and wiring diagrams. Ensure the valves you get are non-latching 24v solenoids, some 9v valves seem tempting but are magnetic and require a more complex circuit.

2 comments:

  1. There are lot of information about arduino, cam, defense, detect, dog, idea, ip, microcontroller, Motion, neighborhood, poop, system, yard etc. Good work keep it up !!


    Lawn Sprinkler

    ReplyDelete
  2. Recent numbers show that 63% of US households own a pet - that's 71.1 million homes and families with dogs, cats, iguanas, parakeets, fish, ferrets, potbellied pigs, etc, etc., Taking care of a pet is tougher than taking care of an infant, since our pets can't speak. Hence, making sure your pet is safe and happy when you leave it alone at home should be a priority for all pet owners. One of the simplest ways of watching over a pet remotely is by using some sort of webcam software like GotoCamera www.gotocamera.com that is easily available online these days. Thanks to technology and some very smart people who are working on making things easier for us, you can now use your basic webcam to monitor your pets while you're away from them.

    ReplyDelete

Thank you for your comment.