Project Video:
Features (the tl;dr):
- Almost entirely 3D printed (other than a motor, 4 bearings, some sensors, and the nuts and bolts
- Detects that the treat level is low before completely running out! no more sad cats that hear the food dispenser going off, only to be left with an empty belly!
- Self hosted wifi configuration page (connect to the AP, go to 192.168.4.1, enter your wifi settings, and it will join your wifi network
- Completely self hosted web UI / API - configure all your settings, vend treats remotely from other smart devices, and track your cats stats!
- MQTT support - connect your treat dispenser to a platform like homeassistant to see graphs of your cats activity and be alerted to when the treat dispenser is almost out of treats.
- A bunch of cool design features
- internal wire channels for cleaner design
- integrated springy labyrinth joint to prevent gear lubricant from leaking out over time
- easy to adapt base so you can mount it on your own creations
- Simple electronics
- All off-the-shelf sensor boards. No analog components other than some 470 ohm resistors for the LED's used in the light break sensors for detecting treats
_____________________
The deeper dive:
This project went through a few different design iterations.
Version 1 was based around a hopper that was gravity fed. Treats would fall into a casset wheel which would rotate 180deg until treats would fall out the front.

This design went through multiple itterations, but it suffered from 2 main flaws. The first was that the hopper (not shown above) had feed issues. This was solved by putting a vibrating motor on the side of the hopper, but it was incredibly loud and would wake us up at night. The second was due to inconsistencies in treat size. This design worked about 70% of the time, but if there was an abnormally large treat, it would jam. If there was an abnormally small treat, 1.5 treats would fall in and it would also jam. Most of the time, the motor would overpower the treat and just grind it up, but it wouldn't come out when it should, which upset my cat.
The root cause was that the dispenser didn't actually detect the treat coming out, just that it had rotated the correct distance.
Version 2 aimed to solve the feed issues, and i would come back to the hopper after, since that ended up being a major time sink in the v1 design.

Version 2 moved away from gravity feeding, and instead used a "vending machine auger" style screw to advance treats forward. Instead of trusting the rotation, i used a line break sensor at the dispensing spout. overall, this design showed a lot more promise. Sometimes treats wouldn't feed out the front and would get "smashed" into the front bearing cap. I attempted to solve this by adding holes to the screw, but that didnt work. Instead, i eventually added in a front scoop to guide treats to the center of the outer cylinder.
The main issue with this design was that it didnt have the hopper, and adding too many treats would cause it to over-vend at best, and jam at worse. I manually overcame this for a while by spacing out 10 or so treats. This design was also fairly long, so it could bounce up and down during heavy sprinting. This could cause treats to advance forward towards the spout if they were in the final inch or so. My cat actually learned this behavior, and stopped running as consistently.
Version 3 is what you see above. It solved the hopper issue, but in a way where the gearing (both between the actual gears, and the turn count on the screws) slightly preferences the bottom advancing treats faster, so that way the treats are spaced out as they drop between the upper and lower chambers.
Speaking of upper and lower chambers, Another issue with V2 was that it could only detect treats coming out the front, so "out of treat" detection was done by seeing that the auger spun for longer than some threshold (30s). This meant that when the treats did run out, my cat would end up disappointed, as he knows the sound means treats are...
Read more »
your cats enjoy. I will come back later when I have constructed an appropriate mechatronics related compliment