Skip to main content
Version: FILS English

Pet feeder

A simple solution for feeding your pet when you are away from home.

info

Author: Alexandra Negut
GitHub Project Link: link_to_github

Description

Growing up, I was always surrounded by pets and animals at home. One recurring problem we faced as a family was the difficulty of traveling, since we always had to find someone to feed our pets while we were away. This inspired me to create the Pet Feeder — a simple and effective solution that ensures your pet is fed, even when you're on vacation. You just need to fill the feeder with food, and the automated system will take care of feeding your pet at the right time, giving you peace of mind and freedom to enjoy your holidays.

Motivation

I choose this project because i have a pet and sometimes i have the same problem with feeding him when i am away from home. And I also wanted a project with a complex hardware that would help me in my daily life.

Architecture

alt text

The main components for my project are:

  • Raspberry Pico: Serves as the core controller, running the software logic and handling GPIO control for the motor and Wi-Fi communication.
  • Servo Motor: Dispenses a user-defined quantity of pet food (20 grams) by rotating a mechanism for a set time or number of steps
  • Wi-Fi Module: Enables the Raspberry Pi to communicate with a mobile or web app, allowing remote control of the feeding process.
  • Power Supply (5V): Powers the Raspberry Pi and motor
  • Load Cell HX711: Measures weight of the food in grams

Connection Overview:

  • mobile app (connected with wi-fi to my hardware project)
  • network module (logical layer that helps my app communicate with the raspberry pi)
  • controller (it receives commands from the network module, validates the command and activates the command)
  • feeding mechanism controller (a software module that sends signals to a motor or servo motor to release grains)
  • status feedback module (send feedback back to the app)

Here is the logic of how they connect:

From the MOBILE APP using WI-FI we connect with the NETWORK MODULE, after connecting with CONTROLLER then delivering the information to feeding mechanism controller using the motor via GPIO or to STATUS FEEDBACK MODULE sending the final information back to the MOBILE APP.

Let's take an actual situation:

The user selects the amount of food (20 grams) in the MOBILE APP, which sends the command to the Raspberry Pi over Wi-Fi using HTTP or MQTT. A NETWORK MODULE on the Pi receives the request and passes it to the controller logic. THE CONTROLLER calculates how long the FEEDING MECHANISM CONTROLLER should run to dispense the requested amount and activates the motor via GPIO pins. Once the feeding is complete the system sends a status update back to the MOBILE APP, confirming that the food was dispensed successfully.

Log

Week 28 April - 4 May

I started to work on the theoretical part of the project. And also bought some of the hardware parts. Mounted PICO on the bread board.

Week 5 - 11 May

Week 12 - 18 May

Week 19 - 25 May

Hardware

  • Pico Raspberry Pi 2 - central processing unit of the Pet Feeder
  • Servo Motor - dispenses food
  • Load cell - measures weight
  • Ultrasonic sensor HX711 - amplifies and converts the load cell's analog signalsto digital
  • Power supply - standard 5V supply
  • 3D printed - for a better looking project

Schematics

alt text

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico WThe microcontroller34.50 RON
Servo MotorDispenses pet food13.99 RON
Load Cell + HX711Measures food weight in grams5.99 RON
Power Supply (5V)+ batteryPowers the system4.69 RON
Debug probeDebugs the program62.62 RON
15 cm 10p Male-Female WiresMale-Female Wires4.45 RON
10 cm 40p Male-Female WiresMale-Male Wires5.99 RON
BreadboardMotherboard11.99 RON

Software

LibraryDescriptionUsage
pwmPulse-Width modulationTraits for the RP2040 microcontroller used for controlling the servo motor
embassy-rpAccess to the pheripheralsInitializing and interacting with peripherals
embassy-executorAn async executor designed for embedded usageUsed for asynchronous programming
embassy-timeTimekeeping, delays and timeoutsUsed for any delays
embassy-syncSynchronization primitives and data structures with async supportUsed for providing channels, mutexes, signals
defmtA highly efficient logging framework that targets resource-constrained devices, like microcontrollersUsed for log messages with very small binary size and debugging embedded systems
defmt rttA very highly efficient logging framework because of rttDiagnose crashes or panics with clear, compressed messages
cyw43It enables wireless communication, allowing your embedded Rust code to connect to Wi-Fi networksAdding Wi-Fi capability to your Pico W for remote control, cloud communication, or app integration
cyw43-pioIt's essential for connecting the Pico W to Wi-Fi in no_std Rust environmentsEnabling Wi-Fi on the Pico W using Rust also supports embedded Rust projects that need networking
embassy-netIt enables TCP/IP networking on microcontrollersCreating non-blocking, async network applications on microcontrollers and also pairs with cyw43-pio for Wi-Fi-enabled embedded apps on the Pico W
  1. link
  2. link
  3. link
  4. link