Soil Water Level Status Using ESP8266

Introduction: Soil Water Level Status Using ESP8266

Hi friends, in this instructable we will learn to get the status of the water content of the soil in which the plant is growing. We will send an E-Mail which will display the water content in the soil. Here, we will be using the ESP8266-01, because it does not need any additional breakout boards or shields. Also, it is less expensive and very small in size. So lets start making the project !!!

Step 1: Materials Required -

1) ESP8266-01.

2) Soil moisture sensor.

3) FT232RL USB to UART breakout board.

4) Wires.

5) Mini USB cable.

6) A laptop with Arduino IDE pre-installed.

7) A G-Mail account.

Step 2: G-Mail Setup -

After you have created your own Gmail account, sign in and click on the small circle which shows your account's logo.

Now click on the button which shows My Account. A new page opens. Now click on Sign-In and Security and enable "Allow less secure apps" at the bottom of the page.

This mean apps only need your email and password when login to your gmail account.

If you are concerned about security, just use different account.

Step 3: The Schematic -

CONNECTION WHILE UPLOADING THE CODE -

ESP8266 - FTDI BREAKOUT BOARD

GPIO 0 - GND

GND - GND

VCC - VCC

CH_PD - VCC

RX - TX

TX - RX

CONNECTION AFTER THE UPLOAD IS COMPLETED -

ESP8266 - FTDI BREAKOUT BOARD

GND - GND

VCC - VCC

CH_PD - VCC

ESP8266 - SOIL MOISTURE SENSOR

GPIO 2 - SIG

GND - GND

VCC - VCC

Step 4: The Code -

The Setup -

1) For uploading the code, first you will have to include the json file to include the ESP boards in the boards section. For that, copy the following text (Select the text and click Ctrl + C), open the Arduino IDE and go to Files menu, click on preferences, go to Additional Boards Manager URLs and paste (Click on the white box and click Ctrl + V) the copied text and then click the OK button.

http://arduino.esp8266.com/stable/package_esp8266com_index.json

Now to check if the ESP boards are added, go to Tools menu, boards and then select the respective ESP board. Also select the correct port of the computer to which the FTDI Breakout Board is connected.

The Code -

Gsender.cpp and Gsender.h files are being used from the instructable - "ESP8266 G-Mail Sender" by Borya.

Step 6: The Installation -

If the analog value shown in Serial monitor is below 300, supply water to the plants and continue supplying water till the range comes between 300 to 950. Once done, again upload the main code and insert the sensor in the soil.

Now whenever the water content in the soil decreases, you will get an E-Mail on your Gmail account. Ensure that wherever you have installed the system, there should be a continuous internet connection to which your ESP board is connected wirelessly.

Tips

Questions

11 Comments

Thanks for your comment, but I have given all the required details that are needed to build the project. Still I have verified the connections as given. If still you can find any mistakes, then please comment the mistakes.

Resistance as soil moisture The type of sensor we are building in this module is a resistive sensor.The resistive type of moisture sensor is the most crude. It uses the two probes to pass current through the soil, and then we read that resistance to get the moisture level. More water makes the soil conduct electricity more easily (less resistance), while dry soil conducts electricity more poorly (more resistance).

One problem with resistive sensors is that the resistance of a material changes with temperature. So when the sun beats on the soil and the soil warms up, the resistance changes. This will produce a false "dry" read. For this reason, we employ the soil temperature sensor so GardenBot can use that data to warp the soil moisture to remove the false reading -- i.e. on the chart, the line looks straight.

One other problem we encounter is due to our use of Direct Current. The problem is that if you have DC current (constantly flowing electricity in one direction) going between two pieces of metal (like the exposed probe tips) then etching will take place. This process is called electrolysis, and it is bad for the probes -- it means that they will be eaten away slowly by the action of the electricity. We solve this by only turning the current on when we want to take a reading. Look at staged processing on the brain module page.

By the way, electro-etching can be a very cool effect, if you need it. It can be used to do metal etching for a variety of purposes (artistic or otherwise).

Thanks for mentioning. I had used part of your content and code thinking they are third party(gmail) content and code(standard library). However I will be removing it from my instructable immediately and replacing parts of my code and content with my own.