م ِحي ْحمن الر َّ ِم اللِه الر َّ سْ ب ِ An-Najah National University Faculty of Engineering & Information Technology Computer Engineering Department Graduation project 2 CatCare Students: Ayah Shraim & Tasbeeh Takrori Supervisor: Dr. Raed Al-Qadi A report submitted in partial fulfillment of the requirements for the degree of Bachelor of Computer Engineering 2023/2024 Acknowledgment: We extend our sincere gratitude to Dr. Raed Al-Qadi for his invaluable time, effort, and guidance, alongside heartfelt appreciation to our families, friends, and all contributors who made this project possible. Disclaimer Statement This report was written by student(s) at the Computer Engineering Department, Faculty of Engineering, An-Najah National University. It has not been altered or corrected, other than editorial corrections, as a result of assessment and it may contain language as well as content errors. The views expressed in it together with any outcomes and recommendations are solely those of the student(s). An-Najah National University accepts no responsibility or liability for the consequences of this report being used for a purpose other than the purpose for which it was commissioned. Table of Contents Abstract ............................................................................................................................................... 1 Chapter 1: Introduction ....................................................................................................................... 2 1.1 Statement of the problem ......................................................................................................... 2 1.2 Objectives of the work .............................................................................................................. 2 1.3 Scope of the work...................................................................................................................... 2 1.4 Importance of the work ............................................................................................................ 3 1.5 Organization of the report ......................................................................................................... 3 Chapter 2: Constraints, Standards/Codes & Earlier course work ........................................................ 4 2.1 Constraints and limitations.................................................................................................. 4 2.2 Standards and Codes ........................................................................................................... 4 2.3 Earlier Coursework .............................................................................................................. 5 Chapter 3: Literature Review ............................................................................................................... 6 Chapter 4: Methodology ................................................................................................................... 10 4.1 Hardware Components ..................................................................................................... 10 4.1.1 Feeding Device Components ............................................................................................ 10 4.1.2 Litter box Device Components ......................................................................................... 18 4.2 Design and Hardware Implementation ............................................................................. 24 4.2.1 Feeding Device Implementation ...................................................................................... 24 4.2.2 Litter box Device Implementation .................................................................................... 30 4.3 Mobile Application ............................................................................................................ 34 4.3.1 Feeding Device Mobile Application .................................................................................. 34 4.3.2 Litter Box Mobile Application ........................................................................................... 35 Chapter 5: Results and Discussion ..................................................................................................... 37 Chapter 6: Conclusion and Recommendation ................................................................................... 38 6.1 Summary ............................................................................................................................. 38 6.2 Recommendations ............................................................................................................... 38 6.3 What we have learned ........................................................................................................ 39 6.4 Future works ........................................................................................................................ 39 References ......................................................................................................................................... 40 List of Figures Figure 1 Traditional Cat litter box ........................................................................................................ 6 Figure 2 Automatic cat litter box ......................................................................................................... 7 Figure 3 Auto cat toilet project ........................................................................................................... 7 Figure 4 Arduino pet feeder ................................................................................................................ 8 Figure 5 self service cat feeder ............................................................................................................ 8 Figure 6 Arduino Mega 2560 ............................................................................................................. 11 Figure 7 ESP8266EX ........................................................................................................................... 11 Figure 8 Computer power supply ...................................................................................................... 12 Figure 9 Ultrasonic sensors ............................................................................................................... 12 Figure 10 A4988 Driver ...................................................................................................................... 13 Figure 11 stepper motor ................................................................................................................... 13 Figure 12 5kg load cell ....................................................................................................................... 14 Figure 13 HX711 Load Cell Amplifier ................................................................................................. 14 Figure 14 LCD 20*4 and I2C ............................................................................................................... 14 Figure 15 Keypad ............................................................................................................................... 15 Figure 16 Real time clock (RTC) ......................................................................................................... 15 Figure 17 12V DC Pump ..................................................................................................................... 16 Figure 18 Relay .................................................................................................................................. 16 Figure 19 Valve .................................................................................................................................. 17 Figure 20 Valve accessories ............................................................................................................... 17 Figure 21 water tubes........................................................................................................................ 17 Figure 22 Wires ................................................................................................................................. 18 Figure 23 RFID Radio-frequency identification .................................................................................. 19 Figure 24 LED ..................................................................................................................................... 19 Figure 25 push button ....................................................................................................................... 20 Figure 26 switch button ..................................................................................................................... 20 Figure 27 Infrared sensor (IR sensor) ............................................................................................... 21 Figure 28 stepper motor nema 23 .................................................................................................... 21 Figure 29 YS-DIV268N driver ............................................................................................................. 22 Figure 30 limit switches ..................................................................................................................... 22 Figure 31 wheels ............................................................................................................................... 23 Figure 32 3D printed gears ................................................................................................................ 23 Figure 33 Feeding device internal implementation .......................................................................... 24 Figure 34 Feeding device final Implementation ................................................................................ 24 Figure 35 Feeding device I/O unit ..................................................................................................... 25 Figure 36 Feeding device menu selection ......................................................................................... 25 Figure 37 food schedule setting sample ............................................................................................ 25 Figure 38 food meals schedules ........................................................................................................ 25 Figure 39 Food unit internally ........................................................................................................... 26 Figure 40 food dispensing mechanism .............................................................................................. 26 Figure 41 no enough food msg .......................................................................................................... 26 Figure 42 start putting food msg ....................................................................................................... 27 Figure 43 load cell for food dish weight ............................................................................................ 27 Figure 44 dish already have food msg ............................................................................................... 27 Figure 45 water schedule settings ..................................................................................................... 28 Figure 46 water unit internally .......................................................................................................... 28 Figure 47 water dispensing mechanism ............................................................................................ 28 Figure 48 water reservoir ultrasonic ................................................................................................. 29 Figure 49 no enough water msg ........................................................................................................ 29 Figure 50 water dish with ultrasonic above it ................................................................................... 30 Figure 51 Litter box final Implementation ......................................................................................... 31 Figure 52 Litter box from inside ........................................................................................................ 31 Figure 53 sand storage compartment ............................................................................................... 31 Figure 54 Litter box from back........................................................................................................... 32 Figure 55 3D printing gears for the litte box...................................................................................... 32 Figure 56 RFID with push button to turn on litter box ...................................................................... 32 Figure 57 Switch button to control auto mode for the litter box ...................................................... 33 Figure 58 entrance IR sensor ............................................................................................................. 33 Figure 59 IR sensors to detect the cat's presence inside the device ................................................. 33 Figure 60 Feeding app Interface ........................................................................................................ 35 Figure 61 Litter box app Interface ..................................................................................................... 36 1 Abstract CatCare is an innovative solution designed to enhance the well-being of cats, addressing the challenges faced by pet owners, particularly regarding their cats' nutrition and hygiene, especially during periods of absence. Cats, cherished for their endearing qualities, often require meticulous care, particularly concerning their dietary and sanitary needs. catCare simplifies these tasks through its smart device. The "catCare Device" empowers users to regulate their cat's feeding with number of meals and real time schedules. It provides real-time alerts for food plate status and allows manual food dispensing. The device also incorporates water sensors to ensure continuous hydration. Furthermore, it facilitates litter box management, including automated cleaning, with status alerts and ability to schedule and inform the daily usage count. In our project, we will focus on the design of the litter box that will be automatically cleaned. We did some research and learned that there are several types of automated litter boxes. We will design a microcontroller box that is cost-effective and feasible. Through the Mobile App and our hardware, real time schedule will be used for feeding and cleaning in addition to manual control. catCare's objective is to alleviate the concerns of cat owners by ensuring their pets are well- fed, hydrated, and provided with a clean litter box. This device enhances feline well-being, even in the owner's absence, making it an invaluable addition for cat lovers. 2 Chapter 1: Introduction 1.1 Statement of the problem Cat owners frequently encounter challenges regarding the management of their pets' feeding schedules, water availability, and litter box cleanliness, particularly during periods of absence or varying daily routines. Manual cleaning methods often do not meet the required efficiency for maintaining a hygienic environment. Therefore, there is a pressing need for convenient and effective solutions that offer flexible control over these essential aspects of cat care, ensuring the well-being of feline companions even in the absence of their owners. 1.2 Objectives of the work The objective of this project is to design and implement catCare, a comprehensive solution addressing the challenges encountered by cat owners in managing their pets' feeding schedules, water availability, and litter box cleanliness. catCare aims to enable users to control these aspects with real-time support. By incorporating features such as remote control via mobile devices and ability to reset and save schedule operations settings and auto clean of the litter box after cat using it. 1.3 Scope of the work Our project involves a comprehensive scope that spans various stages to deliver an integrated pet care system. Beginning with meticulous research and design, we identified essential features for the feeding device and smart litter box, strategically selecting components like sensors, motors, and controllers. The project is structured into distinct units, including Input/Output, Feeding, Watering, and Litter Box units, each undergoing thorough individual testing before integration. This approach ensures a systematic and reliable development process, allowing for focused troubleshooting and optimization. The final phase involves the implementation of a mobile application for remote management, contributing to an all- encompassing pet care solution. Extensive testing and algorithm development guarantee the 3 seamless operation of the integrated system, addressing diverse scenarios for optimal performance. 1.4 Importance of the work This project is important because it addresses common challenges faced by cat owners in managing their pets' care, including feeding, water availability, and litter box cleanliness. By developing catCare, we aim to provide a convenient and efficient solution that enhances the well-being of cats and offers peace of mind to their owners, even when they are away. catCare's integration of smart technology and mobile accessibility represents a significant advancement in pet care, making it easier for owners to maintain a healthy environment for their beloved feline companions. 1.5 Organization of the report The report is structured into multiple segments. Chapter 1 introduces the project and its goals. Chapter 2 delineates the extent and limitations of the undertaking. Following that, Chapter 3 highlights the approach and steps undertaken to finalize the project. In Chapter 4, outcomes and discoveries are showcased, encompassing any difficulties confronted and their subsequent solutions. Chapter 5 delves into the importance and potential influence of the project. Ultimately, Chapter 6 offers concluding remarks that encapsulate the essential elements of the report and offer suggestions for future endeavors 4 Chapter 2: Constraints, Standards/Codes & Earlier course work 2.1 Constraints and limitations Design: Creating a self-cleaning litter box that rotates automatically required accommodating the size of the cat and adding a space for litter storage. This required the printing of gears to assist in carrying and moving the device, contributing to higher costs. Cost Challenges: The of the design litter box and the need for specialized components led to increased costs associated with manufacturing and assembly. Integration Difficulty: Connecting the self-cleaning litter box with the cat feeder posed challenges due to design differences. Reusing some components between the two devices became necessary due to difficulties in direct integration. Time limitations: Due to the constraints of the academic semester and the difficulty of moving between cities, we faced limitations on the times available for working on the graduation project. 2.2 Standards and Codes The system's software elements are built upon an Arduino IDE 2.2.1 written in C++, incorporating a range of libraries and functions, including Wire.h, LiquidCrystal_I2C.h, AccelStepper.h, RTClib.h, Keypad.h,HX711.h, ESP8266WiFi.h, BlynkSimpleEsp8266.h, SoftwareSerial.h and AccelStepper.h, The user application was developed using the Blynk platform. 5 2.3 Earlier Coursework Drawing from earlier coursework significantly contributed to the successful development of our cat project. The Microcontroller Using PIC Controller course played a pivotal role in enhancing our proficiency in microcontroller programming, a skillset essential for the implementation of our Arduino Mega-based endeavor. Through this course, we gained valuable insights into the intricacies of programming microcontrollers, enabling us to effectively utilize the capabilities of the Arduino Mega board in our project. Furthermore, foundational courses in electronics, circuit design, and microprocessor provided us with a solid understanding of electronic components, circuit analysis, and control algorithms. This knowledge help in designing and implementing control mechanisms for our cat care system. By leveraging theoretical concepts from our coursework, we were able to navigate practical engineering challenges encountered during the project's development 6 Chapter 3: Literature Review Our project seeks to improve pet care through automated feeding and litter box management systems. In conducting a comprehensive literature review, we explored various studies and projects related to automated pet care, and innovative pet care device designs. The traditional method of cleaning cat wastes involves manually scooping and disposing of litter from a conventional litter box. This routine, performed by pet owners, can be time- consuming, unhygienic, and may require frequent attention to maintain a clean and odor-free environment for the cat. The emergence of automated litter box solutions seeks to address these challenges by introducing innovative mechanisms for waste management in a more efficient and convenient manner. “AUTOMATIC CAT LITTERBOX(ACLB)” This project focused on designing and fabricating an automated cat litter box. The chosen design incorporated a circular motion for a 270° scoop, activated by Google voice assistant, enhancing the waste disposal process. Material selections included corrugated board for the litter box and stainless steel for the scoop. The fabrication process involved electrical and mechanical assembly, base cutting, PVC pipe attachment for reinforcement, and finalizing the scoop and waste compartment. The project aimed for solar energy but utilized a battery due to knowledge gaps. (SHUKOR, MARZUKI, & RAIHAN, 2022) Figure 1 Traditional Cat litter box 7 “Auto Cat Toilet” Auto Cat Toilet project aimed to enhance the quality of life for cats and provide owners with a convenient way to manage their pets' litter. The project involved the development of an automated cat toilet with a bowl containing cat litter and a scoop to catch droppings during the cleaning process. The system incorporated a weight sensor to detect the presence of a cat and initiate the cleaning process accordingly. An Android application was implemented to control the motor, display weight data on a chart, and visualize the waste level in a gauge. The project successfully demonstrated effective communication between components, ensuring the automated cleaning process when a cat is detected. The system's functionalities were documented through a mobile app using a database. (Silim, Lu, Brown, & Zhang, 2022) Figure 2 Automatic cat litter box Figure 3 Auto cat toilet project 8 “ARDUINO PET FEEDER: AMAZING PROJECTS FOR CATS & DOGS” The Arduino Pet Feeder project involves creating an automated pet feeding system using an Arduino Uno microcontroller and various components. The feeder operates by allowing users to set specific feeding times and portion sizes. Once the set time is reached, the servo motor is activated, releasing a portion of food into the pet bowl. (All3DP, 2024) “self-service cat feeder” This self-service cat feeder, ingeniously crafted from a chip can and a plastic container, involves an Arduino Nano R3 and a servo-driven dispenser. The system incorporates a limit switch with a built-in LED as a cat-operated button. The feline quickly learns to press the button with its nose, activating the dispenser for a portion of dry food. A potentiometer allows users to adjust the feed amount per press, and an electronic key prevents servo damage if the feed gets stuck. (projecthub.arduino, 2024) Figure 4 Arduino pet feeder Figure 5 self service cat feeder 9 Our groundbreaking pet care project revolutionizes automated pet care, distinguishing itself through advanced features such as real-time weight sensing, mobile app customization, and seamless integration of feeding and litter box management. Unlike traditional methods and individual projects, our system provides a comprehensive, user-centric solution, setting a new standard for efficiency, convenience, and pet well-being. Our integrated pet care system encompasses a sophisticated feeding device and an intelligent litter box. The feeding device, featuring dual reservoirs for food and water, employs precise mechanisms for portion control, ensuring a seamless and controlled pet care routine. The smart litter box utilizes innovative technologies such as RFID recognition, automatic sensing, and scheduled cleaning, prioritizing the cat's well-being. Both devices are seamlessly managed through a user-friendly mobile application, offering real-time updates and remote control for an elevated pet care experience. 10 Chapter 4: Methodology In this chapter, we delve into the hardware components integral to constructing the system, detailing their connections and the overarching system design. Additionally, we explore the system's functionality, elucidating how the software and mobile app integrate to facilitate seamless operation and user interaction. 4.1 Hardware Components 4.1.1 Feeding Device Components • Arduino Mega 2560 The Arduino Mega serves as the cornerstone of our food project, functioning as the primary control unit. It acts as the central hub through which all other components related to the feeding device are connected and coordinated. The Arduino Mega boasts an extensive array of digital and analog pins, facilitating the integration of various sensors, actuators, and communication modules required for the system's operation. Its versatility and robustness make it well-suited for managing complex tasks and interfacing with external peripherals. Additionally, the Arduino Mega's open-source nature and vast online community support offer ample resources for development and troubleshooting, making it an ideal choice for our project's control unit. 11 • ESP8266EX We integrated the ESP8266EX microcontroller into our project to establish a communication channel between, ESP and Arduino Mega. This microcontroller enables seamless connectivity and data exchange between devices. Moreover, we developed a mobile application using the Blynk platform, facilitating administrative access to the machine. The ESP8266EX boasts a single-core 32-bit LX106 microprocessor with a clock frequency of up to 160 MHz. It features 80 KB of SRAM and 1 MB of flash memory, providing ample resources for program execution and data storage. With support for 802.11 b/g/n Wi-Fi connectivity, it enables high-speed data transmission with speeds up to 72.2 Mbps. Additionally, the microcontroller supports Classic Bluetooth v2.1 and BLE specifications, expanding its compatibility with various devices. • Computer power supply Figure 6 Arduino Mega 2560 Figure 7 ESP8266EX 12 We utilized a computer power supply in our project to provide stable and reliable power to various components and modules. We used it due to its robustness and ability to deliver sufficient power across multiple voltage rails. • Ultrasonic sensors We used three ultrasonic sensors in Feeding device. Two of them were employed for monitoring food and water reservoirs to track the quantities contained within. Additionally, we used one sensor to monitor the water level in the water dish. • Stepper motor and A4988 Driver Figure 8 Computer power supply Figure 9 Ultrasonic sensors 13 We employed the stepper motor in the food container to operate the rubberized paddle wheel responsible for dispensing food from the food reservoir. The stepper motor was connected to an A4988 driver to regulate its movement and ensure precise control over the food dispensing process. • Load Cell and HX711 We utilized a load cell capable of reading weights up to 5 kilograms, interfacing it with an HX711 module connected to an Arduino. This combination was crucial for achieving precise weight readings and converting signals from the load cell into digital signals readable by the Arduino. The load cell unit allows for reliable weight measurement, simplifying the tracking and monitoring of the food quantity in the feeding dish with high precision. Figure 11 stepper motor Figure 10 A4988 Driver 14 • LCD 20*4 and I2C We integrated an LCD 20x4 display with I2C communication protocol into our system to visualize various inputs and outputs. This setup allowed us to display user settings and interact with them based on keypad inputs, displaying them on the LCD for user convenience and interaction. • Keypad Figure 12 5kg load cell Figure 13 HX711 Load Cell Amplifier Figure 14 LCD 20*4 and I2C 15 Within our project, we have utilized the keypad as an input mechanism, empowering users to control the features offered by the device and make selections from them. Users enter values relevant to scheduling through the keypad, allowing them to interact with the system effectively. Additionally, clear and concise instructions are presented on the accompanying LCD display, guiding users through the input process and confirming their choices. • RTC An RTC is an integrated circuit that accurately tracks real-time, ensuring precise timekeeping even when the system is powered off or disconnected from an external power source. In our project, we utilized an RTC to enable the scheduling of both food and water at specific times. The RTC facilitated our ability to track time and designate precise times for meal and water distribution. By integrating the RTC into our system, we were able to organize scheduling processes effectively. Figure 15 Keypad Figure 16 Real time clock (RTC) 16 • Water pump The 12V DC Fish Tank Pump is a compact and efficient pump commonly used in aquariums and other water-related applications. It operates at 12 volts DC and is designed to move water smoothly and reliably from one location to another. We utilized a single 12V DC Pump to transfer water from the water container to the water dish. • Relays A relay is an electromechanical switch that enables the control of high-power electrical devices using low-power signals. In this case, the 5-volt relay module can be controlled by a 5-volt signal, making it compatible with the Arduino microcontroller. We employed the 5- volt relay module to manage the operation of the valve and the pump, facilitating their opening and closing cycles within the project. • Other Component Figure 17 12V DC Pump Figure 18 Relay 17 o Valve We utilized water valve operating at 12 volts. This valve employed to regulate the flow of liquids within the system. Additionally, valve accessories were incorporated to ensure compatibility with tube and other side, facilitating seamless integration across various units. o Water Tubes o Wires Figure 19 Valve Figure 20 Valve accessories Figure 21 water tubes 18 4.1.2 Litter box Device Components For the litter box we reused some of the above hardware components which are: • Arduino Mega. • ESP8266. • RTC. • Computer power supply. • Wires Their implementation will be discussed on next section and we use some other new components as shown below: • RFID Figure 22 Wires 19 RFID stands for Radio-Frequency Identification. It's a technology used to remotely identify and track objects equipped with RFID tags using radio signals. The technology comprises RFID tags and RFID readers. Tags contain embedded information like serial numbers or unique identifiers and respond to radio signals sent from readers. This allows reader devices to identify tags and read the information stored in them without the need for direct contact or line of sight. Before activating the device by pressing the push button, we employed RFID technology in the project to authenticate user identity. This ensured that the device would only operate when the correct card was presented, enhancing security measures and preventing unauthorized access. • LED We utilized an LED to illuminate if the RFID card used is correct. • Push button Figure 23 RFID Radio-frequency identification Figure 24 LED 20 A push button is a simple mechanical switch that completes an electrical circuit when pressed, we used it to turn on the device when pressed. • Switch Button A toggle switch button is a type of mechanical switch that can be flipped or toggled between two states to control the flow of electricity in a circuit. We used it in order to set the activation of auto mod starting of the device. • IR sensors An IR sensor, or infrared sensor, is a device that detects infrared radiation emitted or reflected by objects. It works by measuring the intensity of infrared radiation to determine the presence or absence of an object in its vicinity. IR sensors find applications in various fields including motion detection, proximity sensing, and remote-control systems. We utilized 4 IR sensors, one to detect the entry and exit of the cat from the device, others to ascertain the presence or absence of the cat inside the machine. IR sensors emit and detect Figure 25 push button Figure 26 switch button 21 infrared radiation, allowing us to monitor changes in the sensor's environment, particularly the movement of the cat, and trigger appropriate actions based on these detections. • Stepper motor Nema23 with Driver In our project, we utilized bipolar four-wire stepper motors, specifically the J-5718HB2401 model, recognized for their precision and efficiency in rotating the device's cylinder during the sand separation process. These motors were powered by the YS-DIV268N driver with a 12A power supply. We connected the motor coils to the driver and controlled them using corresponding Arduino pins, with the negative pins grounded. A 12A power supply ensured reliable voltage for the motors. In the code, we programmed the motor's movement and rotation, ensuring it reverses direction upon reaching the limit switch and adjusts its final position to return the sand to its original and correct position consistently. Figure 27 Infrared sensor (IR sensor) Figure 28 stepper motor nema 23 22 • Limit Switches A limit switch is a device that triggers an action when an object reaches a certain position or limit. In our project, we utilized two limit switches, one on the left and one on the right, to reverse the rotational movement direction of the device when it reaches each of them. Figure 29 YS-DIV268N driver Figure 30 limit switches 23 • Other Components o Wheels We used four small-sized wheels mounted beneath the cylinder to facilitate its movement during the rotation process. o 3d printed gears We used them for the rotational movement of the device. Figure 31 wheels Figure 32 3D printed gears 24 4.2 Design and Hardware Implementation 4.2.1 Feeding Device Implementation The feeding device consists of two containers at the top, each representing a reservoir. We have a reservoir for food and a reservoir for water. 4.2.1 Input-Output Unit Figure 34 Feeding device final Implementation Figure 33 Feeding device internal implementation 25 The device can be controlled via the keypad and LCD screen. Upon startup, a specific key is displayed on the screen that the user must input to confirm ownership of the cat, preventing random button presses by the cat. The user is then directed to a menu with four options: Feed Now, Schedule Feeding, Water Now, and Schedule Watering. The user can interact with each option and adjust settings using the keypad. 4.2.1 Feeding Unit For the food unit, we have two options. When pressing "Feed Now," this allows the user to initiate immediate feeding. As for scheduling, it provides the user with three meals to Figure 35 Feeding device I/O unit Figure 36 Feeding device menu selection Figure 38 food meals schedules Figure 37 food schedule setting sample 26 schedule during the day, each meal can be activated or deactivated and each can schedule to operate at a specific time of day. The food dispensing mechanism consists of a food reservoir at the top containing blades connected to a stepper motor, which is linked to its driver and direct food to plate. When attempting to dispense food, either from the schedule or the immediate mode, the status of the reservoir is checked using an ultrasonic sensor mounted at the top to determine if there is a sufficient amount of food in the reservoir or not. If no, user will inform by printing a message on the screen Figure 39 Food unit internally Figure 40 food dispensing mechanism Figure 41 no enough food msg 27 If the food quantity in the reservoir is sufficient, the food dispensing process initiates. The motor starts rotating, moving the blades to dispense the food. Underneath the food dish, we installed a load cell connected to a driver, continuously reading the weight of the dish. We preset the weight representing a full dish. Once the load cell detects that the food weight matches the preset full weight, the food dispensing process automatically stops. 4.2.2 Water Unit For the water unit, we have two options. When pressing "Water Now," this allows the user to initiate immediate water. As for scheduling, it provides automatic scheduling and regulates the water supply hourly to ensure a continuous water availability for the cat's hydration needs. Figure 43 load cell for food dish weight Figure 42 start putting food msg Figure 44 dish already have food msg 28 The water dispensing mechanism comprises a water reservoir at the top, connected to a pump and valve system. Subsequently, it is linked to a tube through which water flows until it is directly deposited into the bowl. Figure 45 water schedule settings Figure 47 water dispensing mechanism Figure 46 water unit internally 29 When attempting to dispense water, either from the schedule or the immediate mode, the status of the reservoir is checked using an ultrasonic sensor mounted at the top to determine if there is a sufficient amount of water in the reservoir or not. If no, user will inform by printing a message on the screen If the water amount in the reservoir is sufficient, the pump and valve system are activated, initiating the water dispensing process. Water flows through the pipes until it reaches the water bowl. Positioned directly above the water bowl, we installed an ultrasonic sensor, calibrated to detect an adequate water level. Once it confirms that the water level is sufficient, the water dispensing process halts, ensuring that the water bowl is adequately filled. This check occurs each time water is dispensed, preventing unnecessary water refills if the bowl is already full. Figure 48 water reservoir ultrasonic Figure 49 no enough water msg 30 4.2.2 Litter box Device Implementation The litter box device comprises a cylindrical chamber filled with sand, representing a toilet for cats. Inside the device, a wired shelf that used in Refrigerator is used as a separate of the sand from the waste, designed with openings to allow only sand passage while preventing waste from passing through. This facilitates the separation of sand and waste. The device operates with a stepper motor and 3D-printed gears, working together to move the cylinder. Behind the grid lies a storage compartment. As the device rotates and separates the sand from waste, clean sand is directed into the storage while waste remains at the top. Figure 50 water dish with ultrasonic above it 31 The device continues rotating until the waste falls into a lower box, triggering a limit switch. Upon reaching this switch and confirming waste collection, the device reverses its rotation, ensuring clean sand is returned to its original position. This cycle continue until the device reaches another limit switch, prompting a slight movement in the opposite direction to redistribute the sand back to its initial position. Figure 51 Litter box final Implementation Figure 52 Litter box from inside Figure 53 sand storage compartment 32 To operate the device, it functions in multiple modes. In the first mode, we employ RFID technology. The device is programmed to recognize the unique ID of a specific card. Consequently, only individuals with the authorized card can activate the device. While we have a push button, pressing it directly won't trigger the device (ensuring it's not accidentally activated by the cat). Instead, the card must be first placed near the device. If the card is valid, an LED lights up, indicating approval. There's a brief interval of time (few seconds) during which the push button can be pressed after the card validation, following which the device initiates its operation as explained previously. Figure 54 Litter box from back Figure 55 3D printing gears for the litte box Figure 56 RFID with push button to turn on litter box 33 The second mode is the Auto Mode, where there's a switch button that can be set to On or Off. When set to on (indicating the user wants to activate automatic cleaning), a set of IR sensors are deployed. One is positioned at the entrance to detect the cat's entry, while another set of IR sensors detects the cat's presence inside the device. After a certain period, the IR sensors at the entrance detect the cat's exit. Following another brief period, the device initiates automatic cleaning using the same mechanism explained earlier. It's worth noting that in all operating modes, if the device detects any obstruction near the entrance using the IR sensors, it automatically pauses its operation until it detects nothing, ensuring the safety of the cat. Once cleared, it resumes its operation from where it left off, ensuring the cat's well-being throughout the process. Figure 57 Switch button to control auto mode for the litter box Figure 58 entrance IR sensor Figure 59 IR sensors to detect the cat's presence inside the device 34 The third mode of operating the device involves scheduling it to work at specific times, which is done through a mobile application. This functionality will be further elaborated in the next section, along with direct activation from the mobile app. 4.3 Mobile Application We designed a mobile application using Blynk for both the feeding device and the litter box. 4.3.1 Feeding Device Mobile Application For the feeding device, the application provides users with the status of both the food and water reservoirs, ensuring that the device owner is fully informed when there is a need to refill food or water. Additionally, the application allows users to initiate immediate food or water dispensing directly through the app. 35 4.3.2 Litter Box Mobile Application The litter box offers two additional modes for operating the device: one allows direct activation by pressing the "clean" button, and the other involves scheduling. In the scheduling mode, users select a specific time during the day for automatic cleaning. When the scheduled time arrives, the device initiates cleaning if the IR sensors detect no obstacles. Otherwise, it waits until the nearest available time. Additionally, the application displays the number of times the cat has used the device, providing insights into the cat's health. Figure 60 Feeding app Interface 36 Figure 61 Litter box app Interface 37 Chapter 5: Results and Discussion Our project aimed to address the challenges associated with automated cat care, focusing on feeding and litter box management. Through the integration of various hardware components, software systems, and mobile application interfaces, we aimed to provide efficient and convenient solutions for pet owners. Our contribution lies in the development of a sophisticated system capable of automated feeding and litter box management. By leveraging technologies such as RFID, IR sensors, load cells, and stepper motors, we engineered a solution that enhances convenience and efficiency in pet care routines. Moreover, the integration of a mobile application interface expands user accessibility and control over the system, fostering a seamless interaction between pet owners and the automated devices. The successful implementation of our project signifies the potential of automation in pet care, offering tangible benefits in terms of time-saving, convenience, and pet health monitoring. However, our journey was not without challenges. Limited time constraints posed significant hurdles during the project development phase. Additionally, the need for rotational movement in the device added complexity and increased the overall cost of the system. Looking ahead, there are opportunities for further study and refinement in the field of automated pet care. Enhancements in sensor technology and data analytics algorithms could enable the system to serve as an indicator of pets' health and behavior patterns, thereby enhancing the overall well-being of pets and providing valuable insights to pet owners. 38 Chapter 6: Conclusion and Recommendation 6.1 Summary Our project endeavors to new pet care through automated feeding and litter box management systems. By integrating cutting-edge hardware components and intuitive software interfaces, we aim to enhance convenience and efficiency for pet owners while ensuring the well-being. The core of our automated pet care system lies in the integration of Arduino Mega, a versatile microcontroller platform. Through meticulous programming and hardware interfacing, we harnessed the power of Arduino to orchestrate the operation of various components, including load cells, stepper motors, and sensors. This seamless integration enabled precise control and monitoring of feeding and litter box activities, providing pet owners with real- time insights and control via our mobile application interface. 6.2 Recommendations Our recommendations for future improvements and considerations in the Automated Pet Care System include: Arduino Board Selection: Carefully evaluate the choice of Arduino boards to ensure compatibility and optimal performance. Power Management: Utilize separate power supplies for sensors and devices to prevent overloading the Arduino board and ensure stable operation. Wiring Practices: Employ proper soldering techniques for wire connections to enhance durability and minimize the risk of breakage. By addressing these areas of focus, we can further enhance the functionality, accessibility, and user experience of automated pet care systems, paving the way for transformative innovations in the field. 39 6.3 What we have learned - Learning how to deal with different sensors like IR and ultrasonic sensor, dealing with stepper motors, and other things like pumps, valve, load cell, limit switched and RFID. - Understanding the integration of high-voltage devices with Arduino platforms. - Exploring advanced features like Wi-Fi connectivity using ESP8266 for enhanced system capabilities. 6.4 Future works - Integration of programmable functionalities through the mobile application interface to enable users to customize feeding schedules and preferences. This feature will empower pet owners to tailor feeding times and portion sizes according to their pet's dietary needs and routines. - Introducing technologies like cameras for remote cat monitoring could be explored to provide owners with additional insights into their pet's behavior and well-being, especially when they are away from home. 40 References 1- (2024, 1 30). Retrieved from projecthub.arduino: https://projecthub.arduino.cc/issaom/self-service-cat-feeder-0881e4 2- (2024, 1 30). Retrieved from All3DP: https://all3dp.com/2/arduino-pet-feeder-cat-dog/ 3- SHUKOR, N. S., MARZUKI, M. S., & RAIHAN, M. F. (2022). AUTOMATIC CAT LITTERBOX(ACLB). Selangor, Malaysia: University POLITEKNIK SULTAN SALAHUDDINABDULAZIZ SHAH. 3- Silim, K., Lu, Y., Brown, P., & Zhang, H. (2022). Auto Cat Toilet. Salt Lake City, USA: University of Utah.