Build a Smart Pet Feeder with Raspberry Pi

Build a Smart Pet Feeder with Raspberry PiMAKER: vermeerenmaxime/translated by: Fun Endless

If you have a cute pet at home, are you tempted by this project? Make an automatic feeder by yourself! It can more accurately grasp the amount of food for your pets, help you monitor their diet, and let them grow up healthy! Project features:
  • Automatically detects the weight of the bowl, and when the food in the bowl is less than 25 grams, it will automatically feed.

  • LED can light up in the dark to provide illumination.

  • With SmartPET, record your pet’s recent eating habits and calculate whether their food intake is within the appropriate range.

Build a Smart Pet Feeder with Raspberry Pi

For the BOM list, frontend, backend source code, and database files used during the production process, please visit the GitHub repository to download:https://github.com/vermeerenmaxime/smartpet

Material List

Raspberry Pi ×1 Motor ×1 Weight Sensor TAL220 ×1 Light Sensor LDR ×1 MCP3008 ×1 Ultrasonic Sensor HY-SRF05 ×1 Load Module HX771 ×1 LED Display 16×2 ×1 Potentiometer ×1 RGB LED ×1 Power Supply ×110k Ohm Resistor ×11k Ohm Resistor ×1220 Ohm Resistor ×4 Wooden Board ×1 Corn Flake Dispenser ×1 Long Screw ×16 Short Screw ×4 Hinge ×1 Screws for fixing hinge ×6 Soldering Iron ×1 Strong Glue ×1 Saw ×1 Drill Bit ×1

Hardware Part

Build a Smart Pet Feeder with Raspberry Pi

The circuit diagram is shown, build the circuit as indicated.

Build a Smart Pet Feeder with Raspberry Pi

There are three sensors in the circuit (LDR, ultrasonic, and weight sensor) and three actuators (motor, RGB LED, and LCD display), please install them as shown in the figure.

Build a Smart Pet Feeder with Raspberry Pi

I have built my prototype on multiple breadboards.

Making the Base and Container

Build a Smart Pet Feeder with Raspberry Pi

Build a Smart Pet Feeder with Raspberry Pi

1. Draw the shape, cut the wooden board, to place the corn flake dispenser.

Build a Smart Pet Feeder with Raspberry Pi

2. Use iron wire to install the motor on the dispenser. As shown, the iron wire pulls on the dispenser’s steering wheel to make it rotate.

Build a Smart Pet Feeder with Raspberry Pi

3. Ensure the iron wire goes through the hole in the motor and is installed correctly.

Build a Smart Pet Feeder with Raspberry Pi

4. Added some wood to the base, placing the motor in the middle. 5. Cut some holes in the casing to install the LCD display, ultrasonic sensor, LDR, and RGB LED.

Build a Smart Pet Feeder with Raspberry Pi

6. Added a hinge on the back to open the machine and connected the power supply to the power socket.

Friendly reminder: Please pay attention to safety and wear goggles while making.

Installing Raspberry Pi

Build a Smart Pet Feeder with Raspberry Pi

1. Connect the wires to the Raspberry Pi. After connecting, open the terminal (mac) or Windows Power Shell (Windows), and the Raspberry Pi is ready. 2. Connect the Raspberry Pi to the internet and wait for the IPv4 address. After that, you can connect to this address via the Internet without wires.

Creating and Configuring the Database

Build a Smart Pet Feeder with Raspberry Pi

1. Open the config.py file and configure the database correctly. 2. You can import some virtual data into my database to make the project run smoothly. 3. Find the database in the /data folder “database.sql”. 4. The way to create the database supports multiple sensors and actuators to upgrade the SmartPET project.

The SQL file for the database used here can be downloaded from the project file repository.https://github.com/vermeerenmaxime/smartpet

Software Design

Build a Smart Pet Feeder with Raspberry Pi

This project is implemented using Python, Flask, SocketIO, and Javascript programming.

Build a Smart Pet Feeder with Raspberry Pi

1. Made the framework using Adobe XD.

Build a Smart Pet Feeder with Raspberry Pi

2. Designed and created HTML and CSS, and added some basic Javascript to ensure the design works properly.

I used routes in Flask to fetch most of the data on the website.

The frontend and backend source code used here can be downloaded from the project file repository.https://github.com/vermeerenmaxime/smartpet

Creating Services and Running

Build a Smart Pet Feeder with Raspberry Pi

1. Create the service so that the Raspberry Pi automatically runs the code (app.py) on startup.

You can click the following link to learn how to create a service in Raspberry Pi.https://shumeipai.nxez.com/2020/06/30/linux-usage-systemd.html

2. smartpet.service is in the /service folder.

3. Now you can plug in the Raspberry Pi and external power supply and run the project!

So far, an automatic feeder has been built, hope you like it.

The project file repository address:

http://make.quwj.com/project/259

via instructables.com/id/SmartPET-Smart-Pet-Feeder/

The links in the text can be clicked to read the original text at the end

Build a Smart Pet Feeder with Raspberry Pi

More wonderful content

Baby monitor based on Raspberry Pi CribSense

Arduino + WS2812B Make a Digital Clock

I look like a handle, but actually it’s an adjustable power supply

A cloud that forecasts the weather, based on Raspberry Pi + 3D printing

DIY Stanford Pupper 12 Degree of Freedom Quadruped Robot Dog

Barrier: PC and Raspberry Pi keyboard and mouse sharing solution

Cool modification: electric skateboard with a speed of 40km/h and a range of 18km

8GB memory version of Raspberry Pi 4 has been released, official price $75

Build a Smart Pet Feeder with Raspberry Pi

Leave a Comment

Your email address will not be published. Required fields are marked *