Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐶 FEEDMATE – Smart IoT Pet Feeder

    FEEDMATE is an IoT-based Smart Pet Feeding System developed using ESP32 and Firebase.
    It allows pet owners to schedule meals, manually feed pets remotely, and monitor food levels in real time through a web application.

🚀 Features 🔐 Authentication

    Secure Login using Firebase Authentication

    Session-based authentication

    Logout functionality

🍖 Manual Feeding

    Feed your pet instantly from the web interface

    Select portion size:

    Small

    Medium

    Large

    Real-time trigger sent to ESP32 via Firebase

    Automatic reset after feeding

⏰ Feeding Schedule

    Set feeding date and time

    Select portion size

    Data stored in Firebase Realtime Database

📜 Feeding History

    Displays recent feeding events

    Shows:

    Timestamp

    Portion size

    Stores history in Firebase

    📊 Food Level Monitoring

    Visual progress bar (0–100%)

    Automatically reduces when feeding occurs

    Simulates remaining food in container

🕒 Real-Time Clock & Date

    Displays current time

    Displays today's date

🛠️ Tech Stack Frontend

    HTML5

    Tailwind CSS


    Vanilla JavaScript (ES Modules)

Backend / Cloud

    Firebase Authentication

    Firebase Realtime Database

    Firebase Hosting

Hardware

    ESP32 Microcontroller

    Servo Motor (for dispensing food)

    Ultrasonic Sensor (food level detection)

    Buzzer

    LCD Display

    DHT22 Sensor

🏗️ System Architecture User (Web App) ↓ Firebase Authentication ↓ Firebase Realtime Database ↓ ESP32 ↓ Servo Motor (Dispense Food)

The web app updates Firebase. ESP32 listens to database changes. When feednow = true, ESP32 rotates the servo motor. After feeding, ESP32 resets the value.

📂 Project Structure FEEDMATE/ │ ├── index.html # Main frontend ├── script.js # Firebase + Feeding logic ├── README.md

🔥 Firebase Database Structure feeding/ feednow: true/false portionSize: "Small" | "Medium" | "Large"

    feedingHistory/
        autoGeneratedKey/
            time: "timestamp"
            portionSize: "Medium"
    
    shedule/
        sheduleTime/
            autoGeneratedKey/
                date: "YYYY-MM-DD"
                time: "HH:MM"
                portionSize: "Small"

⚙️ How It Works Manual Feed Process

    User clicks Feed Now
    
    App writes to Firebase:
    
    {
      "feednow": true,
      "portionSize": "Medium"
    }
    
    
    ESP32 detects change
    
    Servo rotates to dispense food
    
    After 5 seconds:
    
    feednow resets to false
    
    UI updates
    
    Food level reduces
    
    Feeding history updated

🖥️ How to Run Locally

    Clone the repository:
    
    git clone https://github.com/manuth07/FEEDMATE.git
    
    
    Open index.html in browser
    OR
    Host using Firebase Hosting.
    
    Make sure Firebase configuration matches your project.

🔐 Security Notice

    ⚠️ The Firebase API keys in this project are public in the frontend.
    For production-level deployment:
    
    Use Firebase security rules
    
    Restrict database read/write permissions
    
    Use environment variables

📈 Future Improvements

    Mobile Application (Flutter / React Native)
    
    Push notifications
    
    AI-based pet detection
    
    Food analytics dashboard
    
    Low food automatic refill alerts
    
    Role-based authentication

🎓 Academic Context

    This project was developed as a Year 1 Semester 1 IoT project to demonstrate:
    
    Cloud-connected embedded systems
    
    Real-time database communication
    
    Web-to-hardware interaction
    
    IoT automation concepts

👨‍💻 Author

Manuth Wilegoda

Computer Science Undergraduate

About

This is a simple web application made by using html, css and javascript

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages