Professional Documents
Culture Documents
Temperature & Moisture Monitor: Instructables
Temperature & Moisture Monitor: Instructables
by Itrium
There are two sure re ways to quickly kill o your growing area. A DIY tensiometer monitors how much
plants. The rst way is to bake or freeze them to death water is available for the plants in the growing media.
with extremes of temperature. Alternatively, under or After the data from these sensors is collected by the
over watering them will cause them to wither or rot ESP32, it is sent to the internet via WiFi for posting on
away the roots. Of course there are other ways to ThingSpeak.
neglect a plant such as incorrect feeding or lighting
but these usually take days or weeks to have much Supplies:
e ect.
The parts used for this monitor are readily available
on Ebay or Amazon.
Although I have an automatic watering system, I felt
Digital Barometric Pressure Sensor Module Liquid
the need to have a completely independent
Water Level Controller Board
temperature and moisture monitoring system in case
DS18B20 Waterproof Temperature Sensor
of a major failure with the irrigation. The answer was
Tropf Blumat Ceramic Probe
to monitor temperature and soil moisture content
ESP32 Development Board
using an ESP32 module and posting the results onto
5k resistor
the internet. I like to view the data as graphs and
5-12V power supply
charts and so the readings are processed on
Assorted plastic tubing to t tensiometer and sensor
ThingSpeak to nd trends. However, there are many
Mounting box and wiring
other IoT services available on the internet which will
WiFi connection
send emails or messages when triggered.
The waterproof version of the DS18B20 is used to Arduino libraries and instructions are readily available
measure the temperature. Information is sent to and on the internet to handle the DS18B20 and 1-Wire
from the device over a 1-Wire interface so that only a interface which greatly simplify the data reading
single wire needs to be connected to the ESP32. Each sketch.
DS18B20 contains a unique serial number so that
several DS18B20s can be connected to the same wire
and read separately if so desired.
A Digital Barometric Pressure Sensor Module Liquid the sensor can be calibrated to provide user friendly
Water Level Controller Board, widely available on units of pressure.
eBay, is used to measure the tensiometer pressure. The
pressure sensor module consists of a strain gauge It is vitally important that all the pipe work and
coupled to an HX710b ampli er with a 24 bit D/A connections are leak free. Any loss in pressure causes
converter. Unfortunately, there is not a dedicated water to escape from the ceramic cup and the
Arduino library available for the HX710b but the tensiometer will need frequent topping up. A leak
HX711 library seems to work well without problems tight system will work for weeks before needing more
instead. water in the tensiometer. If you do nd the water level
dropping over hours rather than weeks or months,
The HX711 library will output a 24 bit number consider using pipe clips at the pipe joints.
proportional to the pressure measured by the sensor.
By noting the output at zero and a known pressure,
The HX711 library outputs a 24 bit number according It is possible to work out the o set and scale factor
to the pressure measured by the sensor. This reading from two pressure measurements and ash the ESP32
needs converting into more familiar units of pressure in one session. However, I got completely confused
like psi, kPa or millibars. In this Instructable millibars with negative number arithmetic! Subtracting or
were chosen as the working units but the output can dividing two negative numbers blew my mind . I
be easily scaled to other measurements. There is a line took the easy way out and corrected the o set rst
in the Arduino sketch to send the raw pressure and sorted out the scaling factor as a separate task.
reading to the serial monitor so that it can be used for
calibration purposes. First of all the raw output from the sensor is
measured with nothing connected to the sensor. This
Known pressure levels can be created by recording number is subtracted from the raw output reading to
the pressure required to support a column of water. give a zero reference for no applied pressure. After
Each inch of water supported will create a pressure of ashing the ESP32 with this o set correction, the next
2.5 mb. The setup is shown in the diagram, readings step is to set the scaling factor to give the correct
are taken at zero pressure and maximum pressure units of pressure. A known pressure is applied to the
from the serial monitor. Some people may like to take sensor using a column of water of known height. The
intermediate readings, best t lines and all that gu ESP32 is then ashed with a suitable scaling factor to
but the gauge is quite linear and a 2 point calibration give the pressure in the desired units.
is good enough!
There are several versions of the ESP32 development The ESP32 development board had a built in voltage
board out in the wild. For this Instructable a 30 pin regulator so that a voltage supply of up to 12 V could
version was used but there is no reason why other be used. Alternatively the unit may be powered
versions should not work. Besides the two sensors, the through the USB socket.
only other component is a 5k pull-up resistor for the
DS18B20 bus. Instead of using push on connectors, all
the connections were soldered for better reliability.
The Arduino sketch for the temperature and moisture monitor is quite conventional. First of all the libraries are
installed and initiated. Then The WiFi connection is set up ready to post data to ThingSpeak and the sensors read.
Pressure readings are converted to millibars before being sent to ThingSpeak with the temperature readings.
Download
https://www.instructables.com/ORIG/F4V/7AWL/K9YL68GV/F4V7AWLK9YL68GV.txt
…
Step 7: Installation