PurrGlow Feeder is a smart, automatic cat feeder that dispenses food at four fixed times per day. Additionally, an extra portion can be triggered manually when the owner holds their hand near the proximity sensor for at least two seconds. The system uses a servo motor to rotate a food container and release food into the bowl. The main goal of the project is to automate and optimize the cat feeding process, reducing waste and ensuring the pet eats at regular intervals. The idea came from a personal need to reliably feed a cat even when not at home, while also making the experience more interactive. A colorful LED cube acts as a night light and plays dynamic light patterns whenever food is served. One of the lighting modes can be customized using a potentiometer, giving the owner some control over the ambience. A button is also used to change the light modes, implemented using an external interrupt. This project is useful for pet owners who want an efficient and engaging way to care for their animals, and for us, it’s a fun and educational way to apply embedded systems concepts to a real-world scenario.
Hardware Modules:
Software Modules:
Interaction Flow:
All logic is handled by the Arduino in real time using digital, analog, PWM, and interrupt-based inputs.
List of Components:
Connection Overview:
Overview on hardware:
The hardware design of the PurrGlow Feeder includes several modules integrated around an Arduino Uno board, enabling both scheduled and on-demand food dispensing with visual feedback.
Arduino Uno
Acts as the main controller. It keeps time, handles feeding logic, controls the servo, reads sensor and input data, and manages LED animations. All components are powered from the Arduino’s 5V supply line.
Servo Motor (SG90)
Controlled via PWM on digital pin D5, the servo rotates to release food. It activates automatically at four fixed times per day.
Proximity Sensor (HC-SR04)
Connected to pins D3 (TRIG) and D4 (ECHO), this sensor is used by the owner to manually trigger extra feeding. If it detects presence continuously for 2 seconds, a food portion is released. The module runs at 5V and uses about 15 mA.
LED Cube (5× WS2812B matrices)
All matrices are daisy-chained and driven from pin D7 using FastLED. They display predefined lighting animations during feeding. Brightness is limited in software to reduce power usage (total draw ≈ 200 mA).
Push Button (mode switch)
Connected to pin D2 via an external interrupt, this button lets the user switch between different LED animation modes at any time.
Potentiometer
Wired to analog pin A0, the potentiometer allows the user to adjust either the LED animation speed or the color in specific modes.
The system is designed for simplicity and low power consumption, drawing under 500 mA total. Feeding can happen automatically or on request, and all interactions are confirmed visually via the LED cube.
Each hardware component is mapped to specific pins on the Arduino Uno, chosen based on electrical compatibility, timing requirements, or interrupt support.
D2 – Push Button (INT0)
This pin is used because it supports external interrupts (INT0 / PCINT18). It allows the system to detect button presses asynchronously and switch LED animation modes instantly.
D3 – HC-SR04 TRIG
Configured as a digital output to send ultrasonic pulses. It was chosen as a general-purpose pin close to D4, forming a logical pair for the proximity sensor.
D4 – HC-SR04 ECHO
Configured as a digital input to receive the echo signal. It is read using `pulseIn()` to measure distance accurately.
D5 – Servo Motor PWM
This pin supports hardware PWM and is connected to the SG90 servo. It allows precise pulse-width modulation for angle control during feeding.
D7 – LED Cube Data In
Used as the data pin for the WS2812B LED matrices. Chosen for its ability to handle tight 800 kHz timing required by FastLED, and because it's not shared with any serial or I²C functions.
A0 – Potentiometer
This analog input reads voltage from the potentiometer to control either LED speed or color. A0 is conventionally used for analog input and provides stable readings.
All components share a common GND, and are powered from the Arduino’s 5V rail. Pin assignments were selected to minimize conflict with internal timers and preserve clean signal timing for both the servo and WS2812 LEDs.
Software Status
The firmware is complete and tested on Arduino Uno. It handles:
All features were validated using serial monitoring, visual LED feedback, and servo actuation tests.
Libraries Used and Purpose
Library Name | Purpose |
---|---|
FastLED.h | Controls WS2812 RGB LED matrices with fast and flexible animations |
Servo.h | Controls the food-dispensing servo via PWM (pin D5) |
TimeLib.h | Simulates a clock to check scheduled feeding times |
Adafruit_NeoPixel.h | Used initially for LED testing; replaced later by FastLED |
Key Innovation
This project adds novelty through:
Use of Lab Functionality
We reused and extended concepts from the labs:
Project Architecture
Sensor Calibration
Sources and Implemented Functions
Function / Module | Description |
---|---|
snake() | Snake effect moving across the LED matrix |
vortex() | Circular animation effect across all matrices |
fade_color() | Smooth color transition based on potentiometer position |
random_star() | Randomly lights up LEDs like a starry sky |
convert_speed() | Converts potentiometer analog value to animation speed |
poweroff() | Turns off all LEDs |
readDistanceCM() | Measures distance with ultrasonic sensor |
rotateServo() | Controls the servo motor to dispense food via PWM (D5) |
checkManualFeeding() | Detects hand presence for 2s and triggers extra feeding |
checkScheduledFeeding() | Dispenses food based on simulated time and schedule |
Demo Video Video link: https://youtube.com/shorts/k56aoU-vjDw?feature=share
The video shows:
Source code: https://github.com/AndraBel/PurrGlow-Feeder/tree/main
Working on the PurrGlow Feeder project has been a very interesting and rewarding experience. I spent a lot of time and effort especially on assembling the LED cube, combining five separate matrices into a clean, functional structure was far more difficult than expected. The feeder system itself also posed its own challenges, particularly in calibrating the servo movement and integrating it with the sensor logic. Even though it took a good amount of trial and error, I'm proud that both the animation system and the food dispensing logic now work. The whole project came together nicely, and seeing it function in real life made all the effort worthwhile.