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…
Advertisement
Get started with Raspberry Pi – everything you need to know to start your journey!
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
Get started with Raspberry Pi in Raspberry Pi Official Magazine 161
There’s loads going on in this issue: first of all, how about using a capacitive touch board and Raspberry Pi 5 to turn a quilt into an input device? Nicola King shows you how. If you’re more into sawing and drilling than needlework, Jo Hinchliffe has built an underwater rover out of plastic piping and […]
Read more →
Win one of three DreamHAT+ radars!
That’s right, an actual working radar for your Raspberry Pi. We reviewed it a few months ago and have since been amazed at some of the projects that have used it, like last month’s motion sensor from the movie Aliens. Sound good? Well we have a few to give away, and you can enter below. […]
Read more →
RP2350 Pico W5 review
It’s Raspberry Pi Pico 2, but with a lot more memory
Read more →

