MAKER: circuito.io/Translated by: Qu Wen Jin Tony
How can you keep track of your pet’s diet when you’re not home? How can you fill their bellies? Quickly make a smart food dispenser for your pet! It can fill the bowl when it’s empty, feeding your pets in a practical and fun way.
Component List
Arduino UNO × 1, PIR Motion Sensor (generic) × 1, Espressif ESP8266 ESP-01 × 1, Speaker: 0.25W, 8Ω × 1, Servo Motor – Generic Metal Gear (mini) × 1
The 3D printed parts model files required for the project can be downloaded from the project file library: https://make.quwj.com/project/353
Principle
There are many ways to trigger the pet feeder: you can set it to fill the bowl at specific times, let it automatically fill when the bowl is empty, or feed it after the dog performs certain actions.
In this project, we let the feeder occasionally start buzzing. Once the dog approaches the device, the PIR sensor will immediately recognize it and trigger the servo motor to feed it.
In addition, we decided to use Freeboard to create a dashboard, adding an option to control the pet feeder via mobile phone. Here we use the ESP8266-01 (Wi-Fi module) to connect the Circuito project to the internet.
Building the Circuit
Click this link to find the components used in this project already selected for you.
The components you need are: PIR sensor, Arduino UNO (or other models), servo motor, speaker, ESP8266, power supply
This is the basic circuit for the project, but you can also add many different sensors and other components to the circuit. For example, you can add a weight sensor to monitor the amount of food in the bowl, or add LED lights that change based on different parameters.
Once you have chosen the required components, please click the generate button, and the system will set it up for you. It is divided into three parts:
1. BoM – A list of components required for the project, including resistors and capacitors.
2. Step-by-step wiring guide – A tutorial on how to connect all components to the Arduino board using a breadboard.
3. Code – Example code for the circuit. This code is not specifically for the pet feeder project, but is example code that can communicate between different components in the circuit.
To upload the code, follow these steps: Download the code from the project file library: https://make.quwj.com/project/353, open it in Arduino IDE, and upload it to the development board.
Once all settings are completed, replace the example code generated by Circuito with the code in this tutorial. Ensure that the //Include Libraries and //Pin Definitions are retained at the top of the code, along with all libraries from the original code from circuito.io.
4. Connection – This section will guide you on how to configure the project to connect to the internet.
Download the dashboard.json file from this project’s file library: https://make.quwj.com/project/353
In the response from circuito.io, click “Connect”, then click “Create Your Dashboard”.
The webpage will redirect to freeboard.io and give you a basic dashboard. This dashboard is connected to the Arduino using a unique thingName. You can modify the thingName in firmware.ino.
Click “clone” – if you have not applied for a Freeboard account, you can create one for free immediately.
After registration, you will see the following interface:
Click the settings icon at the top of the page. As follows:
Click “IMPORT” (2) and select the dashboard.json file you downloaded earlier. As follows:
Troubleshooting
1. If it does not work, try refreshing the page or re-importing. 2. Check if the firmware settings in the dashboard are correct. Click “DATASOURCES” (3) under “Dweet”, as shown in the image:
3. Ensure that the THING NAME you entered matches the name in firmware.ino. 4. Hover over the “OUTPUTS” pane, and then click the newly appeared “settings” icon, as shown:
This window will open:
5. Click “JS EDITOR” and find this line of code:
Change dweetToken to the thingName given in firmware.ino. 6. Click “CLOSE” to close the window, and then click “SAVE” to save the file.
Assembly
Now that you have set up the circuit, what are you waiting for? Quickly assemble the circuit! We have designed a 3D printed case for the servo motor, PIR sensor, and speaker. The .stl source files can be downloaded below this article. You can also assemble the parts in other ways.
Congratulations! You are done!
Depending on your needs, you may need to make slight modifications to the code and possibly calibrate the sensors. Feel free to share your personal thoughts in the comments!
Project file library address:
http://make.quwj.com/project/353
via hackster.io/circuito-io-team/iot-pet-feeder-10a4f3
Links in the article can be clicked to read the original article at the end
More exciting content
Make a motorcycle dashboard with Raspberry Pi
Make a smart pet feeder with Raspberry Pi
Build a smart planetary observer based on Raspberry Pi
Handmade metal wire frame X-wing clock
Arduino + 280 LEDs DIY music spectrum light
DIY Stanford Pupper 12 Degrees of Freedom Quadruped Robot Dog
Barrier: PC and Raspberry Pi keyboard and mouse sharing solution