AI Blasts Trespassers with Sprinkler Water

Ryder wanted to keep people from trampling the grass in his lawn and built this AI-controlled system to blast them with sprinkler water.

Usually only elderly curmudgeons get upset when people walk on their lawn, but Ryder's situation was unique. For some unknown reason, his city decided to rip out the concrete sidewalk that passed through his front yard. All they left behind was some dirt and Ryder wanted to eliminate that eyesore by growing grass on that barren strip. But pedestrians keep walking where the sidewalk used to be, which kills the fledgling grass before it can mature. He could have put up a sign asking his neighbors not to walk on the grass, but instead he used artificial intelligence to blast trespassers with sprinkler water.

The goal of this project was simple: spray water at anyone who walks through the yard so that they'll stop stomping the grass to death. A few months ago, Ryder used AI to detect passing dogs and compliment them. This is a natural progression from that project. Both projects utilize a machine learning model called YOLOv3, which can detect people, dogs, cars, and other common objects in a video feed. The dog-complimenting project looked for good boys in particular, but this new project looks for both dogs and people. If it sees either, it activates the sprinkler to douse them with watery retribution.

The video feed comes from a Wyze security camera placed on Ryder's patio. It runs custom firmware that makes the video feed accessible on the local network. A Raspberry Pi single-board computer runs the YOLOv3 machine learning model. If it detects people or dogs, it turns on a lawn sprinkler attached to a garden hose. The hose has an electronic valve that would normally be opened by a timer, but in this case the Raspberry Pi opens the valve using a relay. After passersby exit the frame of the video feed, the Raspberry Pi closes the valve — Ryder doesn't want to over-water the grass, after all.

The obvious problem here, aside from Ryder drawing the ire of his neighbors, is that the machine learning model doesn't know if someone is walking in the grass or on the street. Ryder did his best to place the sprinkler so its range doesn't extend too far past the edge of his yard, but there is still some risk of innocents getting a shower. Unfortunately, that's a price they have to pay in order for Ryder's lawn to look its best.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles