© 2024 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).
OPEN ACCESS
The Internet of Things (IoT) can be applied in pet care through a smart food dispenser that allows owners to monitor their pets' feeding from their smartphone. This facilitates remote control of the dispenser from anywhere and addresses issues related to customizing food portions according to the pet's individual needs. The main challenges in implementing such a dispenser include ensuring precise management of the pet's feeding. It is crucial to integrate technologies that enable continuous data monitoring. The primary electronic components of the dispenser include an ESP32 microcontroller, an ultrasonic sensor, and a load cell. The main objective is to offer owners a reliable solution for feeding their pets. The associated mobile application records the pet's food intake and provides graphical representations of the food levels in the reserve tank.
automatic pet feeder, pet feeding system, smart pet feeder, weight loss in dogs, algorithm in pet care appliances, smart pet care applications in IoT
In the diet consumed by dogs, commercial foods play a crucial role as they are the main source to satisfy their essential nutritional requirements according to the individual characteristics of each dog, such as weight, breed, gender and body condition. These foods are specifically formulated to provide the necessary energy to enable dogs to perform their daily activities [1].
Providing the improper amount of food can have serious consequences therefore administering the correct amount of food can be a challenging process, if you are uncertain about your dog's diet requirements, it is advisable to seek guidance from a specialist. For example, overfeeding can lead to obesity, which can lead to health problems such as diabetes, cardiovascular disease and joint problems [2]. On the other hand, food restriction leads to stress and aggression [3].
Automatic food dispensers emerged as a practical solution for pet owners with busy schedules or who are absent for extended periods [4]. These devices ensure constant access to food, keeping it available until the reserve tank is empty. Currently, automatic feeders on the market present a significant area of opportunity in terms of feeding customization.
The advancement of IoT technology has transformed pet care, allowing owners to obtain accurate information about their pet's feeding remotely [5]. The use of IoT-based smart feeders can help mitigate these issues by providing precise control over food portions and allowing customized adjustments based on the pet's body condition and activity level [6]. The implementation of these technologies can address many of the challenges related to proper feeding of pets, improving their overall health and well-being.
2.1 Patents
A remarkable example is the introduction of the gravity mechanism in feeders, which was a milestone in functional design. However, this initial innovation had limitations in that it did not allow for precise portion control, which negatively impacted pet health [7].
Automatic feeders and IoT incorporation
Automatic feeders have revolutionized pet care by integrating electronic components that allow for efficient control of feed quantities, solving problems associated with traditional models [8].
The physical absence of owners has driven the need for more advanced solutions, such as remote management through the Internet of Things (IoT). This technology offers real-time monitoring and control, raising standards in pet care and optimizing feeding in a personalized and accurate method [5].
2.2 Papers
Integrating IoT and remote access to home automation
The physical absence of people in the home has driven the adoption of home automation systems, such as robots that control smart devices such as lights, doors, smoke and gas detectors, irrigation systems, and automatic feeders, all accessible from a cell phone [9]. Within this context, remote access, defined as the ability to manage devices from a remote location, has become an essential part of the Internet of Things (IoT). This technology allows users to monitor and control devices in real time, transforming interaction with the environment and optimizing home comfort and security [5].
Innovations in smart feeders for pets
The increase in demand for automatic devices has led to the development of advanced tools in pet care, such as smart feeders [10]. Unlike traditional automatic feeders, which control the amount of food, smart feeders offer personalized feeding based on the individual needs of each pet [11]. Equipped with sensors to monitor the food consumed and actuators to dispense precise portions, these devices leverage cloud connectivity and remote interfaces to provide real-time control and tracking. These solutions not only prevent overfeeding, but also optimize pets' diets, improving their well-being and making owners' lives easier [12].
2.3 Pet feeding
Pets need a balanced diet, as it allows for optimal growth and helps maintain their weight within the recommended standards for their breed [13]. Feeding pets in the correct amounts can be a challenge for people. Commercial foods contain a specific amount of energy per unit of food. Specialists recommend feeding the right amount of food based on the pet's gender, breed, and weight [14].
To estimate the amount of food a pet requires, it is necessary to divide the daily energy requirement by the energy density of the food. For example, if the pet requires 900 kcal per day and its food contains an energy density of 3850 kcal/kg, the amount of food the pet requires is 0.23 kg (233.70 g) [13].
The importance of feeding control is that it ensures that the caloric and nutritional needs of pets will be administered in the correct amounts. The equation that determines the daily energy requirement of a dog must be adjusted considering several factors [13]. The equations for calculating the recommended food portion if pets are physically active are as follows:
Eq. (1) corresponds to the equation for determining the energy requirement of inactive dogs [13].
95×weight(kg)0.75 (1)
Eq. (2) corresponds to the equation for determining the energy requirement of active dogs [13].
130×weight(kg)0.75 (2)
Overfeeding in pets can cause obesity, which is defined as when a pet consumes more energy than it uses. Excess energy causes the pet to gain weight. It is important to treat obesity to maintain the pet's health [13]. For the treatment of obesity, the recommended equation for calculating the energy requirement is as follows:
Caloric deficit is a treatment for weight loss. Eq. (3) corresponds to the equation for calculating the energy requirement [13].
(95×weight(kg)0.75)×0.60 (3)
Weight loss treatment should be administered until the target weight is reached. It is possible to estimate the weight loss per week until the target weight is reached [15].
First, the pet's ideal weight should be calculated. Eq. (4) corresponds to the equation for calculating the pet's ideal weight [15].
overweight = current bodyweight - ideal bodyweight (4)
Subsequently, the weight loss per week is calculated. Eq. (5) corresponds to the weight loss per week [13].
currentbodyweight×0.02 (5)
Finally, in Eq. (6) the time to reach the ideal weight is calculated [13].
weight loss per week = current bodyweight / ideal bodyweight (6)
Conversely, when the pet is below the normal weight range, it is crucial to consult a veterinarian. This professional can identify the underlying cause and recommend an appropriate feeding and care plan [16].
Eq. (7) corresponds to the equation for calculating the energy requirement for pets gaining weight [16].
RER=(30×bodyweight(kg))+70 (7)
Eq. (8) corresponds to the equation for calculating the portion of feed needed for underweight pets [16].
|1.20(−1.80×RER)| (8)
2.4 Standard weights by breed
Table 1 below shows the different standard weights depending on the breed. In general, an ideal weight range is established for each breed, which serves as a reference for evaluating the health and nutritional status of dogs. To determine the standard weight, the size of the breed is considered. Keeping pets within their standard weight ranges is essential to prevent diseases related to being overweight [17].
2.5 Software
2.5.1 IoT platforms
IoT platforms enable the connection, management and visualization of data from IoT devices, providing various tools and services for developers [18]. A comparison between some of the most popular platforms is presented in Table 2.
Table 1. Standard weight by breed
Dog Breed |
Minimum Male Weight (kg) |
Maximum Male Weight (kg) |
Minimum Female Weight (kg) |
Maximum Female Weight (kg) |
Beagles standard |
9 |
14 |
9 |
14 |
Boxers |
29 |
36 |
25 |
29 |
Chihuahuas |
3 |
5 |
3 |
5 |
Cocker Spaniels |
11 |
14 |
9 |
11 |
Collies |
27 |
34 |
23 |
29 |
French Bulldogs |
10 |
13 |
10 |
13 |
Maltese |
2 |
3 |
2 |
3 |
Table 2. Platforms for IoT development
Features |
Blynk |
ThingSpeak |
Arduino Cloud |
Firebase |
Programming language |
C++ |
C++ |
C++ |
JavaScript, Python and C++ |
Communication protocol |
HTTP and MQTT |
HTTP and MQTT |
HTTP and MQTT |
HTTP |
Storage |
Cloud data storage, limited in the free version |
Cloud data storage, limited in the free version |
Cloud data storage, limited in the free version |
Firestore for storage and realtime database for real-time data |
Price |
Free with limitations, payment options available |
Free with limitations, payment options available |
Free with limitations, payment options available |
Free payment options available |
2.5.2 Firebase
Firebase as a simplified solution for application development
Firebase, Google's cloud storage service, is a powerful tool that simplifies application development by enabling direct interaction between client applications (web, iOS, or Android) and the database. This eliminates the need for an intermediate server, streamlining the development process. One of its key features is real-time synchronization, ensuring that any changes to the data are instantly reflected across all connected clients. This functionality enhances user experience and fosters efficient data management in dynamic applications [19].
Real-Time NoSQL Database and JSON Data Format
Firebase operates as a real-time NoSQL database, storing data in JSON (JavaScript Object Notation) format. JSON is a widely accepted standard for data exchange between servers and applications. Firebase's use of JSON allows for seamless communication and data manipulation, making it an ideal choice for applications that require real-time updates and scalability [19].
2.5.3 Android Studio
It is a development environment for Android applications. You can create a project or use a template. Android applications are written in Java and Kotlin programming language [20]. It provides a comprehensive set of tools and resources for Android application development, testing, debugging and optimization [21].
Main programming languages for Android development
Java: It is the main language for Android application development. It has extensive documentation and a large developer community.
Kotlin: It is the most recent language recommended by Google for Android application development. Kotlin is interoperable with Java and offers many modern enhancements and features that facilitate code development and maintenance.
2.6 IoT microcontrollers
Microcontrollers consist of a central processing unit (CPU), memory and input/output pins. They are fundamental to the IoT because of their ability to process data and their compatibility with different wireless communication technologies. Microcontrollers consume little power and usually operate at specific voltages (such as 3.30 V or 5 V), therefore, a voltage regulator is necessary to convert the battery voltage to the appropriate level [22].
2.7 Food measuring instruments
Accurate feed portion control is essential to ensure adequate caloric intake in dogs, as inaccurate measurements can lead to overfeeding and health problems [23]. Load cells offer an efficient solution by accurately measuring the required portions, reducing the risk of errors and promoting a balanced diet. On the other hand, ultrasonic sensors allow monitoring the feed level in the smart feeders' reservoir, calculating the distance by means of sound waves and ensuring a constant supply [24].
The methodology for designing an IoT pet feeder integrates hardware and software aspects to ensure an efficient and functional solution. This combination ensures accurate and automated control of pet feeding.
3.1 Problem definition
From a field study conducted in several homes, it was observed how people feed their pets. During this process, it was observed that the main instrument used to measure accurate amounts of food is the measuring cup.
The use of a measuring cup to control the amount of food provided to pets was evaluated. Three trials were conducted in which specific desired portions were defined and the amounts obtained in each case were recorded.
In the first test, a desired portion of 90 grams was established, but the amounts obtained were 149, 148, 138, 129 and 153 grams, resulting in a mean of 143.4 grams and a variance of 76.24.
In the second test, the desired portion was 135 grams, and the measured amounts were 177, 200, 187, 197 and 183 grams. The mean was 188.8 grams and the variance was 73.76.
In the third test, the desired portion was 180 grams, and the quantities recorded were 222, 215, 210, 235 and 250 grams. In this case, the mean was 226.4 grams, and the variance increased to 209.84.
The results obtained reflect that the use of the measuring cup does not guarantee precision in measuring the desired portions of food, since in all the tests the average amounts were significantly greater than the established portions.
3.2 Proposed system
This project will implement a device that adjusts the feeding of pets considering their physical activity, breed, gender, and physical condition, optimizing their nutrition, and customizing their diets. The device will automatically control the amount of food dispensed through a motor and sensors, recording the consumption with a load cell and an ultrasonic sensor. The data will be stored in Firebase and accessible in real time from a mobile application, facilitating monitoring and efficient management of food.
Figure 2 shows the process of information exchange between a user, the mobile application, cloud storage and the electronic components that make up the system. Subsequently, the function of each component is described.
Figure 1. Overall system
3.3 Software design
Figure 3 is a flowchart that outlines the technical functioning of a pet feeder. Here is a detailed description of its components and their interactions.
Figure 2. Flowchart of the pet feeder
1. Start:
2. Check food level:
3. Check feeding schedule:
4. Measure the amount of food:
5. Dispense food:
6. Confirm food dispensed:
7. Monitor eating:
8. Update records:
9. Send notifications:
10. End:
3.4 Nutritional management algorithm
Figure 4 represents the flow chart of the algorithm to determine the appropriate amount of food for a pet based on its characteristics, ideal weight and body condition. Each step of the process is described below.
1. The process starts, and the characteristics of the pet are obtained.
2. The ideal weight of the pet is determined.
3. The pet is checked for underweight:
4. Check if the pet is sedentary:
5. The process ends.
Figure 3. Estimate food portions
3.5 Hardware design
Figure 5 depicts the printed circuit board (PCB) of a smart pet feeder as a key part that integrates and coordinates all the functions of the device. This type of PCB is designed to support a variety of sensors and actuators, as well as manage communication with mobile applications and cloud services.
A pet feeder PCB incorporates multiple communication interfaces. These can include Wi-Fi, Bluetooth, and often physical interfaces such as UART, I2C and SPI to connect sensors and actuators.
Figure 4. Pet feeder PCB
The IoT pet feeding system was evaluated by performing 15 measurements with a 5 kg capacity load cell and an HX711 amplifier AD weight test module. The results obtained provided information about the accuracy of the system. The first test was performed on a Chihuahua breed pet with a current weight of 2.54 kg, the pet is within the range 1.93-2.72 kg indicating that the pet is at its optimal weight.
General Pet Information
Calculation of the food portion using Eq. (1) the estimation of the portion of food for inactive dogs.
130×(2.54)0.75=261.55
The pet requires 261.55 kcal daily, and its food has an energy density of 3670 kcal/kg. The amount of food the pet requires daily is 0.07 kg (71.26 g). By dividing this amount into three meals per day (morning, afternoon, and evening), the corresponding portion for each meal is 23.75 g. In addition, the pet's weight was recorded to verify that it remains stable.
Table 3 presents the results obtained from 15 measurements of the same quantity, the average of the real value was 22.80 g. To evaluate the accuracy of the smart feeder, the absolute error, relative error, and percent error of the measurements obtained were calculated.
Table 3. Measurement A
# |
Dog Weight (kg) |
Food Weight (g) |
Absolute Error |
Relative Error |
Percent Error |
1 |
2.54 |
19 |
3.80 |
0.17 |
16.67 |
2 |
2.54 |
24 |
1.20 |
0.05 |
5.26 |
3 |
2.54 |
19 |
3.80 |
0.17 |
16.67 |
4 |
2.54 |
27 |
4.20 |
0.18 |
18.42 |
5 |
2.51 |
19 |
3.80 |
0.17 |
16.67 |
6 |
2.54 |
23 |
0.20 |
0.01 |
0.88 |
7 |
2.54 |
24 |
1.20 |
0.05 |
5.26 |
8 |
2.54 |
21 |
1.80 |
0.08 |
7.89 |
9 |
2.55 |
22 |
0.80 |
0.04 |
3.51 |
10 |
2.55 |
26 |
3.20 |
0.14 |
14.04 |
11 |
2.55 |
25 |
2.20 |
0.10 |
9.65 |
12 |
2.49 |
25 |
2.20 |
0.10 |
9.65 |
13 |
2.49 |
22 |
0.80 |
0.04 |
3.51 |
14 |
2.49 |
24 |
1.20 |
0.05 |
5.26 |
15 |
2.59 |
22 |
0.80 |
0.04 |
3.51 |
To make a comparison between the two tables, we will first review the error values and how the distinct types of errors were calculated.
Average actual value |
Food weight/15 |
Absolute error |
Absolute error=∣food weight-average food weight∣ |
Relative error |
Relative error=absolute error /average food weight |
Percent error |
Percent error=relative error×100 |
Average percentage error |
Percent error/15 |
The second test was performed on a Poodle pet with a current weight of 6.39 kg, the pet is within the range 4.53-6.80 kg indicating that the pet is at its optimal weight.
General Pet Information
The portion of food for inactive dogs is calculated using Eq. (1).
130×(6.39)0.75=522.47
The pet’s daily requirement is 522.47 kcal, and its food has an energy density of 4300 kcal/kg. The amount of food the pet requires daily is 0.12 kg (121.50 g). Dividing this amount into three meals per day (morning, afternoon, and evening), the corresponding portion for each meal is 40.50 g. In addition, the pet's weight was recorded to verify that it remains stable.
Table 4 describes the results obtained from 15 measurements of the same amount, the average of the real value was 34.93 g. To evaluate the accuracy of the smart feeder, the absolute error, relative error, and percent error of the measurements obtained were calculated.
Table 4. Measurement B
# |
Dog Weight (kg) |
Food Weight (g) |
Absolute Error |
Relative Error |
Percent Error |
1 |
6.39 |
36 |
1.07 |
0.03 |
3.05 |
2 |
6.39 |
34 |
0.93 |
0.03 |
2.67 |
3 |
6.35 |
34 |
0.93 |
0.03 |
2.67 |
4 |
6.35 |
35 |
0.07 |
0.00 |
0.19 |
5 |
6.35 |
35 |
0.07 |
0.00 |
0.19 |
6 |
6.37 |
34 |
0.93 |
0.03 |
2.67 |
7 |
6.37 |
38 |
3.07 |
0.09 |
8.78 |
8 |
6.37 |
36 |
1.07 |
0.03 |
3.05 |
9 |
6.39 |
35 |
0.07 |
0.00 |
0.19 |
10 |
6.39 |
36 |
1.07 |
0.03 |
3.05 |
11 |
6.39 |
34 |
0.93 |
0.03 |
2.67 |
12 |
6.41 |
34 |
0.93 |
0.03 |
2.67 |
13 |
6.41 |
34 |
0.93 |
0.03 |
2.67 |
14 |
6.41 |
35 |
0.07 |
0.00 |
0.19 |
15 |
6.39 |
34 |
0.93 |
0.03 |
2.67 |
In conclusion, the data obtained in the field study using measuring cups showed limitations in the accuracy of the portions served, which contrasted significantly with the results of the proposed IoT feeder. This automated system demonstrated a marked improvement in ensuring more accurate portions, promoting efficient control of pet feeding. As a result, pets using the IoT feeder remain within the ideal weight range, validating its efficacy as a nutritional management tool.
For future improvements, testing under various environmental conditions, such as humidity, temperature, and dust resistance, is recommended to evaluate and strengthen the robustness and accuracy of the system in different environments. These tests will contribute to further optimizing the IoT feeder's reliability and performance in real-world conditions, ensuring its functionality in a variety of scenarios.
[1] Ramírez García, J.U., Arvizu Tovar, L.O., Soberanis Ramos, O., Sánchez Zamorano, L.M., Téllez Reyes Retana, E.R. (2019). Guía de Animales de Compañía para Dueños Responsables. Ciudad de México: Comité editorial de la FMVZ-UNAM. https://doi.org/10.22201/fmvz.9786073020183e.2019
[2] German, A. (2010). Obesity in companion animals. In Practice, 32(2): 42-50. https://doi.org/10.1136/inp.b5665
[3] Ryan, S., Bacon, H., Endenburg, N., Hazel, S., Jouppi, R., et al. (2023). Guía de bienestar animal de WSAVA para clínicos de animales de compañía y equipos veterinarios. Madrid: Edra.
[4] Kuo, Y.F. (2000). TW Patent No. 6,135,056. https://patents.google.com/patent/US6135056A/en.
[5] Abdulla, R., Selvaperumal, K., Abdlekader, A., Abbas, M. (2020). IOT based pet feeder. Test Engineering and Management, 83: 269-279. https://www.researchgate.net/publication/340261266_IOT_based_Pet_Feeder.
[6] Hussain, A., Begum, K., Armand, T.P., Mozumder, M.A., Ali, S., Kim, H.C., Joo, M.I. (2022). Long short-term memory (LSTM)-based dog activity detection using accelerometer and gyroscope. Applied Sciences, 12(19): 9427. https://doi.org/10.3390/app12199427
[7] Portelli, S. (1973). US Patent No. 3,763,826. https://patents.google.com/patent/US3763826A/en?oq=US+Patent+No.+3%2c763%2c826.
[8] Ewell, A.S. (1995). US Patent No. 5,433,171. https://patents.google.com/patent/US5433171A/en?oq=US+Patent+No.+5%2c433%2c171.
[9] Wong, R. (2007). Functional specification for the home care robot. Burnaby. https://www2.ensc.sfu.ca/~whitmore/courses/ensc305/projects/2008/5func.pdf.
[10] Own, C.M., Teng, C., Zhang, J.R., Wen, Y., Tsai, S.C. (2011). Intelligent pet monitor system with the internet of things. International Conference on Machine Learning and Cybernetics, 2: 471-476. https://doi.org/10.1109/ICMLC.2011.6016785
[11] Soriano, K., Forkenbrock, T., Scruggs, A. (2012). The smart cat feeder. Orlando: University of central Florida. https://www.ece.ucf.edu/seniordesign/su2012fa2012/g17/Final_Paper.pdf.
[12] Khandait, P., Bhagat, R., Satpute, N., Bamnote, A. (2024). An iot based automatic pet feeder system with real time control and personalized schedules. International Journal of Multidisciplinary Research in Science, Engineering and Technology, 7(3): 5024-5030. https://www.ijmrset.com/upload/80_An.pdf.
[13] Case, L.P., Daristotle, L., Hayeck, M.G., Raasch, M.F. (2012). Nutrición en caninos y felinos. Buenos Aires: InterMédica. https://intermedica.com.ar/media/mconnect_uploadfiles/c/a/case.pdf.
[14] Fascetti, A.J., Delaney, S.J., Larsen, J.A., Villaverde, C. (2012). Applied veterinary clinical nutrition. California: Wiley Blackwell. https://doi.org/10.1002/9781118785669
[15] German, A.J. (2006). The growing problem of obesity in dogs and cats. The Journal of Nutrition, 136(7): 1940S-1946S. https://doi.org/10.1093/jn/136.7.1940S
[16] Vetclan veterinarios. (2017). Retrieved July 28, 2024. https://www.vetclan.com/cuantas-caloriacuantas-calorias-necesita-perro-gato/.
[17] The American Kennel Club. (2026). Retrieved July 28, 2024. https://www.akc.org/expert-advice/nutrition/breed-weight-chart/.
[18] Slama, D., Puhlmann, F., Morrish, J., Bhatnagar, R.M. (2015). Enterprise IoT: strategies and best practices for connected products and services. O'Reilly media Inc.
[19] Google. (2024, March 20). Firebase. Retrieved July 29, 2024. https://firebase.google.com/docs/database?hl=es.
[20] Darwin, I.F. (2017). Android Cookbook: Problems and Solutions for Android Developers. O'Reilly Media, Inc.
[21] Pelatihan, T. (2016). Android developer fundamentals course: learn to develop android applications. https://google-developer-training.github.io/android-developer-fundamentals-course-concepts/en/android-developer-fundamentals-course-concepts-en.pdf.
[22] Wu, Z., Qiu, K., Zhang, J. (2020). A smart microcontroller architecture for the internet of things. Sensors, 20(7): 1821. https://doi.org/10.3390/s20071821
[23] Coe, J.B., Rankovic, A., Edwards, T.R., Parr, J.M. (2019). Dog owner's accuracy measuring different volumes of dry dog food using three different measuring devices. Veterinary Record, 185(19): 599-599. https://doi..org/10.1136/vr.105319
[24] Jayarathne, D.L.S.T., Jayasinghe, H., Herath, R. (2022). Design and implement of IoT-based pet food feeder robot. In 29th Annual Technical Conference of IET Sri Lanka August, pp. 1-6.