Innovative Kibble Dispenser

Do you have an adorable dog or cute cat at home? If so, you've come to the right place!
Going away for the weekend, coming home late, or simply wanting to get a bit more sleep... These are commonplace situations for us, but for our pets, they can quickly rhyme with empty bowls: the worst imaginable catastrophe in their eyes.
And even when someone is there to feed them, there's no guarantee that the quantity is right. Too little, and they clamor. Too much, and they're gluttons for food.
So to ensure that my cats always receive the right amount of kibble, and above all to avoid being woken up at 6am by a big, desperate meow, I designed an automatic kibble dispenser.
You don't even have to be at home any more: thanks to an Internet connection, you can remotely control not only the dispensing times, but also the exact quantity of kibble to be given. The system warns you immediately when the tank is empty, and you can check the remaining level in real time. All feedings are recorded, so you can keep track of the quantities fed day after day. With a capacity that can last up to two weeks, you can be sure that your pet will be fed even if you're away for a long time.
As a bonus, the dispenser can be connected to a 3D-printed button so your pet can help himself to his favorite kibble. A simple gesture, but a real headache to teach your cat.
In this Instructables, I'll show you how to make this dispenser step by step. A simple, low-cost, accessible and customizable project that's very close to my heart.
Supplies
Mechanical fabrication:
- 3D printer
- Plexiglas tube (inner diameter: 113 mm, thickness: 3 mm, to be purchased or printed with transparent filament)
- Pet bowls
Electronic components and sensors:
- Converter 220V AC → 12V DC
- ESP32
- Weighing cell and HX711
- Ultrasonic sensor HC-SR04
- DC motor 12V
- Transistor TIP120
Electronic assembly:
- Soldering iron and wire
- Cables and basic components
- PCB Prototyping Board Hardware
3D Printing the System


First, you've got to print out the different parts of the dispenser. This can be a lengthy process, due to the large size of some of the parts to be printed, but don't worry, during this time we'll be able to turn our attention to the electronics of the system.
Most parts can be printed in PLA with a layer height of 0.2 mm and a 20% gyroid fill. You can, of course, adapt these parameters to your own preferences and printer settings. I advise you to use tree supports when necessary: they're easier to remove, especially around complex areas.
ATTENTION:
- Print the 'Plexiglas Storage Cylinder' only if you don't want to buy a real Plexiglas cylinder. In this case, use a transparent filament.
- Print the ‘Cable Cover 2’ part twice, and the ‘Foot’ part four times, preferably in TPU for a better grip on the ground, but you can also print it in PLA if you don't have any.
Create a PCB With All the Electronic Components
.jpeg)


To avoid false contacts and improve system organization, it's best to group all components together on a printed circuit board (PCB). The main components are soldered to it, and connectors are added for the motor and scale cables, which are a little further away from the rest of the electronics.
NB: Refer to the diagram for exact routing and placement.
Let's Get Coding!



To carry out this project, we'll need Visual Studio Code. For those of you who don't already have it, you can download and install it here.
In the extensions tab install PlatformIO and configure it for your ESP32-WROOM
Then, the first thing to do is to calibrate your scales. To do this, you need to install the 'HX711_ADC' library and run the 'Calibration' example.
Finally, you can copy and paste the code below. Don't forget to install all the necessary libraries from PlatformIO and to replace information such as the ssid and password for your wifi.
Once the code has been uploaded, open the serial monitor to obtain the ESP32's local IP address. Enter this address in your browser (from a device connected to the same Wi-Fi network). This will take you to the web interface for remote control of the dispenser.
Assemble the Dispenser




Assembly of the dispenser may seem complex, but it has been designed to be as simple as possible. Follow these step-by-step instructions for a flawless finished product :
- Fasten the mechanical part using M2 screws:
- the Endless Screw
- Base Funnel
- Croquettes Cylinder
- Place the electronics in the dispenser base.
- Fasten under the base :
- Bottom Cap
- feet (Foot) with M2 screws
- Cleanly pull out the cables :
- scale
- ultrasonic sensor
- power supply
- Move on to the top section:
- Attach the Plexiglas Storage Cylinder
- Assemble the parts making up the dispenser cover
- Install the ultrasonic sensor in the cover to measure the level of remaining kibble.
- Use the Cable Cover parts to hide the cables and keep the unit clean.
- Insert the Croquettes Output piece at the kibble outlet (press firmly if necessary).
- Place the scale under your pet's bowl to monitor the amount of kibble dispensed.
And there you have it, ready for use.
Create the Button

If you'd like to go a step further and design a button that will allow your pet to help himself to his favorite kibble, I invite you to follow steps 5 and 6. Otherwise, go on to step 7 to conclude this exciting project!
To make this Wifi-connected button for the kibble dispenser, you'll need an ESP 32, a PCB measuring around 30 mm by 40 mm, a switch and other basic components, such as cables, etc.
First of all, you need to print the button structure in PLA using the same parameters as those used for printing the kibble dispenser parts... The 'Button' part directly incorporates a spring, to ensure good user comfort. To print it correctly, remember to tilt the button so that the springs can be printed parallel to the plate.
Once the button is printed and the pcb made (it's simply a matter of connecting a button to the pin of your choice, in this case 5), you can assemble the whole thing using 3 M2 screws.
Code the Button
You can copy and paste this code into a new project on PlatformIO and upload it to t.
Give It a Try With Your Pets!





Now your dispenser works perfectly! You can use the web interface to control and monitor kibble dispensing, and even teach your cat or dog to serve itself.
I hope you've enjoyed this tutorial. Feel free to leave a comment and a heart if you did. If you've followed my Instructables, please let me know, I'd really appreciate it! And if you get stuck at any stage, leave a message in the comments, I'll do my best to help.