Laser Dog Watcher
By Russell Barnes. Posted
Penny is a well-trained dog, thanks to her master’s Raspberry Pi-powered Laser Dog Watcher. Lucy Hattersley investigates…
When Dave Young, the owner of Young Circuit Designs, was training his dog Penny, he hit upon an idea. Why not turn a Raspberry Pi into a dog monitor that could issue voice commands when he’s not around?
“My dog Penny is a delightful girl,” says Dave. “We got her from the Denver Dumb Friends League [a local dog rescue] a few years ago. My wife and I were just going in to take a look. When I saw Penny, I knew she was my dog. We walked out with her that afternoon.”
Penny is a very clever dog. “She’s smart as a whip,” explains Dave, “and is quite good at playing people like a fiddle. She uses her very slightly lazy eye to make the saddest face in the world. Especially when food is involved. She’s food crazy.”
It took a long time to train Penny not to jump up on the counter and eat Dave’s food. “I didn’t want to use a shock collar,” he says, “and I toyed with using some very high-pitched noise as a deterrent, but settled on an array of recordings of me reprimanding her.”
The voice commands worked, but only when Dave was around to issue them. That’s when he hit upon the idea of using his Raspberry Pi to monitor Penny and issue spoken commands when he’s not around.
The Laser Dog Watcher has a laser beam similar to security systems (650nm, 6mm, 3V, 5mW Mini Dot Diode). “It sends a laser out to a mirror and measures if it makes it back to a sensor. If the sensor can’t see the laser, there is a circuit that tells the Raspberry Pi that the laser beam has been broken. The Pi then takes a photo of the area near the sensor and plays an audio file of my voice saying one of a few things that I use to reprimand her.
“I recessed a photoresistor [Excelitas Tech VT935G] into the box to block out ambient light and put the system on one side of the counter, and a mirror on the other side. I aim the laser to go from the system, bounce off the mirror, and then come back to the sensor. When the laser is blocked, the photoresistor sees less light [and] changes its output voltage, which is fed into a digital input pin of the Pi.”
Building a Laser Dog Watcher wasn’t as easy as it sounds. “I’d put it at medium to medium-hard difficulty,” says Dave. “The electrical circuit is easy, but creating a mechanical system that lines up nicely takes a bit of thought.” Helpfully, for anyone wishing to replicate the project, Dave has placed all the design schematics on the Element14 community website.
“Think hard about the mechanical system,” advises Dave. “I ended up using a Fresnel lens to make it easier to aim the laser. The Fresnel lens allows for the laser to be directed at a larger target area. A photoresistor is a pretty small sensor, and accurately hitting it from a 10-foot total laser length is a real challenge. If the laser hits anywhere on the lens, it will send the light to the photoresistor sensor.
“I also added some error correcting,” says Dave, “so that it doesn’t continue until the laser beam connection is remade. That way, if she knocks the aim of the system off, it won’t continually play my voice over and over.”
The system is designed to cycle through three audio files of Dave saying ‘no’ in a variety of ways, along with capturing a photograph of Penny. The laser tripwire could be put to a variety of different uses, though; it would benefit anything that responds to motion.
Russell runs Raspberry Pi Press, which includes The MagPi, Hello World, HackSpace magazine, and book projects. He’s a massive sci-fi bore.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Make your RAM go further – Raspberry Pi OS memory optimisation tips
In issue 164 of Raspberry Pi Official Magazine we have been playing around with the new Raspberry Pi 5 1GB RAM. While the RAM shortage caused by the demands of AI infrastructure is annoying beyond belief, this has been a great chance for us to really get to grips with RAM. Generating images in Stable […]
Read more →
Mighty Projects – 1GB Computer in Raspberry Pi Official Magazine 164
It’s normal for computers to get faster and more pwerful, but the new-ish Raspberry Pi 5 1GB is a step in the other direction: it has all the processing power and the same GPIO pins of its more costly siblings, but with only 1GB of RAM it’s at a price that’s friendlier on the wallet […]
Read more →
Win one of five 256GB Raspberry Pi Flash Drives
If you’ve been around long enough, you know that every Raspberry Pi accessory is top quality, and the latest Flash Drive is no different. Fancy a big one? We have five up for grabs, and you can enter below… Win 1 of 5 256GB Raspberry Pi Flash Drives
Read more →

