They say puppy love is unconditional. But there are certainly times when it gets put to the test, like when you get awakened every night at 3 am from a dog that needs to go out. As a new owner of a yapping dog, a very sleep-deprived David Hunt created Pi-Rex, a bark-activated door opening project using Raspberry Pi. Although he admits this project isn’t the most secure or a substitute for training your dog, he saw it as an opportunity to experiment with the application to solve a specific dilemma.
Raspberry Pi is a miniature computer. The size of a credit card, the Pi can be used for a wide range of purposes. It features inputs for a keyboard or mouse, along with outputs to connect the device to a monitor or screen.
For this project, the Pi is being used to control several components – the bark detector, a motor driver, and a pulley system.
The bark detector is wired to the input of the Raspberry Pi to detect when your dog barks. The motor driver circuit unlocks the door and the pulley system opens the door.
David started this project by purchasing a DIY audio detection kit. A basic audio detection circuit should suffice. It just needs to be able to pick up the noise and then signal to the GPIO on the Raspberry Pi. Instead of adding a buffer circuit between the audio detector and the GPIO, David simply connected the audio detector directly to the GPIO.
David mentioned that this project could be improved by finding a way to sample audio using the Raspberry Pi in order to compare known barks. For now, the device will simply open when it detects a high enough sound decibel.
Next, you’ll need an actuator to unlock the door. David used a 12V central door lock actuator that only cost a few dollars. This is connected to a makeshift locking system.
The locking system includes an angle bracket and several pieces of metal fused together with the actuator. You’ll need to examine David’s example closely to get a good idea of how to build your own locking system.
The actuator needs to cover two positions – locked and unlocked. When fully extended the locking system will catch the door bolt. When activated, the locking system will allow the door to swing open.
Once you have all the components, you can finally put the entire project together. David mounted all the boards and the Raspberry Pi to a clear acrylic board.
The Raspberry Pi was placed in the center with the audio detector on one side and the motor driver on the other. For wiring, David used Dupont connectors with 2.54mm pitch.
You’ll need to connect the motor driver to the pulley system. The pulley system needs to be able to allow the door to swing open and pull it closed. Before the pulley system can return to the latched position, the door must be closed.
For the code that you will read in the GPIO, you’ll need to follow the specific code provided on David’s post – unless you have programming experience.
Now, Fido can let himself in or out with a bark-activated door opening system using Raspberry Pi. This is just one example of what you can do with the Raspberry Pi. This minicomputer has been used to make handheld arcades, cameras, and dozens of other items. In fact, David has a few other DIY projects on his site that require the use of the Raspberry Pi.
If you want to learn the details of this DIY project, check out the full article from David Hunt on how to make a bark activated door system with Raspberry Pi.