Send soil moisture, temp, and humidity readings to an InfluxDB database, so that you can visualize them with your own Grafana dashboard.
The inspiration and initial InfuxDB/WiFi configuration code is adapted from Michael Klements. I introduced the ability to handle a variable number of moisture sensors, made use of the ESP32's deep sleep feature to conserve power, added a sensor calibration file, along with numerous comments to assist users.
Check out this video from Michael Klements for help setting up the InfluxDB database, and configuring the Grafana dashboard.
The ino files are written in C++/arduino.
Use calibrate_sensors.ino to determine the DryValue and WetValue for your sensors. I have provided my default values in sensors.ino, but you should use calibrate_sensors.ino to test your own.
To determine your WetValue, submerge the sensor up to the exposed electronic components. You may choose to cover the exposed components in silicon to protect them from moisture.
To determine your DryValue, wipe the sensor with a dry towel to ensure it is as dry as possible.
Use these values when setting up sensors.ino.
Use the Arduino IDE Library Manager to install all of the libraries listed in sensors.ino.
-
ESP32 WROOOM Development Board
-
High-quality capacitive soil moisture sensors
-
A DHT22 Digital Temp and Humidity Sensor
-
a breadboard
-
Jumper wires
-Micro USB cable and wall charger or rechargable battery pack
If you'd like to contribute to this project, email me at codybarker.or@gmail.com
Unlicensed
-Cody Barker
-Credit due to Michael Klements for much of the initial DB/WiFi configuration