Pet feeder
A simple solution for feeding your pet when you are away from home.
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
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
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico W | The microcontroller | 34.50 RON |
Servo Motor | Dispenses pet food | 13.99 RON |
Load Cell + HX711 | Measures food weight in grams | 5.99 RON |
Power Supply (5V)+ battery | Powers the system | 4.69 RON |
Debug probe | Debugs the program | 62.62 RON |
15 cm 10p Male-Female Wires | Male-Female Wires | 4.45 RON |
10 cm 40p Male-Female Wires | Male-Male Wires | 5.99 RON |
Breadboard | Motherboard | 11.99 RON |
Software
Library | Description | Usage |
---|---|---|
pwm | Pulse-Width modulation | Traits for the RP2040 microcontroller used for controlling the servo motor |
embassy-rp | Access to the pheripherals | Initializing and interacting with peripherals |
embassy-executor | An async executor designed for embedded usage | Used for asynchronous programming |
embassy-time | Timekeeping, delays and timeouts | Used for any delays |
embassy-sync | Synchronization primitives and data structures with async support | Used for providing channels, mutexes, signals |
defmt | A highly efficient logging framework that targets resource-constrained devices, like microcontrollers | Used for log messages with very small binary size and debugging embedded systems |
defmt rtt | A very highly efficient logging framework because of rtt | Diagnose crashes or panics with clear, compressed messages |
cyw43 | It enables wireless communication, allowing your embedded Rust code to connect to Wi-Fi networks | Adding Wi-Fi capability to your Pico W for remote control, cloud communication, or app integration |
cyw43-pio | It's essential for connecting the Pico W to Wi-Fi in no_std Rust environments | Enabling Wi-Fi on the Pico W using Rust also supports embedded Rust projects that need networking |
embassy-net | It enables TCP/IP networking on microcontrollers | Creating non-blocking, async network applications on microcontrollers and also pairs with cyw43-pio for Wi-Fi-enabled embedded apps on the Pico W |