3D Printable Pet Foot Dispenser With Level Sensing
by Penguingineer in Circuits > Arduino
35 Views, 1 Favorites, 0 Comments
3D Printable Pet Foot Dispenser With Level Sensing

In this project, I built a 3D-printed pet food dispenser with a food level sensor and RGB LED light bar to indicate the fill level! As your pet eats the foot in the open tray in the bottom of the dispenser, food in the upper reservoir gradually falls to keep that space filled, so your pet doesn't run out of food to eat. An RGB LED light strip shines behind a 3D printed "light bar" to indicate the fill level (green is sufficiently filled, yellow is getting close to empty, and red means you need to refill the food reservoir.)
I used an ESP32 development board programmed using the Arduino IDE, a common strip of RGB LEDs, and a single axis joystick module acting as a spring-loaded potentiometer to detect the and indicate the pet food fill level. Because this project was made using the ESP32 module, wireless communication communication (Bluetooth Low Energy, Wifi, or ESP-NOW) could be added to ping the user about the fill level, enabling remote sensing!
This is a useful project which incorporates several aspects of electromechanical design which carry over to many other types of projects:
- Arduino programming
- 3D printing
- Electronics wiring (low voltage)
- Reading from a single-axis joystick
- RGB LED strip lighting control
Note: Some of the links in this article are affiliate links. This means that, at zero cost to you, if you click through the link and make a purchase, I will receive a commission.
Supplies
- 1 x LED Light strip
- 1 x ESP32 development board
- 1 x Single-axis joystick
- 1 x 5VDC Power supply
- 1 x Assortment of jumper wires
- 1 x Set of black hot glue sticks
- 1 x Hot glue gun
- 1 x 1kg spool of black PLA+ 3D printing filament (for most of the dispenser parts)
- 1 x 1kg spool of white PLA+ 3D printing filament (for the light diffuser bar)
- (Optional) 1 x FDM 3D printer with sufficiently large build area (minimum 250 x 250 x 200mm)
Hardware Design










The 3D-printable files (STL format) and the full assembly file (STEP format) are provided below. The RGB LED diffuser bar is printed from white PLA+ filament, with 2 x walls and no infill. The remainder of the parts can be printed using black PLA+ filament. If you'd like to print the parts yourself, you will need access to an FDM 3D printer with a sufficiently large build area (minimum 250 x 250 x 200mm), for example, this open-source printer available on Amazon. To print the parts, download the STL files and set up the print job using any free slicer software such as Cura.
To assemble the enclosure, place the reservoir on top of the tray. The parts are meant to easily separate for adding food and maintaining the feeder, but if you'd like to hold any plastic parts held together more firmly, black hot glue with a hot glue gun can be added.
Electronics

.png)



Electrically connect all the components according to the above wiring diagram using jumper wires:
- ESP32 development board
- LED Light strip
- Single-axis joystick (center-return style, green color)
- 5VDC Power supply
For the 5V power supply, use the green screw terminal attachment, and be mindful of the polarity of that connector (power is +, and ground is -) when providing power to the 5V and GND pins on the ESP32 board. Mount the single axis joystick in the level sensing arm slot so that the joystick arm pivots with the sensing arm.
If you would like to change the behavior of the single-axis joystick (spring loaded potentiometer) so that it either returns to its bottom position (black color option), or so that it doesn't have spring-loaded return behavior (orange color option), variants of the joystick are available for purchase. The different variants are useful for different use cases!
Code

ESP32 microcontrollers provide extra functionality compared to older Arduino boards, including wireless connectivity, larger memory and higher clock speed. They can be used with the Arduino IDE (Arduino framework) easily. In order to enable ESP32 boards to show up as selectable options in the Arduino IDE software, you can follow the setup procedure in this video made by YouTuber Robonyx:
The code uses the Adafruit NeoPixel library for controlling the RGB LEDs - that library can be downloaded using the Arduino IDE. To load the code (Pet_Feeder_Level_Sensor.ino) onto the ESP32 development board, connect the board to your computer using a micro-USB cable, and open the code file in the Arduino IDE. For the board, select "DOIT ESP32 DEVKIT V1", and then click Upload to load the code. If the code successfully uploaded, the RGB LED light strip will now react to the joystick position!
If the colors are incorrect (e.g. red, green or yellow when they shouldn't be), remove the joystick + level sensing arm assembly from the dispenser, and turn the power to the ESP32 off and then on again - this will enable the joystick to "re-zero" itself so that the center position is calibrated correctly. You can then re-install the joystick and level arm assembly back into the dispenser reservoir.
Downloads
Demonstration

Here is a demo video showing how the light bar reacts to the level sensor arm, indicating the level of pet food in the reservoir!
Conclusion + Next Steps
This project successfully demonstrates:
- Reading from a single-axis joystick (spring-loaded potentiometer)
- Controlling an RGB LED light strip using the Adafruit Neopixel Library
- 3D-printing and assembling a custom pet food dispenser
To expand on this project, you can utilize the wireless capabilities of the ESP32 microcontroller to enable Bluetooth Low Energy, Wifi, or ESP-NOW communication to transmit the reservoir fill level. The center return single-axis joystick (spring-loaded potentiometer) can also be replaced with one of its variants (bottom return, or no return) to change the behavior of sensing in the assembly. You can also modify the 3D models to adjust the dimensions of the pet feeder if you'd like to change its size or shape.
I hope you enjoyed this project!
Check out my other Instructables articles:
- ESP32 + BaseCam Bluetooth Gimbal Control
- Single-Axis Joystick Controller Module Using Arduino
- Accuracy-Sensing Smart Sports Rebounder With ESP32
- EMT Conduit-Mounted Weather Station Wind Sensors
- Telescoping EMT Conduit Pole Extension Sensing Methods + Photoresistor Implementation
- Force-Sensing Telescoping EMT Conduit Pole
- Jumbo-Sized Telescoping Light Painter Made from EMT (Electrical) Conduit
- Homemade/DIY Telescoping Pole From EMT (Electrical) Conduit
Thanks for reading!
Austin Allen
Founder and Owner
Elation Sports Technologies LLC