Smart gardener is a project that involves microcontrollers and sensors taking care of plants by measuring air temperature, humidity, soil moisture and watering them by using reservoirs attached to servos. This is repository created for project and contains all necessary codes for it and required information/instructions to replicate it.
**Overview of the project. ** User through Blynk app on mobile phone receives notifications daily remind to water the plant. By using ON/OFF button in the app, user can initiate water flow to plant. Water supply is controlled by servo motors that are connected to water reservoirs. Additionally, user can see other vital parameters for plant well-being: air temperature, humidity and soil temperature. Data received from sensors in microcontroller is sent to RasPI server through local WiFi.
Required parts for this project are:
- At least one Wemos D1 mini or any other ESP8266 based microcontroller.
- RasPI that will act as a server platform (In this project 3B+ version is being used).
- Sensors: DHT22 air temperature and humidity sensor. DS18B20 waterproof temperature sensor.
- Actuators: TG9e for water supply.
- Reservoirs to store water.
- WiFi access point. In this project local WiFi through separate router.
- Sensors and actuators are connected to microcontroller. Following connections are made as depicted in .
- Actuators are connected to reservoirs and positioned securely over the plant, e.g.,
- RasberryPI 32-bit OS was used on RasPI. Used release version was
May 2020 2020-05-27
. - Blynk local custom server was setup according to instructions from author repository. Java 11 server version and release of
v0.41.13
Step-by-step instructions are available here. - Local WiFi network was setup by router. Static IP was assigned to RasPI.
- Connection tested by downloading Blynk phone app and connecting to Blynk environment using credentials and IP address of RasPI through default 9443 port. NB! Phone also has to be connected to local WiFI.
- Authorization tokens for each Wemos device was acquired and placed in the Arduino code
smart_gardener.ino
together with WiFi credentials. - Following app widgets were used:
- Labeled value (To display air temperature, humidity and soil moisture)
- Switch button (To control ON/OFF state of the water supply)
- Notification widget that allows to display notification on the smartphone.
- Eventor that schedules notification to be sent to user, reminding to water plants and fill the tank. With newer update eventor will be able to water plants automatically while using multiple devices.
- Virtual LED that shows whenever the microcontroller has received the signal from button. Example of layout can be seen in this .
- ESP8266 code was designed that pushes values it receives from sensors to respective Virtual pins on Blynk app. Additionally code reads the state of the Button virtual pin and accordingly switches ON/OFF the water supply from the reservoir.