pet-dispenser
A treat dispenser can be a useful training tool and a fun game for your pet. There are several commercially available treat dispensers and even more guides online describing do-it-yourself pet feeders and treat dispensers. However, the commercial products are expensive and closed-source, and the DIY solutions are neither well documented nor adequately tested, leaving too much unknown to warrant spending time and money to build and troubleshoot a homemade device.
Fortunately, this paper describes and tests a robust, open-source feeder with design files and sample code. The only problem is that the authors use laser-cut acrylic to fabricate their device, which requires access to expensive machinery. This seemed unnecessary. I looked around the house and found a salsa jar and some cardboard tube and made a low-cost version of their device.
This prototype dispenser is made mostly from cardboard and plastic sheets from a tupperware box with a lot of hot glue. The lid of the salsa jar has a cutout for treats at the top and a hole in the middle for the servo. I used a small piece of MDF to make the notched wheel and an IR photodiode and sensor to detect successful release of pellets.
The buttons are two pieces of plastic sandwiched over a small tactile switch. The whole thing runs on a 5v arduino pro mini with the example sketch from this repository. Several modes are made available:
- Any-button: pulling any of the input pins to ground will dispense food
- Alternating: triggering a button only works once in a row
- Unbalanced: 1st button releases more treats than the others
- Multi-press: two or more presses are required to dispense a treat (my dog can't learn this one!)