Blynk Board ESP8266 Smart Modular Watering System
Created: Aug 18, 2016
No description available.
The Sparkfun Blynk board is an evaluation board for a low cost Wi-Fi chip ESP8266 that can connect to Wi-Fi networks that are either open or protected with WPA, WPA-2, or WEP authentication. This board has a mobile app that enables users to observe weather conditions, control LEDs from a phone, send tweets when it’s time to water the plants, etc. The mobile app is an easy to use app builder that allows users to add buttons, sliders, graphical displays and even RGB controllers to their phone. The Blynk board interfaces with the outside world using GPIO pins that can either control real-world objects, like motors or LEDs, or read in values from sensors. It is ideal to be used in IoT projects.
In this reference design, the Blynk board is used as the main controller and communication device in a smart modular watering system. The watering system is composed of the Blynk board, ATTiny45 microcontroller, HC-SR04 ultrasonic sensor, SEN-13322 soil moisture sensor, VEML6070 ultraviolet sensor, 5V-3.3V I2C logic level converter, water pump relay driver, etc. It basically monitors the soil moisture and the water level inside the reservoir. The HC-SR04 ultrasonic sensor monitors the water level while the SEN-13322 sensor checks the moisture of the soil. To minimize the tasks handled by the Blynk board, the reading of the ultrasonic sensor is not directly inputted to the board. The ATTiny45 microcontroller calculates the reading of the ultrasonic sensor first and sends the data to the Blynk board over the I2C bus. The VEML6070 ultraviolet sensor also sends its data to the Blynk board over the I2C bus. Its purpose is to provide data to help in deciding whether the plant requires more shadow or direct sunlight. Since the ATTiny45 and the VEML6070 ultraviolet sensor operate in 5V, two 5V-3.3V I2C logic level converters are used to protect the ESP8266 chip since it can only accept up to 3.3V inputs.
The SEN-13322 soil moisture sensor maximum output depends on the moisture level of the soil and in its supply voltage. In this design, the output of the sensor can reach as high as 5V, which is not good for the ADC pin of the ESP8266 chip since it can only accept analog voltages up to 1V. Though the Blynk board includes an internal circuit that translates the voltage level inputted at the ADC pin of the board to 1V maximum, it can only accept up to 3.3V. So in this design, an external circuit, which is composed of an op amp configured in a voltage follower configuration and a voltage divider network placed at the output of the op amp, is used to convert the 5V output of the soil moisture sensor to a 3.3V level. If the moisture level of the soil gets low, the Blynk board turns ON the water pump through the relay driver to water the plants. All components used in the design except for the water pump and the relay driver that run on a 12V power supply operate in 5V. Since the Blynk board includes an internal 3.3V regulator, a 3.3V power supply is not needed anymore to power the ESP8266 chip. The 3.3V source used in the 5V-3.3V I2C logic level converter is taken from the Blynk board internal 3.3V regulator. Since there is only one soil moisture sensor used, this design is applicable only to tiny gardens. All of the readings from the sensor can be monitored through the Blynk mobile app, which runs on iOs and Android devices.