Skip to main content
Version: FILS English

Pet Feeder

An automated Smart Pet Feeder

info

Author: Borca Razvan Andrei
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-RazvanAndrei2005

Description

A smart, automated pet feeder that reliably dispenses perfectly portioned meals on schedule while keeping track of your cat's daily eating routines. It actively monitors for food jams to ensure your pet is always fed, and automatically logs exactly when they visit the bowl so you can easily monitor their habits.

Motivation

The primary motivation for this project is the daily challenge of managing the demanding feeding schedules of my two hungry cats. Manually dispensing exact portions multiple times a day is difficult and inconsistent, especially during early mornings or when I am not at home

Architecture

 +------------------+             +-------------------+             +-----------------------+
| Time Manager |====I2C======| |====PWM======| Dispensing Mechanism |
| (RTC Module) | | | | (Servo Motor) |
+------------------+ | | +-----------------------+
| |
+------------------+ | | +-----------------------+
| Weight Monitor |===Data======| |====SPI======| Visual Interface |
| (Load Cell/ADC) | | State Manager & | | (Color Display) |
+------------------+ | Logic Controller | +-----------------------+
| (Pico 2W) |
+------------------+ | | +-----------------------+
| Presence Tracker |===GPIO======| |====GPIO=====| Status Indicators |
| (PIR Sensor) | | | | (LEDs & Buzzer) |
+------------------+ | | +-----------------------+
| |
+------------------+ | | [Data Subsystem]
| Local Input |===GPIO======| | +-----------------------+
| (Push Buttons) | +-------------------+====SPI======| Persistence Logger |
+------------------+ | (MicroSD Module) |
+-----------------------+

Main software and system components:
-Core Controller: The Rust-based central brain that manages the state machine, evaluates feeding schedules, and processes sensor data.
-Perception Subsystem: Handles all real-time inputs, including offline timekeeping (RTC), exact weight monitoring (ADC), cat presence detection (PIR), and manual button presses.
-Actuation & UI Subsystem: Executes commands by driving the physical food-dispensing servo motor and provides real-time feedback via the color screen, LEDs, and buzzer.
-Data Persistence: Manages non-volatile storage, automatically logging feeding success events and cat visitation timestamps directly to the MicroSD card.
-Feedback Loops: The internal logic that connects inputs to outputs-automatically stopping the motor when the target weight is reached or reversing it if a food jam is detected.\

Log

Week 23 - 29 March

-Got the initial idea -Submitted the project proposal to the teacher for approval.

Week 30 - 5 April

-Received project feedback from the teacher -Researched and planned how to integrate the suggested features

Week 6 - 12 April

-Easter Break

Week 13 - 19 April

-Ordered some of the components

Week 20 - 26 April

-Received the hardware order -Soldered some of the components at the lab

Hardware

2x Raspberry Pi Pico 2 W
1x DS3231 Real-Time Clock
1x CR2032 Coin Cell Battery
1x SG90 Micro Servo Motor
1x Load Cell (1kg) & HX711 Amplifier Module
1x 1.44" Color LCD ( ST7735 Controller)
1x HC-SR04+ Ultrasonic Sensor
1x MicroSD Card Module
1x MicroSD Card
Push Buttons
LEDs
Resistors
1xBuzzer
Breadboard(for the moment)
Jumper Wires
USB Cables
Breakout Pin Headers
Electrolytic Capacitors\

Schematics

Pet Feeder Architecture Schematic

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WThe microcontroller39 RON
Raspberry Pi Pico 2WDebugger39 RON
1.44" SPI Color DisplayThe Display30 RON
DS3231 RTC ModuleHigh-precision I2C offline clock16 RON
MicroSD Card ModuleMicroSD Card Module4.4 RON
HC-SR505 PIR SensorMini motion detector7.3 RON
Micro Servomotor SG90Small Servo for now12 RON
1/5 kg Load Cell with HX711 Amplifier ModuleHigh-precision weight monitoring for exact portion control27 RON
HC-SR04+ UltrasonicDistance Sensor15 RON
3x40-pin Male HeadersMale Headers for pico1.3 RON
Breadboard & Jumper WiresFor now Breadboard~15 RON
Basic Electronics KitPush buttons for manual control, RGB LEDs/Buzzer for error alerts, and 220ohm resistors.~15 RON
Estimated totaluntil now221 RON

Software

LibraryDescriptionUsage
cortex-m & cortex-m-rtARM Cortex-M core and runtimeProvides low-level CPU access and handles the initial startup execution for the Pico 2 W.
embassy-rpAsync Hardware Abstraction LayerCore driver used to control the Pico's specific GPIO, SPI, I2C, and PWM (Servo) in an asynchronous way.
embassy-executorAsync task executorManages concurrent tasks, allowing the system to run the web server, read sensors, and drive the motor simultaneously.
embassy-timeAsync timing and delaysProvides non-blocking delays and scheduling (e.g., waiting between motor steps or polling the load cell).
embassy-syncSynchronization primitivesSafely shares data (like current weight or system status) between the different asynchronous tasks.
embassy-netEmbedded network stackThe TCP/IP stack required to handle internet traffic over the Wi-Fi connection.
cyw43 & cyw43-pioWi-Fi chip driversControls the Pico 2 W's onboard wireless chip to connect the feeder to your home network.
picoserveAsync embedded web serverHosts a lightweight local web dashboard so you can view logs or trigger feeds from your phone.
hx711Driver for HX711 ADCUsed to read real-time weight values from the load cell for exact portion control and active jam detection.
ds323xDriver for DS3231 RTCUsed over I2C to read highly accurate offline time so the feeder triggers perfectly on schedule.
st7735-lcdDisplay driver for ST7735Used to initialize and send pixel data to the local 1.44" SPI color display.
embedded-graphics2D graphics libraryUsed for drawing the UI, text, menus, and status shapes onto the physical screen.
defmt, defmt-rtt & panic-probeDeferred formatting & debuggingA highly efficient logging framework used during development to view errors and sensor data via the SWD debugger.
fixedFixed-point arithmeticPerforms precise, lightweight math for weight (gram) calculations without the overhead of floating-point numbers.
embedded-sdmmcSD Card & FAT16/FAT32 libraryUsed over SPI to read and write persistent feeding history and cat presence logs to the MicroSD card.
  1. Hackaday: DIY Automated Pet Feeder Projects (For mechanical and hardware inspiration)
  2. Printables / Thingiverse: 3D Printed Auger and Dispenser Mechanisms
  3. Commercial Inspiration: