If you’ve ever been to a circus, you know that we can train animals to do some pretty amazing things. As B. F. Skinner showed the world, reinforcement training is very powerful. Start small by reinforcing the first step of a trick, then build that up by adding more steps as you go. That is a labor-intensive process, but what could we achieve if we were to automate it? Could your pet learn how to do something really impressive, like play a piano? If that is possible, then this DIY musical pet feeder would make it happen.
We can’t expect a dog or cat to comprehend music theory or even to read sheet music, so this is all about memorization. It is kind of like Simon Says. In theory, the pet would start by memorizing the first note in a sequence. When they press the correct key to trigger that note, the feeder dispenses some food. After Mr. Mittens figures that out, the complexity can increase to two notes. Keep repeating that process and soon Mr. Mittens may as well be a Saint Bernard, because he’s basically Beethoven.
This musical pet feeder handles that process itself with an automatic tutor mode, so you can fill it with food and relax in the confidence that your pet is progressing. An ESP32 handles the lessons and generates sound, which it outputs to a speaker through an amplifier module. That ESP32 and the other components, including the piano key buttons, solder onto a custom PCB. Because the ESP32 has Wi-Fi and Bluetooth, the owner can access information about their pet’s progress through a smartphone.
The ESP32 also controls the motor in the feeder mechanism. That is 3D-printed and reliably dispenses a consistent amount of dry food. It is hidden within a CNC-cut wood enclosure that, of course, looks like a little piano. The ol’ ivories are 3D-printed, too.
In all seriousness, it is unlikely that even the smartest dog or cat would be able to memorize more than a few notes in a sequence. Even if they did, they probably wouldn’t have the dexterity to press the correct keys each time. This is, therefore, more likely to result in a sound similar to a bag of potatoes being dropped on a keyboard, rather than beautiful music. But we’ll never know for sure unless we test it at scale, so go ahead and build one for your pet!