Observing our dog from spy can get us only so far. What if it becomes a vicious beast? But most importantly if it sleeps all day it certainly deserves a treat. To top it all off I decided to build a simple remote dog treat dispenser to reward her if she is being a good dog:
In addition to the Raspberry PI in the previous project, I bought a simple plastic cereal food dispenser, which can dispense buy rotating a gear at side. It was shipped cracked but that did not stop me. I attached the stepper motor to the end of the gear - with a duck tape of course. I tested different winds and selected a 4-winged one, which did not sleep as much and was quite reliable in the end.
The motor was attached to the Rpi through the GPIO:
I played with the different values for the rotation until I found a good one that dispense 3 - 5 briquettes. The problem was that the briquettes could get stuck in the dispenser if there were too many, causing for motor to not turn. I tested different amounts and found that somewhere around half of cup did not cause any trouble.
Then I created a simple Flask web server that was running on the RPI and through the VPN setup in the previous post I could click on a button and the food will be dispensed. The code for the web server is available on the Github.
The final contraption then allows for spying on the dog and feeding it from the other country if so desired. She looks quite happy!
Comments