Introduction: Smart Feeder
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: Step 1: Fritzing Schema
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: Step 2: Creating a Database
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
Step 3: Step3 : Connecting the Electronics and Coding
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: Step 4: Building the Case
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.