Good Morning! | Automate Morning Routine. :)
by sesayes in Circuits > Arduino
35 Views, 1 Favorites, 0 Comments
Good Morning! | Automate Morning Routine. :)
Good morning!
Wait. Did you forget to feed your dog?
Oh you're too lazy for putting the favorite wake-up music of yours?
We can help you!
In this project, we'll set up a simple project that will allow you:
- opening a dog/cat-feeding bowl
- reminding when to water the plant of your room
- receiving a nice good morning email
- checking humidity / temperature of your room
- starting a day with your favorite music!
Does it make you excited?
Let's Dive in!
Supplies
To start your project, we need following materials:
- ESP32 Dev Board
- Light sensor
- Servo Motor
- WiFi-enabled device (for running Python server)
- Breadboard and jumper wires
- Computer with Python installed
- Additional modules: DHT11 sensor, Blynk App, ESP32Servo library
Are you all set?
Let's connect them!
Circuit Set-up
Let's set-up each sensors that we need for your project.
In this step, we'll go connect 4 main features.
I. Light sensor
Light sensor will detect sunlight and let the project know that your morning has started.
Check out the first picture and connect them correctly. In my case, Light sensor is pinned on pin 34.
II. Servo motor
Servo motor will open the cover of the feeding bowl.
Place it tightly onto the cover of your feeding bowl.
Check out the second picture and connect them correctly. In my case, Servo motor is pinned on pin 13.
III. DHT sensor
DHT sensor will show your room's humidity / temperature in the Blynk App.
Check out the third picture and connect them correctly. In my case, DHT sensor is pinned on pin 15.
IV. Water sensor
Water sensor will remind you to water your plant based on the level of moisture inside the soil.
Place it firmly inside your soil of your favorite plant!
Check out the fourth picture and connect them correctly. In my case, Light sensor is pinned on pin 27.
Amazing!
Let's play with some ESP32 features!
ESP32 & Arduino Set-up
In this step, we're going over main ESP features to implement functionalities of your project.
Don't worry. I'll provide all the coding implementation that you'll need to start!
First, please make sure to understand that you will need to:
- include required libraries for WiFi, HTTP client, Blynk, and DHT sensors in your Arduino sketch
- configure your ESP32 to connect your local WIFi using your SSID and password
- set up the Blynk App to monitor all information (humidity, water level, and temperature)
- initialize the servo motor for controlling the feeding bowl cover.
Now, please check the attached Arduino code.
Upload the IOT_automated_morning_routine.ino implementations to your ESP32.
Implementations in the file will read light and water sensor values, operates the servo motor,
and run a Python script (next step) through HTTP to play your favorite music and send a 'Good Morning' email.
Make sure to go over the each implementation and try to change variables based on annotation I added for you. :)
Done?
Let's make them online!
Downloads
Blynk App
Hold on.
Before we're moving into online part, I want you to make sure to set-up Blynk App.
In this project, we have 2 gauge widgets required and to be connected them to the virtual temperature and humidity pins.
For more information regarding basic usage of Blynk App, check out the link: https://docs.blynk.io/en.
Python
In this step, we are going to make your project On-line.
Don't panic. I've prepared a Python script that you'll start with.
First, please make sure to understand that you will need to:
- Install necessary Python libraries including Flask, Pygame, and Flask_mail. (google is your bestie)
- Set-up your email config using Flask to send automated emails.
- Use Pygame to play your favorite wake-up music
- Host the server on your local machine to communicate with ESP32.
Now, please check the attached Python code.
Include the server_for_submission.py Python file into the same folder as the previous Arduino file.
Make sure to go over the each implementation and try to change variables based on annotation I added for you. :)
This is all you need!
Downloads
Done! But Test.
Make sure that all functions we meant to have are working correctly.
Please go over the list in the instruction and test based on your need!
That's all for a one-step forward to the healthy morning routine.
From here, it's all depends on your creativity.
I hope you enjoyed this instructables and see you again!