A smart, automated pet feeding system built with ESP32, featuring remote control through Blynk IoT platform and Telegram bot integration.
- Remote Control: Control feeding through Blynk mobile app
- Voice Commands: Telegram bot integration for voice/text commands
- Weight Monitoring: Real-time weight sensing of pet bowl and food container
- Scheduled Feeding: Set automatic feeding times
- Manual Feeding: Instant feeding with customizable portions
- Data Analytics:
- Weight history charts
- Feeding history tracking
- Daily feeding statistics
- Smart Alerts: Low food warnings and system status updates
- Calibration: Easy weight sensor calibration system
- ESP32 Development Board
- HX711 Weight Sensor Module (connected to pet bowl)
- Servo Motor (FS5115M or similar for food dispensing mechanism)
- LED Indicator
- Food Container with dispensing mechanism
- Pet Bowl
ESP32 | Component
---------|-------------
Pin 5 | Servo Motor (Signal)
Pin 4 | HX711 (DOUT)
Pin 7 | HX711 (SCK)
Pin 2 | LED Indicator
VCC | VCC load cell 3.3V and VCC servo 5V
GND | Ground
WiFi.h
- ESP32 WiFi connectivityWiFiClientSecure.h
- Secure connection for TelegramBlynkSimpleEsp32.h
- Blynk IoT platform integrationESP32Servo.h
- Servo motor controlHX711.h
- Weight sensor communicationTimeLib.h
- Time managementWidgetRTC.h
- Blynk real-time clockUniversalTelegramBot.h
- Telegram bot integration
- Connect the HX711 weight sensor under the pet bowl
- Install the servo motor in the food dispensing mechanism
- Connect all components according to the pin diagram above
- Ensure stable power supply for ESP32
In Arduino IDE, install all the libraries listed above through Library Manager.
Create a config.h
file and add your credentials:
// WiFi Credentials
#define WIFI_SSID "your_wifi_name"
#define WIFI_PASSWORD "your_wifi_password"
// Blynk Configuration
#define BLYNK_TEMPLATE_ID "your_template_id"
#define BLYNK_TEMPLATE_NAME "your_template_name"
#define BLYNK_AUTH_TOKEN "your_auth_token"
// Telegram Bot Configuration
#define BOT_TOKEN "your_bot_token"
#define CHAT_ID "your_chat_id"
- Download Blynk IoT app
- Create a new project
- Add the following virtual pins:
- V1: Button (Manual Feed)
- V2: Display (Current Weight)
- V3: Slider (Feed Amount, 10-100g)
- V4: Terminal (Status Messages)
- V5: Button (Calibration)
- V6: Menu (Scheduled Feeding Time)
- V7: Gauge (Food Remaining %)
- V9: Chart (Weight History)
- V10: Chart (Feed History)
- V11: Chart (Daily Feed Total)
- V12: Button (Clear History)
- V13: Button (Reset Container)
- Message @BotFather on Telegram
- Create a new bot with
/newbot
- Get your bot token
- Send a message to your bot to get your chat ID
- Connect ESP32 to computer
- Select correct board and port in Arduino IDE
- Upload the code
- Open Serial Monitor to check connection status
- Test basic functions through Blynk app
- Calibration: Press calibration button in Blynk app when bowl is empty
- Manual Feeding:
- Set desired amount (10-100g) using slider
- Press "Feed Now" button
- Scheduled Feeding:
- Select time from dropdown menu
- System will automatically feed at set time
- Telegram Commands:
- Send "feed" to trigger feeding
- Send "open" to open feeding gate
- Send "close" to close feeding gate
- Weight Display: Real-time weight of pet bowl
- Food Remaining: Shows percentage of food left in container
- Charts: Track feeding patterns and weight changes over time
- Status Messages: Real-time system updates and alerts
-
WiFi Connection Failed
- Check SSID and password
- Ensure ESP32 is in range of router
-
Blynk Connection Issues
- Verify auth token is correct
- Check internet connection
- Ensure virtual pins match app configuration
-
Weight Sensor Inaccurate
- Recalibrate using calibration button
- Check sensor connections
- Ensure stable mounting
-
Servo Not Moving
- Check power supply (servo may need 5V)
- Verify pin connections
- Test servo separately
-
Telegram Bot Not Responding
- Verify bot token and chat ID
- Check internet connection
- Ensure bot is properly configured
- Ensure all electrical connections are secure
- Use appropriate power supply for your servo motor
- Test feeding mechanism thoroughly before leaving pet unattended
- Set reasonable feeding amounts to prevent overfeeding
- Regularly clean and maintain the feeding mechanism
Feel free to submit issues, feature requests, or pull requests to improve this project.
This project is open source and available under the MIT License.
If you encounter any issues or have questions, please create an issue in this repository.