Calibrate soil moisture sensor

Tool to calibrate a soil moisture sensor for a desired soil type with an ESP32 (Tested with captor YL69 amd module HC-38)

projectImage

Things used in this project

Hardware components

HARDWARE LIST
1 Espressif ESP32
1 DFRobot Gravity: Analog Soil Moisture Sensor For Arduino

Software apps and online services

PlatformIO IDE

IFTTT Maker service

Story

 

 

 

 

Calibrate soil moisture sensor

Tool to calibrate a soil moisture sensor for a desired soil type with an ESP32 (Tested with captor YL69 amd module HC-38)

 

 

 

How it works

The tool performs 600 measurements and then calculates the average which gives the calibration value for the soil type. The calibration lasts on average 40min

The result is sent by email via an IFTTT webhooks.

The ESP goes into hibernation at the end of the measurements.

To perform a new calibration, simply press the RST key.

 

 

 

Connect the soil moisture sensor

projectImage

Create IFTTT webhooks

 

Go to the link: https://ifttt.com/

 

Then click on the "create" button

 

projectImage
projectImage

Search for the "Webhooks" service

 

projectImage

Select trigger "Receive a web request"

projectImage

Define the event name (to keep aside it will be used in the configuration file) then create the trigger

projectImage

In the "Then that" section click on "add

projectImage

Search for the Gmail service* Then select action "Send an email"

projectImage

Complete action fields like this:

projectImage

Go to the following link to get your key: https://ifttt.com/maker_webhooks/settings The key is at the end of the URL

projectImage

Setup

 

-First copy the template:

 

cp lib/config/config_template.h /lib/config/config.h

 

-Configure the following variables with your credentials:

 

// IFTTT Setting
#define IFTTT_KEY  "YOUR_IFTTT_KEY" // Replace with your unique IFTTT Key, can be obtained at this link: https://ifttt.com/maker_webhooks/settings.
#define GMAIL_TRIGGER "YOUR_TRIGGER_FOR_GMAIL"  // Replace with your trigger event name.
// WIFI Setting
#define WIFI_SSID "YOUR_WIFI_SSID" // Replace with your wifi ssid.
#define WIFI_PWD "YOUR_WIFI_PASSWORD" // Replace with your wifi password
// Mail Setting
#define MAILTO "YOUR_MAIL" // Replace with your email.

Schematics

 

projectImage

The article was first published in hackster, September 30, 2021

cr: https://www.hackster.io/m0by314/calibrate-soil-moisture-sensor-3c3a39

author: Adrien S

License
All Rights
Reserved
licensBg
0