Table of Contents

Pet recognition and monitoring system

Overiew

The idea for this project came when other neighborhood cats started eating the food of my outdoor cat. Although it would be nice to feed all of them, it'd not be a good idea, so a solution was needed in order to identify my cat and track it's behavior. This way, I could find the time it prefers to eat, and for further development could configure the feeder to open whenever my cat is detected

Objective

The purpose of this project is to monitor specific behavior of your house pets. ESP32-CAM boards with cameras and motion detectors will be placed near areas of interest such as the pet feeder and will send a picture to a firebase server whenever the motion sensor is triggered. The server will use a ML model to recognize your specific pets and save specific data to a database, which can be used to track the pet's behavior.

Hardware

Most of the difficulty on the hardware side comes from programming the esp32, which does not have a USB port. The PIR sensor only has to be connected to a power source and it's output to the GPIO13 of the esp32.

Software and services

Architecture

Shortly, the architecture has classic client-server structure, where the esp32-cam is the http client and firebase the server. The other software and harware components are built on top of these two.

Application setup

How it works

How the Web interface works

Software architecure - ESP32

As previously described, the actions taken by the ESP32 are quite simple, and described in the following flowchart. The PIR sensor does most of the detection work, and we simply read GPIO13 in order to see if the motion was detected. If motion is detected, then we take a picture and send to to the server. If the exchange is successful and receive the HTTP OK code, we send the prediction result alongside a timestamp to the realtimedb

Software architecure - Firebase

On the server side of things, we will have two cloud functions, a realtime database and, through firebase hosting a web interface

Challenges and things to improve

Conclusions

This project provides an easy way to control and monitor the behavior of your house pets. Although here still is room for improvement the ease of setting up the project, and on the finesse of the detection algorithm, it provides a good basis for further development. All of the basic requirements are implemented and quite useful, requiring just a bit more polishing. In summary, this project integrates robust web technologies and relatively cheap hardware in order to fulfill an useful task.

References