Monitoring the Needs and Desires of the Dog

by YoramB3 in Circuits > Arduino

250 Views, 2 Favorites, 0 Comments

Monitoring the Needs and Desires of the Dog

Screenshot 2023-07-30 at 22.33.54.png
Final project IOT

Welcome to our tutorial on building a device that enhances the connection between dogs and their owners! Today, we'll show you how to create a special communication tool that allows your furry friend to send you messages.

Imagine receiving messages from your dog - it's a heartwarming idea that strengthens the bond between you and your beloved pet.

To get started, we have a video that demonstrates the entire process, making it easy for you to follow along and create the device step by step


https://youtu.be/mxko3ryMVi0

Supplies

Screenshot 2023-07-27 at 20.12.46.png

2 Adafruit Circuit Playground express with a Wi-fi ESP8266 attached

1 Computer to load the sketch into the CPX's

Make.com user

Blynk user

Connect CPX to ESP8266

Screenshot 2023-07-30 at 22.31.47.png
Screenshot 2023-07-30 at 22.32.00.png

To set up the connection between the CPX's and your Wi-Fi ESP8266 boards, please follow the steps below:

  1. Connect the CPX's to your Wi-Fi ESP8266 boards as shown in the provided image.
  2. Upload the provided sketch to your ESP8266 board.
  3. Access the Serial Monitor in your Arduino IDE.
  4. In the Serial Monitor, enter the command: "AT+RST".
  5. Check the output displayed in the Serial Monitor to ensure it matches the image provided (cpx-esp8266 output).

If the output differs from the expected result, you may need to update your firmware version. You can do this by referring to the ESP8266 guide available at: https://www.espressif.com/en/support/download/other-tools

Alternatively, you can directly update the firmware version by using this link: http://bit.ly/esp-firmware-174 and running the Download Tool.

By following these steps, you should be able to successfully connect the CPX's to your Wi-Fi ESP8266 boards and verify their communication through the Serial Monitor.



Let's go through the process of creating a Blynk template and setting up devices to interact with it:

  1. Blynk Introduction:
  2. Blynk is a platform that allows you to easily build mobile applications to control and monitor hardware remotely. It works with various microcontrollers and development boards, including ESP8266.
  3. Blynk Account and App:
  4. Start by creating a Blynk account and installing the Blynk app on your smartphone. The app is available for both Android and iOS.
  5. Creating a Blynk Template:
  6. In the Blynk app, you can create a new project and design your user interface with various widgets such as buttons, sliders, gauges, and graphs. This user interface will be your Blynk template. Set up the widgets according to your project's requirements.
  7. Blynk Token:
  8. Once you've designed your template, Blynk will generate an authentication token for your project. This token is a unique identifier that allows your devices to communicate with the Blynk cloud server.
  9. Setting Up Your Devices:
  10. To connect your devices, like the ESP8266, to the Blynk platform, you'll need to install the Blynk library in your Arduino IDE.
  11. Programming the Devices:
  12. In your Arduino sketch, include the Blynk library and input your Blynk token. Write code to interact with the hardware and link it to the Blynk widgets in your template. For example, if you have a button on the app, you can control an LED connected to your ESP8266 by reading the button's state in your code.
  13. Uploading Code:
  14. Compile and upload the code to your ESP8266 board using the Arduino IDE.

Interacting with the App:

Launch the Blynk app on your smartphone and select the project you created. The app will communicate with the Blynk server, and you should see the interface you designed. Now you can remotely control your devices through the app's widgets!


Downloads

Learn the System

The functionality of the project:

The First Device :

1. The temp is updated every 3 seconds in the table

2. If the average temperature of the water rises above ***, then the owner of the dog receives an email alert to his controller

3. The dog's owner has an app where he can see:

*The water temperature - -> If the temperature (measured now) is too high - the dog's controller activates the blue LED lighting.

**There is an option for the owner to deactivate the notification in the application by pressing the left button.

->The noise level in the dog's environment **If the dog is barking, it will appear in the app + the board that is with the dog will turn on the LED lighting with a red light

** General status of the noise and temp (all Good) - gives an indication that the indicators are normal.


The second device -

 1. Receives an alert when the accumulated temp average appears in the sheet

 2. Turns off the alert by pressing both buttons

 3. Pressing the left button only - sends back to the controller located with the dog an alert indicating that the owner is on his way home.


How will the system work?

One code file will be on the device that is with the dog's owner

The second code file will be in the house next to the dog


When the water temp  in the house is too high, the device in the house will report to the owner and the owner will activate the alarm and send an email



When the dog barks, the dog is trying to say that it is hungry, so the owner will be alerted via his board and email alarm. 

 

The owner will have the option when he presses the left button to alert the dog that he is on his way home

the buttom will make a sound for the dog at home through the PlaygroundExpress


Creating the Sketch

Please follow these steps to set up the system:

  1. Download the attached file "Home_project.ino" sketch to your computer.
  2. Open the sketch and edit the Wi-Fi information, including the network name and password.
  3. Next, download the attached file "Owner_project.ino" sketch to your computer.
  4. Open this sketch and edit the Wi-Fi information, including the network name and password for the Hotspot.

Now, you are ready to deploy the sketches to their respective devices:

  1. Upload the "Home_project.ino" file to the device placed at home.
  2. Upload the "Owner_project.ino" file to the dog owner's device.

With the sketches deployed to their respective devices, the system is now ready to function. The device at home will monitor the temperature and alert the owner in case of high temperatures, while also detecting the dog's barking to indicate hunger. On the other hand, the owner's device will have the capability to communicate with the device at home, allowing for timely communication and responses to the dog's needs.

Creating Blynk Template and Devices

Screenshot 2023-07-28 at 12.43.42.png
Screenshot 2023-07-28 at 12.44.57.png

Steps for installing Blink infrastructure:

1. Create a user in Blink

2. Go to the Templates tab -> click New Templates -> define as in the picture (CPX BLINK)

3. Enter the new template -> datastreams -> click new datastream -> choose Digital Pin and define Pin 13 (the name of the pin will be Checking Function)

4. Click again new Datastream and define the following pins virtual Pin


Webhooks in Blink Part I

Screenshot 2023-07-28 at 12.45.48.png
Screenshot 2023-07-28 at 12.49.00.png

5. Click Settings

-> webhooks (under developers) - open a new webhook

** We will return to the webhook later, when we install the integromat.

for the second webhook just put the following (like the picture)


Blynk App Setup

Screenshot 2023-07-28 at 12.59.21.png
Screenshot 2023-07-28 at 12.59.39.png

To complete the setup, follow the same procedure for the remaining components:

  1. Set up the "Value Display" for the "Sound Alarm" feature.
  2. Configure the "Value Display" for the "Water Temperature" feature.
  3. Implement the "Value Display" for the "Sound Level" feature.

Once you have completed all these steps, your screen will display the components as shown in the example:

[Insert screenshot of the completed screen with all the components]

With the setup finalized, you'll have a comprehensive dashboard displaying the various values and features, making it easy to monitor and interact with the system efficiently. Enjoy the convenience and functionality of your customized screen!

Creating Make.com Scenarios

Screenshot 2023-07-28 at 13.39.36.png
Screenshot 2023-07-28 at 13.39.54.png


Please refer to the provided pictures(or in the pdf) for step-by-step instructions to create two scenarios. Follow the visual guidelines carefully to ensure proper setup and execution



Getting to Know the Temp and Voice Data

Screenshot 2023-07-30 at 22.49.40.png
Screenshot 2023-07-30 at 22.50.07.png

https://docs.google.com/spreadsheets/d/1fKkBlxP9Ampk_C4okgrWzVwhU_OocNYg3q4lHSPMbQY/edit#gid=0

The initial Google Sheet contains valuable data reported by the dog, giving us insights into its needs and conditions at home. The frequency of barks serves as an indicator of its hunger and need to relieve itself. Moreover, the temperature recorded in the house adds to our understanding of its comfort level.

By analyzing this information, we can promptly identify when the dog requires attention or care. This enables us to respond empathetically and cater to its needs, thus fostering a stronger bond between us and our furry companion. As responsible owners, this data empowers us to make informed decisions, ensuring our dog's well-being and happiness.


https://docs.google.com/spreadsheets/d/1fKkBlxP9Ampk_C4okgrWzVwhU_OocNYg3q4lHSPMbQY/edit#gid=750997637

The second document serves as a log of the owner's reactions and instances when they notify the dog about their impending arrival home. Each time the owner presses the designated button to signal their return, the document is updated, providing us with a record of arrival times. This tracking system allows us to monitor the frequency of our visits and observe how often the dog's anticipation brings us back home just for them.

By maintaining this log, we gain insights into the depth of our bond with our beloved dog. It provides us with a heartwarming follow-up on the love and attention we shower upon our furry companion. This record not only reinforces the special connection we share with our dog but also reflects the care and dedication we have in ensuring their happiness and well-being. It's a beautiful testament to the affectionate relationship between a devoted owner and their furry best friend.


Why Our Project Is Represent the Concept of a Rube Goldberg Machine

The presented functionality system demonstrates a fascinating embodiment of the Rube Goldberg machine concept, characterized by an intricate chain of interconnected events and actions designed to achieve specific outcomes. The first device, comprising an Adafruit CPX board and ESP8266 Wi-Fi module, sets the sequence in motion by continuously updating the water temperature every 3 seconds. When the average temperature exceeds a predefined threshold, an email alert is triggered to notify the dog's owner through their controller. The owner can access a dedicated app with real-time data, including the water temperature and noise level in the dog's environment. In case of excessively high temperatures, the dog's controller activates blue LED lighting to visually signal the condition, while instances of barking prompt the app to receive this information, causing the board with the dog to illuminate with red LEDs. Furthermore, the app provides an overall status indication of "all good" when both noise and temperature indicators remain within acceptable ranges, with the option to deactivate notifications by simply pressing the left button in the application.


The second device in the system complements the process by receiving an alert when the accumulated average temperature appears in the sheet. To halt the alert, the user must press both buttons. In a clever feedback loop, pressing the left button alone sends an alert back to the controller located with the dog, notifying them that the owner is on their way home. Through this complex and interconnected system, the Rube Goldberg machine concept comes to life, showcasing an innovative and engaging way to interact with pet care and environmental monitoring, as a series of precisely orchestrated actions work together harmoniously to achieve diverse outcomes.