An intelligent, IoT-enabled pet feeder system based on the ESP32-S3 microcontroller. This embedded solution combines automatic food dispensing, cloud-based image storage, real-time monitoring, and an onboard user interface.
SMARTFEEDER is an automated pet management system designed for university coursework. It leverages a combination of embedded hardware and software integrations to achieve the following:
- Dispense measured amounts of food via a servo-driven mechanism
- Capture and upload feeding images to Google Drive
- Remotely update feeding schedules and commands via Firebase Realtime Database
- Display current system status and diagnostics on an OLED screen
- Offer a responsive web UI, hosted directly on the ESP32 for local control
- Utilize distance sensing and weight measurement for pet interaction detection and food quantification
SMARTFEEDER-FOR-PETS-COU/
├── hardware_code/
│ ├── diagrams/ # Logical diagrams (basic & detailed)
│ └── src/
│ ├── docs/
| | └── readme.md # Firmware-specific description
| |
│ ├── app_httpd.cpp # ESP32 web server implementation
│ ├── Base64.cpp/.h # Base64 encoding/decoding
│ ├── camera_* # Camera configs, routing, pins
│ ├── ci.json # Continuous integration (if used)
│ ├── display_oled.h # OLED display rendering logic
│ ├── firebase_setup.h # Firebase DB setup and auth
│ ├── google_drive_upload.h # Image upload to Google Drive
│ ├── image_processing.h # Optional image filters or processing
│ ├── includes.h # Centralized header for shared includes
│ ├── main.ino # Main firmware logic
│ ├── partitions.csv # ESP32 partition scheme
│ ├── servo_scale_sonic.h # Servo + ultrasonic + weight handling
│ ├── utils.h # Helper functions
│ └── wifi_setup.h # Network credentials and connection
│
│
├── schematic/
│ ├── schematic.png # Hardware connection diagram
│ └── readme.md # Schematic description
│
├── web_interface/
│ ├── images/ # UI images/icons
│ ├── index.html # Frontend interface
│ ├── app.js # UI logic and requests to ESP32
| ├── styles.css # Styles for frontend interface
│ └── readme.md # Web interface description
│
└── README.md # This documentation
| Module | Description |
|---|---|
| 📷 Camera Capture | Live photo taken by ESP32-S3’s camera module |
| ☁️ Cloud Sync | Image upload to Google Drive with user API token |
| 🔥 Firebase Integration | Real-time feeding control, system status, and activity sync |
| 📟 OLED Interface | Displays Wi-Fi state, feeding confirmation, drive upload status |
| ⚙️ Servo Mechanism | Controls food dispensing quantity |
| ⚖️ Sensor System | Load cell and ultrasonic distance sensor detect pet presence and food load |
| 🧠 Autonomous Logic | No host PC needed — all processing handled by ESP32 |
| 🌐 Local Web UI | Lightweight HTML/JS UI served from flash for manual override |
-
Hardware:
- ESP32-S3 module (with camera support)
- SG90 Servo Motor
- HX711 Load Cell Amplifier + ~10kg Load Sensor
- HC-SR04 Ultrasonic Sensor
- 128x64 OLED (SSD1306)
- USB-C power or battery supply
-
Software:
- Arduino IDE or PlatformIO
- Board Package:
esp32by Espressif - Required Libraries:
Firebase ESP ClientESPAsyncWebServerAdafruit SSD1306ArduinoJson,Adafruit GFX,AsyncTCP, Load cell amplifier (HX711), Ultrasonic sensor (HC-SR04), Servo motor and others if specified indocs/
- Configure:
- WiFi: Edit
wifi_setup.h - Firebase: Set
API_KEY,DATABASE_URL, andUSER_EMAILinfirebase_setup.h - Google Drive: Paste OAuth2 credentials in
google_drive_upload.h
- WiFi: Edit
- Build and flash
main.inoto ESP32-S3 via USB - Monitor the Serial console for device IP or errors
- Access local IP via browser to use web interface
- On first boot, verify serial output for correct WiFi connection
- Use
Firebase Consoleto check log entries or feeding updates - Test ultrasonic response and load cell feedback via OLED or Serial
- Attempt image capture and confirm upload in linked Drive folder
- Feed Your Pet 😸
[Dan Krod]
Academic Year: 2025
All content in this repository is intended for educational and archival purposes.
Any reuse, adaptation, or distribution of code or documentation from this project requires explicit permission from the author.
Please contact the maintainer if you wish to copy, reference, or build upon the materials.
© 2025 Daniel. All rights reserved.