Smart Feeder

by Klaas Van Thomme in Circuits > Electronics

264 Views, 0 Favorites, 0 Comments

Smart Feeder

IMG_20200616_095306.jpg

Having a pet is a lot of fun. But whenever you want to go on a fun vacation and you cant bring your best friend with you, you need to find a person to come and feed your pet. I've had this issue a lot and got the idea to build my own automatic pet feeder you can control from a website.

Supplies

  • Raspberry Pi 4
  • 2 Breadboards
  • Mini Breadboard
  • Breadboard power supply module
  • DHT11 sensor
  • TMP36 sensor
  • LDR
  • MCP3008
  • PCF8574
  • Jumper wires
  • 16x2 LCD module
  • Laser module
  • Stepper motor
  • Stepper motor driver board
  • Resistor set
  • Wood
  • Custom made rotor

Step 1: Fritzing Schema

fritzing final.png
schema final.png

To read in my LDR and TMP sensor i used a PCF. To use this you'll need to enable I2C on your raspberry PI. For the DHT11 I decided to use a library because programming it yourself is a big mess. I recommend using the Adafruit DHT library for this.

Step 2: Creating a Database

ERD.png

Above you can see my database model. My database was hosted on my Raspberry pi using MariaDB. The 4 tables i used did the following

  • tblSensoren was used to store the different sensors i used
  • tblWaarde was used to store all the values i read from my sensors
  • tblActuatoren was used to store the state of my Laser module and stepper motor
  • tblVoedermomenten was used to store all the datetimes when my motor had to turn on

Step3 : Connecting the Electronics and Coding

fritzing final.png
IMG_20200605_172408.jpg

I combined all the electronics like shown in the firtzing schema above. I pinned all of it on my breadboards. When all of this is connected you can download my code on github to try if it works.

Step 4: Building the Case

IMG_20200613_105622.jpg
IMG_20200613_120018.jpg
IMG_20200613_120032.jpg
IMG_20200614_113057.jpg

I decided to build the case out of leftover planks of wood i had laying around. After sawing all the planks of wood into the correct shapes I nailed and screwed all of them together.