Introduction: Plant Monitoring and Alerts With ESP8266 and AskSensors IoT Cloud

About: IoT Maker, co-founder of asksensors.com

This project aims at building a smart plant monitoring system using ESP8266 and the AskSensors IoT Platform.

This system can be used to keep track of soil moisture level to provide objective criteria for irrigation decisions. which help ensure irrigation is applied at the right time and reduce operation costs.

Furthermore, the AskSensors application will send email alerts to user when plants need water.

Step 1: Prepare Your Materiel

The main components of the proposed system are:

  1. ESP8266 node MCU
  2. Soil moisture sensor FC-28
  3. AskSensors account.

Step 2: Connect Your Sensor to the Cloud

This istructable gives a detailed step-by-step guide to help you connect your ESP8266 and moisture sensor to the AskSensors cloud. Please follow the suggested steps.

If it is well done, now we should be ready to set an email Alert.

Step 3: Set Email Alert

From your Sensor dashboard, click the ‘Add Alert' button to receive an email alert when the moisture level exceeds a a predefined threshold. The image shows an example to set an email alert when the moisture level is more than 55%. That means that the plant needs water.

A periodic check will be performed automatically depending the Min Interval value (15 minutes in the example). This enables that your plant soil moisture level will be checked by the AskSensors application every 15 minute, if at least one value has exceeded the threshold you defined, you will receive an email alert.

Step 4: Software

Get this example sketch from the AskSensors Github page.

Modify the Wi-Fi SSID and password, the Api Key In:

const char* wifi_ssid = "..........";             // SSID
const char* wifi_password = "..........";         // WIFI
const char* apiKeyIn = "..........";      // API KEY IN

Step 5: Run the Test

  • Insert the moisture sensor terminal in the plant soil as shown in the enclosed figure.
  • Connect the ESP8266 node MCU to your computer through a USB cable.
  • Open Arduino IDE and upload the code.
  • Open a serial terminal. You should see your ESP8266 Node MCU connecting to internet through WiFi.
  • The ESP8266 will periodically reads the moisture level and send it to the AskSensors. You can cross-check the AskSensors graph readings with the values being printed on your Arduino Terminal.

You should receive an email alert when your moisture level exceeds the predefined threshold.

Step 6: DONE

Thanks!

Do you have any questions ?

Please join the AskSensors community.