Introduction: Pet Feeder Controlled Via WiFi

About: Maker 101; Beginner and intermediate level Maker projects! You can find projects such as "How to" and "DIY" on programmable boards such as Arduino, ESP8266, ESP32 and Raspberry Pi on this channel. The projects…

This project shows how to make a pet feeder controlled via WiFi. You can wirelessly control the pet feeder at any time with an app. So take a look at the video "how it works?"...

Supplies

A few basic items are required for assembly and circuit build

  • Wemos D1 Mini ESP8266 WiFi Board
  • 28BYJ-48 Stepper Motor
  • ULN2003x Stepper Motor Driver
  • 608zz Bearing
  • L7805 Voltage Regulator
  • Capacitor
  • 9V-12V Power Supply
  • Breadboard
  • Jumper Wires

Step 1: How It Works?

As you can see, a 3D design was used for the pet feeder. ESP8266-based Wemos D1 Mini board was preferred to connect to the internet and control it via WiFi, and an application was created to control the pet feeder by entering the IP address wirelessly.

Step 2: 3D Parts and Assembly

The 3D design for the pet feeder includes three basic parts. The whole.stl in which the food is filled, the spiral screw.stl and cover.stl that allows the food to be pushed out. Download the STL files of the 3D models from the link below and print them with the help of a 3D printer.

For assembly, first the 608zz bearing is placed on the whole.stl, then the 28BYJ-48 stepper motor is placed on the bearing and fixed with two screws. In the next step, the spiral screw is placed the whole.stl inside to be fixed to the stepper motor end.

Step 3: Breadboard Circuit

About the ESP8266 Wemos D1 Mini Board

The ESP8266 is a Wi-Fi module great for IoT and Home Automation projects. The ESP8266 is a Wi-Fi module. It allows you to control inputs and outputs as you would do with an Arduino, but it has Wi-Fi.

Wemos D1 mini is like a "little Arduino with wifi" for a great price. It's based around the ESP8266, has one analogue port and 11 digital ports. It's programmed via micro-USB (or remote flash via wifi). You can use it with the Arduino IDE.

About the 28BYJ-48 Stepper Motor and ULN2003 Motor Driver

One of the inexpensive way to experience stepper motors is to use 28BYJ-48 stepper motors. One of the best things about these motors is that they can be positioned accurately, one ‘step’ at a time. The other advantage is that they are relatively precise in their movement.

The power consumption of the motor is around 240mA. Because the motor draws too much power, it is best to power it directly from ULN2003 driver rather than drawing that power from the Wemos D1 Mini. The motor usually come with an ULN2003 based driver board which makes them super easy to use. The ULN2003 is one of the most common motor driver ICs.

Connections

Build your circuit according to the shared circuit diagram. The pin numbers for the connections are as follows:

Motor Connections:

  • Driver IN1 to D8 (GPIO15) Wemos D1 Mini
  • Driver IN2 to D7 (GPIO13) Wemos D1 Mini
  • Driver IN3 to D6 (GPIO12) Wemos D1 Mini
  • Driver IN4 to D5 (GPIO14) Wemos D1 Mini
  • Driver Vin to Power Supply Vcc
  • Driver GND to Power Supply GND

Wemos D1 Mini Power Connections:

  • Wemos D1 Mini 5V to L7805 Vout
  • Wemos D1 Mini GND to GND

Power Connections:

  • 9V-12V Power Supply Vcc to L7805 Vin
  • 9V-12V Power Supply GND to L7805 GND

Step 4: Printed Circuit Board (PCB)

After testing the circuit, a PCB was designed to turn the project into a useful prototype. So I cleared the circuit from wiring complexity. To get the PCBs, upload the shared "Gerber" file to PCBWay and create the order. High-quality PCBs will arrive in a few days depending on the shipping address. Place and solder components according to reference (BOM) designator.

Get the Circuit Diagram and PCB Gerber file: https://www.pcbway.com/project/WiFi_Controlled_Pet_Feeder_ESP8266.html

Required components for PCB prototype:

  • 1x 100uF Capacitor
  • 2x 100nF Capacitor
  • 1x B5B-XH-A (LF)(SN) Connector or Male Header
  • 1x DC005-2.0MM Jack
  • 1x L7805 Voltage Regulator
  • 1x ULN2003 Motor Driver IC
  • Female Header

Step 5: Create App With MIT App Inventor

An app has been created to control the pet feeder wirelessly via WiFi. With the MIT app inventor, an application can be easily developed with the drag-and-drop method.Import the shared aia extension resource file after logging in to https://appinventor.mit.edu/ . In this way, you can customize the application according to you.

Unfortunately, the Instructables does not allow uploading aia files for MIT app inventor. Therefore, you can access the application file from the link below:

https://www.pcbway.com/project/WiFi_Controlled_Pet_Feeder_ESP8266.html

The commands (when Feed.Click) to be sent from the application must match the commands specified in the source code. You can install your app on your phone or tablet with Build > Android app (apk)

Step 6: Source Code

Two things are required when programming Wemos D1 Mini and similar boards with ESP8266 chip. You will need add-on to programming the ESP8266 with the Arduino IDE.

Open the shared source code with the Arduino IDE. First, install the ESP8266 add-on to program the Wemos D1 Mini.

File > Preferences. Enter the ESP8266 add-on URL into the “Additional Boards Manager URLs”

http://arduino.esp8266.com/stable/package_esp8266com_index.json

Go to Tools > Board > Boards Manager. Search the ESP8266 and install

Go to Tools > Board > Select the Wemos D1 Mini

Define the pins to which the stepper motors are connected. Remember, you must define pin numbers as GPIO

Enter your Wifi SSDI and Password

The data (when Feed.Click) received from the application must match the data in the code... Therefore, the command name (Feed) specified for the Pet Feeder movements should be defined correctly.

Upload the source code to the Wemos D1 Mini board.

Displays the local IP address required for communication with the Pet Feeder.

Enter the local IP address displayed on the serial monitor into the application.